From 681d90e5b578e8a4d955d4202c8f94e5d7eb346a Mon Sep 17 00:00:00 2001 From: fengshuonan Date: Sat, 20 Mar 2021 11:33:21 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=907.0.2=E3=80=91=E8=A7=84=E8=8C=83?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E7=BB=91=E5=AE=9A=E6=95=B0=E6=8D=AE=E8=8C=83?= =?UTF-8?q?=E5=9B=B4=E6=8E=A5=E5=8F=A3=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pojo/organization/HrOrganizationRequest.java | 8 ++++---- .../controller/HrOrganizationController.java | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/api/pojo/organization/HrOrganizationRequest.java b/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/api/pojo/organization/HrOrganizationRequest.java index 1f7deff6e..73251c786 100644 --- a/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/api/pojo/organization/HrOrganizationRequest.java +++ b/kernel-s-system/system-api/src/main/java/cn/stylefeng/roses/kernel/system/api/pojo/organization/HrOrganizationRequest.java @@ -77,25 +77,25 @@ public class HrOrganizationRequest extends BaseRequest { /** * 角色id */ - @NotNull(message = "角色id不能为空", groups = orgZTree.class) + @NotNull(message = "角色id不能为空", groups = roleBindOrgScope.class) private Long roleId; /** * 用户id(作为查询条件) */ - @NotNull(message = "用户id不能为空", groups = userOrgScopeQuery.class) + @NotNull(message = "用户id不能为空", groups = userBindOrgScope.class) private Long userId; /** * 组织机构树zTree形式 */ - public @interface orgZTree { + public @interface roleBindOrgScope { } /** * 查询用户的数据范围 */ - public @interface userOrgScopeQuery { + public @interface userBindOrgScope { } } diff --git a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/HrOrganizationController.java b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/HrOrganizationController.java index 10bc0d740..bf6e1acfd 100644 --- a/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/HrOrganizationController.java +++ b/kernel-s-system/system-business-organization/src/main/java/cn/stylefeng/roses/kernel/system/modular/organization/controller/HrOrganizationController.java @@ -126,30 +126,30 @@ public class HrOrganizationController { * @author fengshuonan * @date 2021/3/19 22:20 */ - @GetResource(name = "获取组织机构树(用于用户绑定数据范围)", path = "/hrOrganization/treeOrgScope") - public ResponseData organizationTreeOrgScope(@Validated(value = HrOrganizationRequest.userOrgScopeQuery.class) HrOrganizationRequest hrOrganizationRequest) { + @GetResource(name = "获取组织机构树(用于用户绑定数据范围)", path = "/hrOrganization/userBindOrgScope") + public ResponseData userBindOrgScope(@Validated(HrOrganizationRequest.userBindOrgScope.class) HrOrganizationRequest hrOrganizationRequest) { return new SuccessResponseData(hrOrganizationService.organizationTree(hrOrganizationRequest)); } /** - * 获取组织机构树(用于角色配置数据范围类型,并且数据范围类型是指定组织机构时)(layui版本) + * Layui版本--获取组织机构树(用于角色配置数据范围类型,并且数据范围类型是指定组织机构时) * * @author fengshuonan * @date 2021/1/9 18:37 */ - @GetResource(name = "获取zTree形式的组织机构树(用于角色配置数据范围类型,并且数据范围类型是指定组织机构时)(layui版本)", path = "/hrOrganization/zTree") - public List layuiSelectParentMenuTreeList(@Validated(HrOrganizationRequest.orgZTree.class) HrOrganizationRequest hrOrganizationRequest) { + @GetResource(name = "Layui版本--获取组织机构树(用于角色配置数据范围类型,并且数据范围类型是指定组织机构时)", path = "/hrOrganization/roleBindOrgScope") + public List roleBindOrgScope(@Validated(HrOrganizationRequest.roleBindOrgScope.class) HrOrganizationRequest hrOrganizationRequest) { return hrOrganizationService.orgZTree(hrOrganizationRequest, false); } /** - * 获取组织机构树(用于角色配置数据范围类型,并且数据范围类型是指定组织机构时)(antd vue版本) + * AntdVue版本--获取组织机构树(用于角色配置数据范围类型,并且数据范围类型是指定组织机构时) * * @author fengshuonan * @date 2021/1/9 18:37 */ - @GetResource(name = "获取zTree形式的组织机构树(用于角色配置数据范围类型,并且数据范围类型是指定组织机构时)(antd vue版本)", path = "/hrOrganization/treeWithChildren") - public ResponseData treeWithChildren(@Validated(HrOrganizationRequest.orgZTree.class) HrOrganizationRequest hrOrganizationRequest) { + @GetResource(name = "AntdVue版本--获取组织机构树(用于角色配置数据范围类型,并且数据范围类型是指定组织机构时)", path = "/hrOrganization/roleBindOrgScopeAntdv") + public ResponseData roleBindOrgScopeAntdv(@Validated(HrOrganizationRequest.roleBindOrgScope.class) HrOrganizationRequest hrOrganizationRequest) { List zTreeNodes = hrOrganizationService.orgZTree(hrOrganizationRequest, true); return new SuccessResponseData(zTreeNodes); }