提交 7ee81078 authored 作者: 林业通's avatar 林业通

表名修改

上级 9c7f7f34
package tech.glinfo.enbao.modules.job.task;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import tech.glinfo.enbao.modules.sh.service.OtherShDeviceTimingService;
@Component("shDeviceSwitchTimingTask")
public class ShDeviceSwitchTimingTask implements ITask {
private Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private OtherShDeviceTimingService otherShDeviceTimingService;
@Override
public void run(String params) {
otherShDeviceTimingService.listTimingByTime1();
}
}
package tech.glinfo.enbao.modules.job.task;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import tech.glinfo.enbao.modules.sh.service.OtherShDeviceService;
/**
* 设备5分钟不更新上线时间设置改设备离线定时器
* @author linyetong
* @date 2019/12/20 9:29
*/
@Component("shDeviceTask")
public class ShDeviceTask implements ITask {
@Autowired
private OtherShDeviceService otherShDeviceService;
@Override
public void run(String params) {
// 智能家居超过5分钟不上报数据设置离线
otherShDeviceService.timeout();
}
}
...@@ -13,12 +13,12 @@ public interface OtherShDeviceTimingDao extends BaseMapper<ShDeviceTimingEntity> ...@@ -13,12 +13,12 @@ public interface OtherShDeviceTimingDao extends BaseMapper<ShDeviceTimingEntity>
@Select("<script>" + @Select("<script>" +
" select *" " select *"
+ " from oshare_sh_device_timing a where (a.repeats = 0 AND a.time = #{time1}) OR (a.repeats = 1 AND a.time = #{time2} AND FIND_IN_SET(${week},a.repeat_time))" + " from sh_device_timing a where (a.repeats = 0 AND a.time = #{time1}) OR (a.repeats = 1 AND a.time = #{time2} AND FIND_IN_SET(${week},a.repeat_time))"
+ " </script>") + " </script>")
List<ShDeviceTimingEntity> listTimingByTime(Map<String, Object> params); List<ShDeviceTimingEntity> listTimingByTime(Map<String, Object> params);
@Select("<script>" @Select("<script>"
+ " select *, IF(((a.repeats = 0 AND a.time = #{time1}) OR (a.repeats = 1 AND a.time = #{time2} AND FIND_IN_SET(${week},a.repeat_time))),1,2) flag from oshare_sh_device_timing a where a.`status` = 1 AND (((a.repeats = 0 AND a.time = #{time1}) OR (a.repeats = 1 AND a.time = #{time2} AND FIND_IN_SET(${week},a.repeat_time))) OR ((a.repeats = 0 AND a.close_time = #{time1}) OR (a.repeats = 1 AND a.close_time = #{time2} AND FIND_IN_SET(${week},a.repeat_time))))" + " select *, IF(((a.repeats = 0 AND a.time = #{time1}) OR (a.repeats = 1 AND a.time = #{time2} AND FIND_IN_SET(${week},a.repeat_time))),1,2) flag from sh_device_timing a where a.`status` = 1 AND (((a.repeats = 0 AND a.time = #{time1}) OR (a.repeats = 1 AND a.time = #{time2} AND FIND_IN_SET(${week},a.repeat_time))) OR ((a.repeats = 0 AND a.close_time = #{time1}) OR (a.repeats = 1 AND a.close_time = #{time2} AND FIND_IN_SET(${week},a.repeat_time))))"
+ " </script>") + " </script>")
List<Map<String, Object>> listTimingByTime1(Map<String, Object> params); List<Map<String, Object>> listTimingByTime1(Map<String, Object> params);
......
...@@ -18,7 +18,7 @@ public interface SecondaryKeywordsDao extends BaseMapper<ShSpeakerSecondaryKeywo ...@@ -18,7 +18,7 @@ public interface SecondaryKeywordsDao extends BaseMapper<ShSpeakerSecondaryKeywo
@Select("<script> " + @Select("<script> " +
"SELECT a.id, a.keyword, a.cmd, a.create_time createTime, b.keyword parentKeyword FROM oshare_speaker_secondary_keywords a, oshare_speaker_first_keywords b WHERE a.parent_id = b.id " + "SELECT a.id, a.keyword, a.cmd, a.create_time createTime, b.keyword parentKeyword FROM speaker_secondary_keywords a, speaker_first_keywords b WHERE a.parent_id = b.id " +
"ORDER BY a.id DESC" "ORDER BY a.id DESC"
+"</script>") +"</script>")
List<Map<String, Object>> list(Page<Map<String, Object>> page, Map<String, Object> params); List<Map<String, Object>> list(Page<Map<String, Object>> page, Map<String, Object> params);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论