田源
2024-05-25 ba345976f0a6a67bcb20627e33251ded000a3d8f
Source/UBCS/ubcs-service/ubcs-system/src/main/java/com/vci/ubcs/system/controller/ClassifyAuthController.java
@@ -1,21 +1,23 @@
package com.vci.ubcs.system.controller;
import com.vci.ubcs.system.dto.ClassifyAuthDTO;
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.log.exception.ServiceException;
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 javax.validation.Valid;
import java.util.List;
import java.util.Map;
/**
 * 分类授权
 * 分类授权,数据授权
 * @author ludc
 * @date 2023/12/20 11:33
 */
@@ -31,12 +33,12 @@
   /**
    * 分类授权保存接口
    * @param classifyAuthList
    * @param classifyAuthListDTO
    * @return
    */
   @PostMapping("saveOrUpdate")
   public R saveOrUpdate(@RequestBody List<ClassifyAuth> classifyAuthList) {
      return classifyAuthService.submit(classifyAuthList);
   @PostMapping("/saveOrUpdate")
   public R saveOrUpdate(@RequestBody @Valid ClassifyAuthDTO classifyAuthListDTO) throws ServiceException {
      return classifyAuthService.submit(classifyAuthListDTO);
   }
   /**
@@ -44,7 +46,7 @@
    * @param classifyAuthVO
    * @return
    */
   @GetMapping("list")
   @GetMapping("/list")
   public R<List<ClassifyAuthVO>> getClassifyAuthList(ClassifyAuthVO classifyAuthVO) {
      return R.data(classifyAuthService.getClassifyAuthList(classifyAuthVO));
   }
@@ -52,11 +54,13 @@
   /**
    * 查询该分类下,当前登录的角色有哪些按钮权限
    * @param classifyId
    * @param menuCode
    * @param authType
    * @return
    */
   @GetMapping("getAuthButtonList")
   public R<Map<String,Boolean>> getAuthButtonList(String classifyId){
      return R.data(classifyAuthService.getAuthButtonList(classifyId));
   @GetMapping("/getAuthButtonList")
   public R<Map<String,Boolean>> getAuthButtonList(@Valid @RequestParam("classifyId") String classifyId,@Valid @RequestParam("code") String menuCode,@Valid @RequestParam("authType") String authType){
      return R.data(classifyAuthService.getAuthButtonList(classifyId,menuCode,authType));
   }
}