Răsfoiți Sursa

fix(授权管理施工人员授权修改): 授权管理施工人员授权修改

授权管理施工人员授权修改
mazq 3 ani în urmă
părinte
comite
8de13ea377

+ 9 - 4
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/auth/RoleAuthInfoController.java

@@ -205,11 +205,14 @@ public class RoleAuthInfoController {
     @ApiImplicitParams({
             @ApiImplicitParam(name = "roleName", value = "角色名称"),
             @ApiImplicitParam(name = "userId", value = "用户id",required = true),
-            @ApiImplicitParam(name = "appName", value = "应用名称")
+            @ApiImplicitParam(name = "appName", value = "应用名称"),
+            @ApiImplicitParam(name = "orgId", value = "机构id",required = true)
     })
     @GetMapping(value = "/staffRoleList")
-    public Result<List<RoleInfoVO>> staffRoleList(@RequestParam(value = "roleName",required = false) String roleName,@RequestParam("userId") String userId,
-                                @RequestParam(value = "appName",required = false) String appName) {
+    public Result<List<RoleInfoVO>> staffRoleList(@RequestParam(value = "roleName",required = false) String roleName,
+                                                  @RequestParam("userId") String userId,
+                                @RequestParam(value = "appName",required = false) String appName,
+                                @RequestParam(value = "orgId",required = false) String orgId) {
         if (StringUtils.isBlank(userId)) {
             return Result.success(new ArrayList<RoleInfoVO>());
         }
@@ -221,6 +224,7 @@ public class RoleAuthInfoController {
         if (StringUtils.isNotEmpty(appName)) {
             roleSearchable.addSearchFilter("appName",SearchOperator.like,appName);
         }
+        roleSearchable.addSearchFilter("orgId", SearchOperator.eq, orgId);
         //TODO
         //DTO待设计
         List<RoleInfoVO> roleInfoVOList = roleInfoFacade.staffRoleList(roleSearchable.toSearchDTO());
@@ -305,9 +309,10 @@ public class RoleAuthInfoController {
     @PostMapping (value = "/staff")
     public Result saveStaff(@RequestBody StaffOperateVo staffOperateVo) {
         String userId = staffOperateVo.getUserId();
+        String orgId = staffOperateVo.getOrgId();
         String saveIds = JSON.toJSONString(staffOperateVo.getSaveIds());
         String deleteIds = JSON.toJSONString(staffOperateVo.getDeleteIds());
-        StaffAssignDTO staffAssignDTO=new StaffAssignDTO(userId, saveIds, deleteIds);
+        StaffAssignDTO staffAssignDTO=new StaffAssignDTO(userId, orgId, saveIds, deleteIds);
         ResponseStatus responseStatus = staffAssignAuthInfoFacade.saveStaff(staffAssignDTO);
         Result result = new Result(responseStatus.getStatusCode(),responseStatus.getMessage(),null,null);
         return result;

+ 2 - 0
src/main/java/com/dragoninfo/dcuc/authweb/restcontroller/auth/vo/StaffOperateVo.java

@@ -12,6 +12,8 @@ import java.util.List;
 public class StaffOperateVo {
     @ApiModelProperty(value = "人员id")
     private String userId;
+    @ApiModelProperty(value = "机构id")
+    private String orgId;
     @ApiModelProperty(value = "需要保存的角色信息")
     private List<RoleInfoVo> saveIds;
     @ApiModelProperty(value = "需要删除的角色信息")