危化品全生命周期管理后端
kongzy
2024-08-22 0c73654f55844e34772732914af8cc1e247aab63
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
package com.gkhy.hazmat.admin.controller.app;
 
import com.gkhy.hazmat.common.api.CommonResult;
import com.gkhy.hazmat.system.service.SysConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
@Api(tags = "APP系统配置前端控制器")
@RestController
@RequestMapping("/app/config")
public class AppConfigController {
    @Autowired
    private SysConfigService configService;
 
    @PreAuthorize("hasAnyAuthority('hazmat:manage:company','hazmat:manage:common')")
    @ApiOperation(value = "查询当前用户公司配置")
    @GetMapping(value = "/getConfigByUser")
    public CommonResult getConfigByUser(){
        return CommonResult.success(configService.getConfigByUser());
    }
}