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)); 
 | 
    } 
 | 
  
 | 
} 
 |