mirror of https://gitee.com/stylefeng/roses
【7.0.2】规范角色绑定数据范围接口名称
parent
748454e4e2
commit
681d90e5b5
|
@ -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 {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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<ZTreeNode> layuiSelectParentMenuTreeList(@Validated(HrOrganizationRequest.orgZTree.class) HrOrganizationRequest hrOrganizationRequest) {
|
||||
@GetResource(name = "Layui版本--获取组织机构树(用于角色配置数据范围类型,并且数据范围类型是指定组织机构时)", path = "/hrOrganization/roleBindOrgScope")
|
||||
public List<ZTreeNode> 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<ZTreeNode> zTreeNodes = hrOrganizationService.orgZTree(hrOrganizationRequest, true);
|
||||
return new SuccessResponseData(zTreeNodes);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue