|
@@ -31,6 +31,7 @@ public class ProdWarningTimer {
|
|
|
@Autowired
|
|
|
private IDisplayTypeService displayTypeService;
|
|
|
|
|
|
+// @Scheduled(cron = "*/5 * * * * ?")
|
|
|
@Scheduled(cron = "0 0 0 * * ?")
|
|
|
private void action(){
|
|
|
Integer type1 = 0;
|
|
@@ -129,7 +130,7 @@ public class ProdWarningTimer {
|
|
|
}
|
|
|
}
|
|
|
ProdProduction prodProduction = prodProductionMapper.selectOne(new QueryWrapper<ProdProduction>().lambda()
|
|
|
- .eq(ProdProduction::getFarmId, farmId));
|
|
|
+ .eq(ProdProduction::getFarmId, farmId).orderByDesc(ProdProduction::getCreatTime).last("LIMIT 1"));
|
|
|
if (ObjectUtil.isNotEmpty(prodProduction)){
|
|
|
ProdProductionThreshold prodProductionThreshold = prodProductionThresholdMapper.selectOne(new QueryWrapper<ProdProductionThreshold>().lambda().eq(ProdProductionThreshold::getFarmId,farmId));
|
|
|
if (ObjectUtil.isNotEmpty(prodProductionThreshold)){
|