package com.gyee.alarm.service.auto.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gyee.alarm.mapper.auto.ProEconBrownoutsEventMapper;
import com.gyee.alarm.model.auto.ProEconBrownoutsEvent;
import com.gyee.alarm.service.auto.IProEconBrownoutsEventService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;

/**
 * <p>
 * 与停机事件关联（限电停机时），数据库中无关联，程序控制 服务实现类
 * </p>
 *
 * @author shilin
 * @since 2022-10-21
 */
@Service
public class ProEconBrownoutsEventServiceImpl extends ServiceImpl<ProEconBrownoutsEventMapper, ProEconBrownoutsEvent> implements IProEconBrownoutsEventService {

    @Resource
    private ProEconBrownoutsEventMapper proEconBrownoutsEventMapper;
    public int  updateBrownouts(Date start_time, Double loss_power, Double stop_hours, String id)
    {
        int i=0;
        i=proEconBrownoutsEventMapper.updateBrownouts( start_time,loss_power, stop_hours, id);
        return i;
    }
}
