package com.zcxk.dao.alarm;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zcxk.dto.alarm.DataAlarmDto;
import com.zcxk.dto.alarm.DataAlarmQueryDto;
import com.zcxk.entity.alarm.DataAlarmDetailEntity;
import com.zcxk.vo.DataAlarmDetailsVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 数据报警详情mapper
 *
 * @author lihui
 * @version V1.0
 * @date 2021/5/31
 **/
@Mapper
public interface DataAlarmDetailMapper {


    /***
     * 保存数据
     * @author lihui
     * @date 14:13 2021/6/1
     * @param entity :
     * @return void
     **/
    void saveDataAlarmDetail(DataAlarmDetailEntity entity);


    /***
     * 分页查询
     * @author lihui
     * @date 15:01 2021/5/31
     * @param page : 页码
     * @param dto :  参数
     * @return com.baomidou.mybatisplus.core.metadata.IPage<com.zcxk.vo.DataAlarmDetailsVo>
     **/
    Page<DataAlarmDetailsVo> findPage(@Param("page") IPage<DataAlarmDto> page, DataAlarmQueryDto dto, @Param("history") int history);

    /***
     * 删除
     * @author lihui
     * @date 15:50 2021/5/31
     * @param alarmId :
     * @param  status: 是否被挂起：0不是，1是
     * @return void
     **/
    void hangUpAlarmDetails(@Param("alarmId") Long alarmId,@Param("status") int status);

    /***
     * 更新为历史数据
     * @author lihui
     * @date 14:20 2021/6/1
     * @param alarmId :
     * @return void
     **/
    void updateHistoryData(Long alarmId);

    /***
     * md5查询
     * @author lihui
     * @date 17:22 2021/6/1
     * @param manageIds :
     * @return java.util.List<com.zcxk.vo.DataAlarmDetailsVo>
     **/
    List<DataAlarmDetailEntity> listByManageId(@Param("manageIds") List<Long> manageIds);

    /***
     * 更新报警数据
     * @author lihui
     * @date 17:37 2021/6/1
     * @param entity :
     * @return void
     **/
    void updateAlrarmData(DataAlarmDetailEntity entity);
}
