package com.zy.asrs.mapper; import com.zy.asrs.entity.BasLiftOpt; import com.baomidou.mybatisplus.mapper.BaseMapper; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; import java.util.List; import java.util.Map; @Mapper @Repository public interface BasLiftOptMapper extends BaseMapper { BasLiftOpt selectByDeviceWrk(String deviceWrk, Integer liftNo); List> selectRunStatistic();//获取提升机每天运行数据 List> selectRunErrorStatistic(int time);//获取提升机每天运行异常数据 @Insert("insert into asr_bas_lift_opt_storage select * from asr_bas_lift_opt where id in (select id from asr_bas_lift_opt where DATEDIFF(day, send_time, GETDATE()) > #{day})") int saveToStorage(Integer day); @Delete("delete from asr_bas_lift_opt where id in (select id from asr_bas_lift_opt where DATEDIFF(day, send_time, GETDATE()) > #{day})") int deleteByDay(Integer day); }