Commit c3c545d0 by 汪志阳

fix:模拟时间

parent a6a112b6
...@@ -10,7 +10,6 @@ import com.makeit.common.response.ApiResponseEntity; ...@@ -10,7 +10,6 @@ import com.makeit.common.response.ApiResponseEntity;
import com.makeit.common.response.ApiResponseUtils; import com.makeit.common.response.ApiResponseUtils;
import com.makeit.dto.platform.alarm.PlatAlarmRecordQueryDTO; import com.makeit.dto.platform.alarm.PlatAlarmRecordQueryDTO;
import com.makeit.enums.report.PlatformTypeEnum; import com.makeit.enums.report.PlatformTypeEnum;
import com.makeit.global.annotation.AuthIgnore;
import com.makeit.service.platform.alarm.PlatAlarmRecordService; import com.makeit.service.platform.alarm.PlatAlarmRecordService;
import com.makeit.utils.user.common.CommonUserUtil; import com.makeit.utils.user.common.CommonUserUtil;
import com.makeit.vo.platform.alarm.PlatAlarmRecordVO; import com.makeit.vo.platform.alarm.PlatAlarmRecordVO;
...@@ -34,7 +33,7 @@ public class PlatAlarmRecordWechatController { ...@@ -34,7 +33,7 @@ public class PlatAlarmRecordWechatController {
@ApiOperation("列表") @ApiOperation("列表")
@PostMapping("page") @PostMapping("page")
@AuthIgnore // @AuthIgnore
public ApiResponseEntity<Map<String,Object>> page(@RequestBody PageReqDTO<PlatAlarmRecordQueryDTO> dto) { public ApiResponseEntity<Map<String,Object>> page(@RequestBody PageReqDTO<PlatAlarmRecordQueryDTO> dto) {
//小程序告警记录只看到发给自己的告警 //小程序告警记录只看到发给自己的告警
String userId = CommonUserUtil.getUserId(); String userId = CommonUserUtil.getUserId();
......
...@@ -165,7 +165,7 @@ public class OffBedAlarm implements IAlarm { ...@@ -165,7 +165,7 @@ public class OffBedAlarm implements IAlarm {
noticeAlarm(alarmRedisDTO, platAlarmCheckDTO, deviceId); noticeAlarm(alarmRedisDTO, platAlarmCheckDTO, deviceId);
return; return;
} }
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now().plusHours(12).plusMinutes(50);
LocalDateTime startLocalDteTime = LocalDateTime.of(LocalDate.now(), startTime); LocalDateTime startLocalDteTime = LocalDateTime.of(LocalDate.now(), startTime);
if (!isInTime) { if (!isInTime) {
long mills = Duration.between(startLocalDteTime, now).toMillis() / 1000; long mills = Duration.between(startLocalDteTime, now).toMillis() / 1000;
...@@ -218,7 +218,7 @@ public class OffBedAlarm implements IAlarm { ...@@ -218,7 +218,7 @@ public class OffBedAlarm implements IAlarm {
return; return;
} }
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now().plusHours(12).plusMinutes(50);
LocalTime localTime = LocalTime.now(); LocalTime localTime = LocalTime.now();
if (!isInTime && localTime.isAfter(startTime) && localTime.isBefore(endTime)) { if (!isInTime && localTime.isAfter(startTime) && localTime.isBefore(endTime)) {
long mills = Duration.between(startLocalDteTime, now).toMillis() / 1000; long mills = Duration.between(startLocalDteTime, now).toMillis() / 1000;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment