package com.zcxk.charge.core.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zcxk.charge.api.dto.AlarmSettingDto;
import com.zcxk.charge.api.vo.AlarmSettingVo;
import com.zcxk.charge.core.entity.AlarmSetting;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 *
 * 报警设置Dao接口
 *
 * @author yjy
 * @since 2020-11-17
 */
@Mapper
public interface AlarmSettingMapper extends BaseMapper<AlarmSetting> {

    /**
    * 自定义分页查询
    * @author Andy
    * @date 18:46 2021/8/17
    * @param page:
    * @param alarmSettingDto:
    * @return com.baomidou.mybatisplus.extension.plugins.pagination.Page<com.zcxk.charge.api.vo.AlarmSettingVo>
    **/
    Page<AlarmSettingVo> findPage(IPage<AlarmSettingDto> page, @Param("alarm") AlarmSettingDto alarmSettingDto);

    /**
    * 根据设备id查询属性信息
    * @author Andy
    * @date 18:46 2021/8/17
    * @param deviceId:
    * @param sceneId:
    * @return java.util.List<com.zcxk.charge.api.vo.AlarmSettingVo>
    **/
    List<AlarmSettingVo> selectAttributes(@Param("deviceId") Integer deviceId, @Param("sceneId") Integer sceneId);

    /**
    * 修改实时报警数据
    * @author Andy
    * @date 18:46 2021/8/17
    * @param ids:
    * @param updateBy:
    * @return java.lang.Integer
    **/
    Integer updateRealtimeAlarm(@Param("ids") List<Long> ids, @Param("updateBy") String updateBy);
}
