|
@@ -1,6 +1,7 @@
|
|
|
package com.huimv.env.manage.time;
|
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.huimv.env.manage.mapper.LampConfigMapper;
|
|
|
import com.huimv.env.manage.saas.dao.entity.LampConfig;
|
|
|
import com.huimv.env.manage.saas.service.ILampConfigService;
|
|
@@ -21,7 +22,8 @@ public class Timer {
|
|
|
// @Scheduled(cron = "0 * * * * ?")
|
|
|
private void updateAge(){
|
|
|
System.out.println("更新日龄");
|
|
|
- List<LampConfig> lampConfigs = lampConfigService.list(null);
|
|
|
+ List<LampConfig> lampConfigs = lampConfigService.list(new QueryWrapper<>());
|
|
|
+ System.out.println(lampConfigs);
|
|
|
for (LampConfig lampConfig : lampConfigs) {
|
|
|
Integer dayAge = lampConfig.getDayAge()+1;
|
|
|
String temp = lampConfigService.updateTemp(lampConfig.getAgeList(),dayAge);
|
|
@@ -29,11 +31,7 @@ public class Timer {
|
|
|
lampConfig.setDayAge(dayAge);
|
|
|
lampConfig.setTempSet(temp);
|
|
|
lampConfigService.updateById(lampConfig);
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
-
|
|
|
}
|