换水推送优化

This commit is contained in:
yiyan 2019-06-22 17:52:38 +08:00
parent 27f360947d
commit ea39e82549
1 changed files with 8 additions and 1 deletions

View File

@ -85,7 +85,13 @@ public class RemindJobImpl implements RemindJob {
boolean update = tmpPushRemindService.update(tblTmpPushRemind, new UpdateWrapper<TblTmpPushRemind>()
.eq("device_id", tblTmpPushRemind.getDeviceId())
.eq("user_id", tblTmpPushRemind.getUserId()));
log.info("update : " + update);
Integer deviceId = tblTmpPushRemind.getDeviceId();
TblDevice device = deviceService.getById(deviceId);
device.setRemindDate(instant.atZone(zoneId).toLocalDate());
boolean update1 = deviceService.updateById(device);
log.info("update-device : " + update1);
log.info("update-tmpPushRemind : " + update);
}
}
@ -112,6 +118,7 @@ public class RemindJobImpl implements RemindJob {
deviceUsers.forEach(deviceUser -> {
setPushList(pushList, deviceUser);
});
Date date = nextRemindDate(Integer.parseInt(tblDeviceHeaterDetail.getHeaterCycle()));
String nextRemindDate = IfishTaskUtil.format(date);
//更新下次提醒时间