wanghong
2024-01-05 60c97371be338da5a707b4c6516e7a2dbe8ea2c9
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
package com.vci.ubcs.system.controller;
 
import com.vci.ubcs.system.entity.ClassifyAuth;
import com.vci.ubcs.system.entity.Menu;
import com.vci.ubcs.system.service.IClassifyAuthService;
import com.vci.ubcs.system.vo.ClassifyAuthVO;
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import org.springblade.core.tenant.annotation.NonDS;
import org.springblade.core.tool.api.R;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
 
import java.util.List;
import java.util.Map;
 
/**
 * 分类授权
 * @author ludc
 * @date 2023/12/20 11:33
 */
@NonDS
@RestController
@AllArgsConstructor
@RequestMapping("/classifyAuth")
@ApiIgnore
@Api(value = "分类授权", tags = "接口")
public class ClassifyAuthController {
 
    private final IClassifyAuthService classifyAuthService;
 
    /**
     * 分类授权保存接口
     * @param classifyAuthList
     * @return
     */
    @PostMapping("/saveOrUpdate")
    public R saveOrUpdate(@RequestBody List<ClassifyAuth> classifyAuthList) {
        return classifyAuthService.submit(classifyAuthList);
    }
 
    /**
     * 获取分类授权集合
     * @param classifyAuthVO
     * @return
     */
    @GetMapping("/list")
    public R<List<ClassifyAuthVO>> getClassifyAuthList(ClassifyAuthVO classifyAuthVO) {
        return R.data(classifyAuthService.getClassifyAuthList(classifyAuthVO));
    }
 
    /**
     * 查询该分类下,当前登录的角色有哪些按钮权限
     * @param classifyId
     * @return
     */
    @GetMapping("/getAuthButtonList")
    public R<Map<String,Boolean>> getAuthButtonList(@RequestParam("classifyId") String classifyId){
        return R.data(classifyAuthService.getAuthButtonList(classifyId));
    }
 
}