package com.tofly.watermeter.custom.mapper;

import com.tofly.pojo.message.Messagepush;
import com.tofly.pojo.message.Messagerecipient;
import com.tofly.watermeter.custom.dto.DmawarnhandleDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface TimedTaskMapper {

    List<Long> getAubotUser(@Param("menuId") Long menuId);

    boolean insertMsg(@Param("msg") Messagepush msg);

    boolean insertMsgStateClient(@Param("msg") Messagerecipient msg);

    boolean insertMsgStateClientBatch(@Param("msg") Messagerecipient msg, @Param("idList") List<String> idList);

    String warnNeedInfo(@Param("itcd") String itcd);

    List<Map<String, Object>> getMsgAndSMSUser();

    List<Map<String, Object>> thresholdValue(@Param("minWarnTime") int minWarnTime);

    List<String> getUserTel(@Param("userId") List<String> userId);

    boolean updateWarnTable(@Param("itcd") String itcd, @Param("str") String str);

    boolean updateScadaTable(@Param("itcd") String itcd, @Param("str") String str);

    Map<String, Object> getMaxWarnValAndTime(@Param("itcd") String itcd, @Param("time") Double time);

    Map<String, Object> getMinWarnValAndTime(@Param("itcd") String itcd, @Param("time") Double time);

    String upWarnInfo(@Param("itcd") String itcd, @Param("min") Double min, @Param("time") Double time, @Param("max") Double max, @Param("val") Double val);

    String downWarnInfo(@Param("itcd") String itcd, @Param("min") Double min, @Param("time") Double time, @Param("max") Double max, @Param("val") Double val);

    List<String> getWarnHandle(int hour);

    List<DmawarnhandleDto> warnHandleInfo(@Param("ids") List<String> ids);

    Double getNightMinFlow(@Param("dmaId") Long dmaId);

    boolean updateWarnHandle(@Param("dto") DmawarnhandleDto dto);

    List<String> getNowMonthUserCode();
}
