From f2f77f203fd6b054197ecaba0517a159e8b3ac8f Mon Sep 17 00:00:00 2001 From: cjl <276999030@qq.com> Date: Mon, 30 Oct 2023 15:48:24 +0800 Subject: [PATCH] fix:补偿0问题修改 --- screen-manage/src/main/java/com/moral/api/controller/PubController.java | 36 ++++++++++++++++++++++++++++++++++++ 1 files changed, 36 insertions(+), 0 deletions(-) diff --git a/screen-manage/src/main/java/com/moral/api/controller/PubController.java b/screen-manage/src/main/java/com/moral/api/controller/PubController.java index 76f4ded..8ab4929 100644 --- a/screen-manage/src/main/java/com/moral/api/controller/PubController.java +++ b/screen-manage/src/main/java/com/moral/api/controller/PubController.java @@ -6,6 +6,8 @@ import com.moral.api.pojo.form.user.UserQueryForm; import com.moral.api.pojo.form.user.UserUpdateForm; import com.moral.api.pojo.vo.user.UserQueryVO; +import com.moral.api.service.DeviceAdjustValueService; +import com.moral.api.service.DeviceService; import com.moral.api.service.UserService; import com.moral.api.util.CacheUtils; import com.moral.constant.ResponseCodeEnum; @@ -17,6 +19,9 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.Map; /** * @ClassName UserController @@ -32,6 +37,10 @@ public class PubController { @Autowired private CacheUtils cacheUtils; + @Autowired + private DeviceService deviceService; + @Resource + private DeviceAdjustValueService deviceAdjustValueService; @GetMapping("deviceAlarmInfo") @ApiOperation(value = "������������", notes = "������������") @@ -54,4 +63,31 @@ return new ResultMessage(); } + @GetMapping(value = "adjust") + @ApiOperation(value = "adjust������", notes = "adjust������") + @ApiImplicitParams(value = { + @ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String") + }) + public ResultMessage adjust() { + Map<String,Object> resultMap = deviceAdjustValueService.refreshRedis(); + return new ResultMessage(); + } + + @GetMapping(value = "device") + @ApiOperation(value = "redis������������device", notes = "redis������������device") + public ResultMessage device() { + deviceService.setRedisDevice(); + return new ResultMessage(); + } + + @GetMapping(value = "selectDeviceInfoById") + @ApiOperation(value = "������������", notes = "������������") + @ApiImplicitParams(value = { + @ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String") + }) + public ResultMessage selectDeviceInfoById(Integer mac) { + Map<String,Object> resultMap = deviceService.selectDeviceInfoById(mac); + return new ResultMessage(); + } + } -- Gitblit v1.8.0