MrShi
2025-01-06 e1ec365640eefdcb06abb1d73da0d80367f79be3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
package com.doumee.cloud.web;
 
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.config.annotation.LoginNoRequired;
import com.doumee.core.annotation.trace.Trace;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.utils.Constants;
import com.doumee.dao.system.model.SystemDictData;
import com.doumee.dao.web.response.DeviceRoleVO;
import com.doumee.service.business.DeviceRoleService;
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.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.List;
 
/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Rk
 * @create 2023/12/7 10:40
 */
 
@Api(tags = "【公众号】其他")
@Trace(exclude = true)
@RestController
@LoginNoRequired
@RequestMapping(Constants.CLOUD_SERVICE_URL_INDEX+"/web/other")
@Slf4j
public class UnitWebController {
 
    @Autowired
    private SystemDictDataBiz systemDictDataBiz;
 
    @Autowired
    private DeviceRoleService deviceRoleService;
 
    @ApiOperation(value = "查询字典值数据", notes = "H5")
    @GetMapping("/getSystemDictData")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", dataType = "String", name = "label", value = "数据字典值", required = true),
            @ApiImplicitParam(paramType = "query", dataType = "String", name = "dictCode", value = "系统字典值", required = true)
    })
    public ApiResponse<SystemDictData> getSystemDictData(@RequestParam String dictCode, @RequestParam String label) {
        return ApiResponse.success("查询成功",systemDictDataBiz.queryByCode(dictCode,label));
    }
 
    @ApiOperation(value = "设备组列表", notes = "H5")
    @GetMapping("/deviceRoleList")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", dataType = "Integer", name = "type", value = "类型 0劳务访客 1普通访客 2内部人员", required = true)
    })
    public ApiResponse<List<DeviceRoleVO>> deviceRoleList(@RequestParam Integer type) {
        return ApiResponse.success("查询成功",deviceRoleService.findListByType(type));
    }
}