【7.0.2】规范角色绑定数据范围接口名称

pull/12/head
fengshuonan 2021-03-20 11:33:21 +08:00
parent 748454e4e2
commit 681d90e5b5
2 changed files with 12 additions and 12 deletions

View File

@ -77,25 +77,25 @@ public class HrOrganizationRequest extends BaseRequest {
/** /**
* id * id
*/ */
@NotNull(message = "角色id不能为空", groups = orgZTree.class) @NotNull(message = "角色id不能为空", groups = roleBindOrgScope.class)
private Long roleId; private Long roleId;
/** /**
* id * id
*/ */
@NotNull(message = "用户id不能为空", groups = userOrgScopeQuery.class) @NotNull(message = "用户id不能为空", groups = userBindOrgScope.class)
private Long userId; private Long userId;
/** /**
* zTree * zTree
*/ */
public @interface orgZTree { public @interface roleBindOrgScope {
} }
/** /**
* *
*/ */
public @interface userOrgScopeQuery { public @interface userBindOrgScope {
} }
} }

View File

@ -126,30 +126,30 @@ public class HrOrganizationController {
* @author fengshuonan * @author fengshuonan
* @date 2021/3/19 22:20 * @date 2021/3/19 22:20
*/ */
@GetResource(name = "获取组织机构树(用于用户绑定数据范围)", path = "/hrOrganization/treeOrgScope") @GetResource(name = "获取组织机构树(用于用户绑定数据范围)", path = "/hrOrganization/userBindOrgScope")
public ResponseData organizationTreeOrgScope(@Validated(value = HrOrganizationRequest.userOrgScopeQuery.class) HrOrganizationRequest hrOrganizationRequest) { public ResponseData userBindOrgScope(@Validated(HrOrganizationRequest.userBindOrgScope.class) HrOrganizationRequest hrOrganizationRequest) {
return new SuccessResponseData(hrOrganizationService.organizationTree(hrOrganizationRequest)); return new SuccessResponseData(hrOrganizationService.organizationTree(hrOrganizationRequest));
} }
/** /**
* layui * Layui--
* *
* @author fengshuonan * @author fengshuonan
* @date 2021/1/9 18:37 * @date 2021/1/9 18:37
*/ */
@GetResource(name = "获取zTree形式的组织机构树(用于角色配置数据范围类型,并且数据范围类型是指定组织机构时)layui版本", path = "/hrOrganization/zTree") @GetResource(name = "Layui版本--获取组织机构树(用于角色配置数据范围类型,并且数据范围类型是指定组织机构时)", path = "/hrOrganization/roleBindOrgScope")
public List<ZTreeNode> layuiSelectParentMenuTreeList(@Validated(HrOrganizationRequest.orgZTree.class) HrOrganizationRequest hrOrganizationRequest) { public List<ZTreeNode> roleBindOrgScope(@Validated(HrOrganizationRequest.roleBindOrgScope.class) HrOrganizationRequest hrOrganizationRequest) {
return hrOrganizationService.orgZTree(hrOrganizationRequest, false); return hrOrganizationService.orgZTree(hrOrganizationRequest, false);
} }
/** /**
* antd vue * AntdVue--
* *
* @author fengshuonan * @author fengshuonan
* @date 2021/1/9 18:37 * @date 2021/1/9 18:37
*/ */
@GetResource(name = "获取zTree形式的组织机构树(用于角色配置数据范围类型,并且数据范围类型是指定组织机构时)antd vue版本", path = "/hrOrganization/treeWithChildren") @GetResource(name = "AntdVue版本--获取组织机构树(用于角色配置数据范围类型,并且数据范围类型是指定组织机构时)", path = "/hrOrganization/roleBindOrgScopeAntdv")
public ResponseData treeWithChildren(@Validated(HrOrganizationRequest.orgZTree.class) HrOrganizationRequest hrOrganizationRequest) { public ResponseData roleBindOrgScopeAntdv(@Validated(HrOrganizationRequest.roleBindOrgScope.class) HrOrganizationRequest hrOrganizationRequest) {
List<ZTreeNode> zTreeNodes = hrOrganizationService.orgZTree(hrOrganizationRequest, true); List<ZTreeNode> zTreeNodes = hrOrganizationService.orgZTree(hrOrganizationRequest, true);
return new SuccessResponseData(zTreeNodes); return new SuccessResponseData(zTreeNodes);
} }