package im.zhaojun.system.mapper;

import im.zhaojun.system.model.DeviceChannelid;
import im.zhaojun.system.model.Traffalarmrecord;
import im.zhaojun.system.model.TraffalarmrecordResult;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.additional.dialect.oracle.InsertListMapper;
import tk.mybatis.mapper.common.BaseMapper;
import tk.mybatis.mapper.common.ConditionMapper;

import java.util.List;

public interface TraffalarmrecordMapper extends BaseMapper<Traffalarmrecord>, ConditionMapper<Traffalarmrecord>, InsertListMapper<Traffalarmrecord> {

    List<TraffalarmrecordResult> queryTraffalarmrecordByPage(@Param("recordtype") String recordtype, @Param("areaid") Long areaid, @Param("checkstatus") Integer checkstatus,
                                                             @Param("starttime") String starttime, @Param("endtime") String endtime,
                                                             @Param("deviceChannelids") List<DeviceChannelid> deviceChannelid,
                                                             @Param("userAccount") String userAccount, @Param("pushstatus") Integer pushstatus,
                                                             @Param("page") Integer page, @Param("rows") Integer rows);

    Long countQueryTraffalarmrecordByPage(@Param("recordtype") String recordtype, @Param("areaid") Long areaid, @Param("checkstatus") Integer checkstatus,
                                          @Param("starttime") String starttime, @Param("endtime") String endtime,
                                          @Param("deviceChannelids") List<DeviceChannelid> deviceChannelid,
                                          @Param("userAccount") String userAccount, @Param("pushstatus") Integer pushstatus,
                                          @Param("page") Integer page, @Param("rows") Integer rows);

    int updateTraffAlarmRecordUrl(Traffalarmrecord record);

    int updatePushEvent(Traffalarmrecord traffalarmrecord);

    int inserTraffAlarmRecord(Traffalarmrecord traffalarmrecord);

    int selectmax();


    Integer statisTraffalarmrecordstatByDay();

    Integer updateTraffAlarmRectificationType(Traffalarmrecord traffalarmrecord);

    Integer selectExitsTraffAlarm(Traffalarmrecord traffalarmrecord);

    Integer selectInChecktimeTraffAlarm(Traffalarmrecord traffalarmrecord);

    Integer updateInworkRectifytimeTraffAlarm(Traffalarmrecord traffalarmrecord);

    String   seletManualStatus();
    List<Traffalarmrecord> getTraffalarmrecordBystatus();


}