cjl
2023-07-06 ef81d92b4012b4403ade0613250eca4447dc692a
补充提交
1 files added
57 ■■■■■ changed files
screen-manage/src/main/java/com/moral/api/controller/PubController.java 57 ●●●●● patch | view | raw | blame | history
screen-manage/src/main/java/com/moral/api/controller/PubController.java
New file
@@ -0,0 +1,57 @@
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.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.*;
/**
 * @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;
    @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();
    }
}