Преглед изворни кода

fix(屏蔽禁用设备预警函数下部分代码,防止redis报错): 屏蔽禁用设备预警函数下部分代码,防止redis报错

屏蔽禁用设备预警函数下部分代码,防止redis报错
zjian пре 1 месец
родитељ
комит
6617a0b098

+ 2 - 2
snowy-plugin/snowy-plugin-coldchain/src/main/java/vip/xiaonuo/coldchain/core/alarm/service/delay/DeviceAlertDelayController.java

@@ -23,7 +23,7 @@ public class DeviceAlertDelayController {
      */
     @PostMapping("/{deviceId}")
     public CommonResult<String> disableDeviceAlert(@PathVariable String deviceId, @RequestParam(defaultValue = "1") long hours) {
-        hours = 5 / 60;
+//        hours = 5 / 60;
         delayService.disableDeviceAlert(deviceId, hours);
         return CommonResult.data(String.format("设备[%s] 预警已禁用 %d 小时", deviceId, hours));
     }
@@ -35,7 +35,7 @@ public class DeviceAlertDelayController {
      */
     @PostMapping("/{deviceId}/channel/{channelNo}")
     public CommonResult<String> disableChannelAlert(@PathVariable String deviceId, @PathVariable int channelNo, @RequestParam(defaultValue = "1") long hours) {
-        hours = 5 / 60;
+//        hours = 5 / 60;
         delayService.disableChannelAlert(deviceId, channelNo, hours);
         return CommonResult.data(String.format("设备[%s] 第[%d]路预警已禁用 %d 小时", deviceId, channelNo, hours));
     }