From 6344a8b6b7e2853dbfa9e6506ff2e17a31930297 Mon Sep 17 00:00:00 2001 From: cjl <276999030@qq.com> Date: Mon, 10 Jul 2023 14:17:40 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/cjl' into dev --- screen-manage/src/main/java/com/moral/api/controller/PubController.java | 73 ++++++++++++++++++++++++++++++++++++ 1 files changed, 73 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 new file mode 100644 index 0000000..128bf4a --- /dev/null +++ b/screen-manage/src/main/java/com/moral/api/controller/PubController.java @@ -0,0 +1,73 @@ +package com.moral.api.controller; + +import com.moral.api.pojo.dto.user.UserDTO; +import com.moral.api.pojo.dto.user.UserQueryDTO; +import com.moral.api.pojo.form.user.UserInsertForm; +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.UserService; +import com.moral.api.util.CacheUtils; +import com.moral.constant.ResponseCodeEnum; +import com.moral.constant.ResultMessage; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +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 + * @Description ������������ + * @Author ��������� + * @Date 2021/3/22 13:52 + * @Version TODO + **/ +@Slf4j +@Api(tags = {"������������"}) +@RestController +@RequestMapping("/pub") +public class PubController { + @Autowired + private CacheUtils cacheUtils; + @Resource + private DeviceAdjustValueService deviceAdjustValueService; + + @GetMapping("deviceAlarmInfo") + @ApiOperation(value = "������������", notes = "������������") + @ApiImplicitParams(value = { + @ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String") + }) + public ResultMessage refreshDeviceAlarmInfo() { + cacheUtils.refreshDeviceAlarmInfo(); + + return new ResultMessage(); + } + + @GetMapping("sensor") + @ApiOperation(value = "sensor������", notes = "sensor������") + @ApiImplicitParams(value = { + @ApiImplicitParam(name = "token", value = "token", required = true, paramType = "header", dataType = "String") + }) + public ResultMessage sensor() { + cacheUtils.refreshSensor(); + 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(); + } + +} -- Gitblit v1.8.0