liuxm
2024-06-13 f823fa4a9283debfa7cb6d79fc1f3c7099f9b3ae
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
package com.dy.pmsBase.privilege;
 
import com.dy.common.aop.SsoPowerAop;
import com.dy.common.webUtil.BaseResponse;
import com.dy.common.webUtil.BaseResponseUtils;
import com.dy.common.webUtil.QueryResultVo;
import com.dy.pmsGlobal.aop.Log;
import com.dy.pmsGlobal.daoBa.BaPrivilegeMapper;
import com.dy.pmsGlobal.pojoBa.BaPrivilege;
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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import java.util.*;
import java.util.stream.Collectors;
 
/**
 * 权限管理
 */
@Slf4j
@RestController
@RequestMapping(path="pri")
@SuppressWarnings("unchecked")
public class PrivilegeCtrl {
    private PriSv sv;
    @Autowired
    public PrivilegeCtrl(PriSv sv){
        this.sv = sv;
    }
 
    /**
     * 分类型查询权限
     * @return
     */
    @GetMapping(path="getByType")
    @SsoPowerAop(power = "10100004")
    public BaseResponse<List<Map<String, Object>>> getByType(){
        return BaseResponseUtils.buildSuccess(sv.selectByType());
    }
 
    /**
     * 分页查询权限
     * @param vo
     * @return
     */
    @RequestMapping(path="some")
    @SsoPowerAop(power = "10100004")
    @Log("查询权限信息")
    public BaseResponse<QueryResultVo<List<BaPrivilege>>> some(@RequestBody QueryVo vo){
        return BaseResponseUtils.buildSuccess(sv.selectSome(vo));
    }
 
}