浏览代码

feature: 机构角色授权脚本添加

mazq 2 年之前
父节点
当前提交
9ea54091f5

+ 8 - 5
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/auth/AuthRoleOrgController.java

@@ -3,7 +3,6 @@ package com.dragoninfo.dcuc.authweb.restcontroller.auth;
 import com.dragoninfo.dcuc.auth.auth.facade.IAuthRoleOrgRelFacade;
 import com.dragoninfo.dcuc.auth.auth.facade.IAuthRoleOrgRelFacade;
 import com.dragoninfo.dcuc.auth.auth.vo.roleorgauth.RoleOrgAuthSaveVo;
 import com.dragoninfo.dcuc.auth.auth.vo.roleorgauth.RoleOrgAuthSaveVo;
 import com.dragoninfo.dcuc.auth.auth.vo.roleorgauth.RoleOrgAuthVo;
 import com.dragoninfo.dcuc.auth.auth.vo.roleorgauth.RoleOrgAuthVo;
-import com.dragoninfo.dcuc.common.utils.ResponseUtil;
 import com.dragoninfo.duceap.core.response.Result;
 import com.dragoninfo.duceap.core.response.Result;
 import com.dragonsoft.duceap.base.entity.http.ResponseStatus;
 import com.dragonsoft.duceap.base.entity.http.ResponseStatus;
 import com.dragonsoft.duceap.base.entity.search.SearchDTO;
 import com.dragonsoft.duceap.base.entity.search.SearchDTO;
@@ -12,10 +11,7 @@ import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.Page;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 
 import javax.validation.Valid;
 import javax.validation.Valid;
 import java.util.List;
 import java.util.List;
@@ -47,4 +43,11 @@ public class AuthRoleOrgController {
         return new Result<>(responseStatus.getStatusCode(), responseStatus.getMessage(), null, null);
         return new Result<>(responseStatus.getStatusCode(), responseStatus.getMessage(), null, null);
     }
     }
 
 
+    @ApiOperation(value = "获取已授权的角色id")
+    @GetMapping("auth-role-ids")
+    public Result<List<String>> getAuthRoleIds(@RequestParam("orgId") String orgId) {
+        List<String> authRoleIds = authRoleOrgRelFacade.getAuthRoleIds(orgId);
+        return Result.success(authRoleIds);
+    }
+
 }
 }