package com.gyee.alarm.mapper.auto;

import com.gyee.alarm.model.auto.ProEconBrownoutsEvent;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.Date;

/**
 * <p>
 * 与停机事件关联（限电停机时），数据库中无关联，程序控制 Mapper 接口
 * </p>
 *
 * @author shilin
 * @since 2022-10-21
 */
public interface ProEconBrownoutsEventMapper extends BaseMapper<ProEconBrownoutsEvent> {

    @Update("update pro_econ_brownouts_event   set start_time=#{start_time},loss_power=#{loss_power},stop_hours=#{stop_hours}  where id=#{id}")
    public int  updateBrownouts(@Param(value = "start_time") Date start_time, @Param(value = "loss_power")Double loss_power,
                                    @Param(value = "stop_hours")Double stop_hours, @Param(value = "id")String id);
}
