mirror of
https://gitee.com/xiaonuobase/snowy.git
synced 2026-03-22 10:47:16 +08:00
【更新】机构大数据优化(待完善)
This commit is contained in:
@@ -29,7 +29,7 @@ export default {
|
|||||||
groupOwnUser(data) {
|
groupOwnUser(data) {
|
||||||
return request('ownUser', data, 'get')
|
return request('ownUser', data, 'get')
|
||||||
},
|
},
|
||||||
// 获取机构树(懒加载)
|
// 获取机构树选择器(懒加载)
|
||||||
groupOrgTreeLazySelector(data) {
|
groupOrgTreeLazySelector(data) {
|
||||||
return request('orgTreeSelector', data, 'get')
|
return request('orgTreeSelector', data, 'get')
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export default {
|
|||||||
userResetPassword(data) {
|
userResetPassword(data) {
|
||||||
return request('resetPassword', data)
|
return request('resetPassword', data)
|
||||||
},
|
},
|
||||||
// 获取组织选择器(懒加载)
|
// 获取机构树选择器(懒加载)
|
||||||
userOrgTreeLazySelector(data) {
|
userOrgTreeLazySelector(data) {
|
||||||
return request('orgTreeSelector', data, 'get')
|
return request('orgTreeSelector', data, 'get')
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export default {
|
|||||||
groupOwnUser(data) {
|
groupOwnUser(data) {
|
||||||
return request('ownUser', data, 'get')
|
return request('ownUser', data, 'get')
|
||||||
},
|
},
|
||||||
// 获取机构树(懒加载)
|
// 获取组织树选择器(懒加载)
|
||||||
groupOrgTreeLazySelector(data) {
|
groupOrgTreeLazySelector(data) {
|
||||||
return request('orgTreeSelector', data, 'get')
|
return request('orgTreeSelector', data, 'get')
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export default {
|
|||||||
roleGrantUser(data) {
|
roleGrantUser(data) {
|
||||||
return request('grantUser', data)
|
return request('grantUser', data)
|
||||||
},
|
},
|
||||||
// 获取机构树(懒加载)
|
// 获取组织树选择器(懒加载)
|
||||||
roleOrgTreeLazySelector(data) {
|
roleOrgTreeLazySelector(data) {
|
||||||
return request('orgTreeSelector', data, 'get')
|
return request('orgTreeSelector', data, 'get')
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export default {
|
|||||||
userResetPassword(data) {
|
userResetPassword(data) {
|
||||||
return request('resetPassword', data)
|
return request('resetPassword', data)
|
||||||
},
|
},
|
||||||
// 获取组织选择器(懒加载)
|
// 获取组织树选择器(懒加载)
|
||||||
userOrgTreeLazySelector(data) {
|
userOrgTreeLazySelector(data) {
|
||||||
return request('orgTreeSelector', data, 'get')
|
return request('orgTreeSelector', data, 'get')
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -50,12 +50,12 @@
|
|||||||
<a-form ref="searchFormRef" :model="searchFormState">
|
<a-form ref="searchFormRef" :model="searchFormState">
|
||||||
<a-row :gutter="10">
|
<a-row :gutter="10">
|
||||||
<a-col :xs="24" :sm="8" :md="8" :lg="0" :xl="0">
|
<a-col :xs="24" :sm="8" :md="8" :lg="0" :xl="0">
|
||||||
<a-form-item label="上级组织:" name="parentId">
|
<a-form-item label="组织:" name="parentId">
|
||||||
<a-tree-select
|
<a-tree-select
|
||||||
v-model:value="searchFormState.parentId"
|
v-model:value="searchFormState.parentId"
|
||||||
class="xn-wd"
|
class="xn-wd"
|
||||||
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
||||||
placeholder="请选择上级组织"
|
placeholder="请选择组织"
|
||||||
allow-clear
|
allow-clear
|
||||||
:tree-data="treeData"
|
:tree-data="treeData"
|
||||||
:field-names="treeSelectFieldNames"
|
:field-names="treeSelectFieldNames"
|
||||||
|
|||||||
@@ -43,20 +43,20 @@ public interface SysOrgApi {
|
|||||||
String getSupervisorIdByOrgId(String orgId);
|
String getSupervisorIdByOrgId(String orgId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取组织树选择器
|
* 获取组织树
|
||||||
*
|
*
|
||||||
* @author xuyuxiang
|
* @author xuyuxiang
|
||||||
* @date 2022/7/22 14:46
|
* @date 2022/7/22 14:46
|
||||||
**/
|
**/
|
||||||
List<Tree<String>> orgTreeSelector();
|
List<Tree<String>> orgTree();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取组织树选择器(懒加载)
|
* 获取组织树(懒加载)
|
||||||
*
|
*
|
||||||
* @author xuyuxiang
|
* @author xuyuxiang
|
||||||
* @date 2022/7/22 14:46
|
* @date 2022/7/22 14:46
|
||||||
**/
|
**/
|
||||||
List<JSONObject> orgTreeLazySelector(String parentId);
|
List<JSONObject> orgTreeLazy(String parentId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取组织列表选择器
|
* 获取组织列表选择器
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public class BizOrgApiProvider implements BizOrgApi {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Tree<String>> orgTreeSelector() {
|
public List<Tree<String>> orgTreeSelector() {
|
||||||
return bizOrgService.orgTreeSelector();
|
return bizOrgService.tree();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -38,6 +38,14 @@ public interface BizOrgService extends IService<BizOrg> {
|
|||||||
*/
|
*/
|
||||||
Page<BizOrg> page(BizOrgPageParam bizOrgPageParam);
|
Page<BizOrg> page(BizOrgPageParam bizOrgPageParam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取机构树
|
||||||
|
*
|
||||||
|
* @author xuyuxiang
|
||||||
|
* @date 2022/4/24 20:08
|
||||||
|
*/
|
||||||
|
List<Tree<String>> tree();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取机构树(懒加载)
|
* 获取机构树(懒加载)
|
||||||
*
|
*
|
||||||
@@ -150,14 +158,6 @@ public interface BizOrgService extends IService<BizOrg> {
|
|||||||
**/
|
**/
|
||||||
BizOrg getChildById(List<BizOrg> originDataList, String id);
|
BizOrg getChildById(List<BizOrg> originDataList, String id);
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取机构树选择器
|
|
||||||
*
|
|
||||||
* @author xuyuxiang
|
|
||||||
* @date 2022/4/24 20:08
|
|
||||||
*/
|
|
||||||
List<Tree<String>> orgTreeSelector();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取机构列表选择器
|
* 获取机构列表选择器
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -128,6 +128,33 @@ public class BizOrgServiceImpl extends ServiceImpl<BizOrgMapper, BizOrg> impleme
|
|||||||
return this.page(CommonPageRequest.defaultPage(), queryWrapper);
|
return this.page(CommonPageRequest.defaultPage(), queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Tree<String>> tree() {
|
||||||
|
LambdaQueryWrapper<BizOrg> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
// 校验数据范围
|
||||||
|
List<String> loginUserDataScope = StpLoginUserUtil.getLoginUserDataScope();
|
||||||
|
// 定义机构集合
|
||||||
|
Set<BizOrg> bizOrgSet = CollectionUtil.newHashSet();
|
||||||
|
if(loginUserDataScope != null && loginUserDataScope.isEmpty()) {
|
||||||
|
return CollectionUtil.newArrayList();
|
||||||
|
}
|
||||||
|
if(loginUserDataScope == null) {
|
||||||
|
// SCOPE_ALL:不做过滤,查询全部机构
|
||||||
|
} else {
|
||||||
|
// 获取所有机构
|
||||||
|
List<BizOrg> allOrgList = this.getAllOrgList();
|
||||||
|
loginUserDataScope.forEach(orgId -> bizOrgSet.addAll(this.getParentListById(allOrgList, orgId, true)));
|
||||||
|
List<String> loginUserDataScopeFullList = bizOrgSet.stream().map(BizOrg::getId).collect(Collectors.toList());
|
||||||
|
CommonSqlUtil.safeIn(lambdaQueryWrapper, BizOrg::getId, loginUserDataScopeFullList);
|
||||||
|
}
|
||||||
|
lambdaQueryWrapper.orderByAsc(BizOrg::getSortCode);
|
||||||
|
List<BizOrg> bizOrgList = this.list(lambdaQueryWrapper);
|
||||||
|
List<TreeNode<String>> treeNodeList = bizOrgList.stream().map(bizOrg ->
|
||||||
|
new TreeNode<>(bizOrg.getId(), bizOrg.getParentId(), bizOrg.getName(), bizOrg.getSortCode()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
return TreeUtil.build(treeNodeList, "0");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<JSONObject> treeLazy(BizOrgTreeLazyParam bizOrgTreeLazyParam) {
|
public List<JSONObject> treeLazy(BizOrgTreeLazyParam bizOrgTreeLazyParam) {
|
||||||
// searchKey不为null时,走全量搜索模式,返回嵌套树结构
|
// searchKey不为null时,走全量搜索模式,返回嵌套树结构
|
||||||
@@ -495,33 +522,6 @@ public class BizOrgServiceImpl extends ServiceImpl<BizOrgMapper, BizOrg> impleme
|
|||||||
|
|
||||||
/* ====机构部分所需要用到的选择器==== */
|
/* ====机构部分所需要用到的选择器==== */
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<Tree<String>> orgTreeSelector() {
|
|
||||||
LambdaQueryWrapper<BizOrg> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
||||||
// 校验数据范围
|
|
||||||
List<String> loginUserDataScope = StpLoginUserUtil.getLoginUserDataScope();
|
|
||||||
// 定义机构集合
|
|
||||||
Set<BizOrg> bizOrgSet = CollectionUtil.newHashSet();
|
|
||||||
if(loginUserDataScope != null && loginUserDataScope.isEmpty()) {
|
|
||||||
return CollectionUtil.newArrayList();
|
|
||||||
}
|
|
||||||
if(loginUserDataScope == null) {
|
|
||||||
// SCOPE_ALL:不做过滤,查询全部机构
|
|
||||||
} else {
|
|
||||||
// 获取所有机构
|
|
||||||
List<BizOrg> allOrgList = this.getAllOrgList();
|
|
||||||
loginUserDataScope.forEach(orgId -> bizOrgSet.addAll(this.getParentListById(allOrgList, orgId, true)));
|
|
||||||
List<String> loginUserDataScopeFullList = bizOrgSet.stream().map(BizOrg::getId).collect(Collectors.toList());
|
|
||||||
CommonSqlUtil.safeIn(lambdaQueryWrapper, BizOrg::getId, loginUserDataScopeFullList);
|
|
||||||
}
|
|
||||||
lambdaQueryWrapper.orderByAsc(BizOrg::getSortCode);
|
|
||||||
List<BizOrg> bizOrgList = this.list(lambdaQueryWrapper);
|
|
||||||
List<TreeNode<String>> treeNodeList = bizOrgList.stream().map(bizOrg ->
|
|
||||||
new TreeNode<>(bizOrg.getId(), bizOrg.getParentId(), bizOrg.getName(), bizOrg.getSortCode()))
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
return TreeUtil.build(treeNodeList, "0");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<BizOrg> orgListSelector(BizOrgSelectorOrgListParam bizOrgSelectorOrgListParam) {
|
public Page<BizOrg> orgListSelector(BizOrgSelectorOrgListParam bizOrgSelectorOrgListParam) {
|
||||||
QueryWrapper<BizOrg> queryWrapper = new QueryWrapper<BizOrg>().checkSqlInjection();
|
QueryWrapper<BizOrg> queryWrapper = new QueryWrapper<BizOrg>().checkSqlInjection();
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ public class DevConfigController {
|
|||||||
@Operation(summary = "获取机构选树")
|
@Operation(summary = "获取机构选树")
|
||||||
@GetMapping("/dev/config/orgTree")
|
@GetMapping("/dev/config/orgTree")
|
||||||
public CommonResult<List<Tree<String>>> orgTree() {
|
public CommonResult<List<Tree<String>>> orgTree() {
|
||||||
return CommonResult.data(sysOrgApi.orgTreeSelector());
|
return CommonResult.data(sysOrgApi.orgTree());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -210,7 +210,7 @@ public class DevConfigController {
|
|||||||
@Operation(summary = "获取机构选树(懒加载)")
|
@Operation(summary = "获取机构选树(懒加载)")
|
||||||
@GetMapping("/dev/config/orgTreeLazy")
|
@GetMapping("/dev/config/orgTreeLazy")
|
||||||
public CommonResult<List<JSONObject>> orgTreeLazy(String parentId) {
|
public CommonResult<List<JSONObject>> orgTreeLazy(String parentId) {
|
||||||
return CommonResult.data(sysOrgApi.orgTreeLazySelector(parentId));
|
return CommonResult.data(sysOrgApi.orgTreeLazy(parentId));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
* Copyright [2022] [https://www.xiaonuo.vip]
|
||||||
|
*
|
||||||
|
* Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
|
||||||
|
*
|
||||||
|
* 1.请不要删除和修改根目录下的LICENSE文件.
|
||||||
|
* 2.请不要删除和修改Snowy源码头部的版权声明.
|
||||||
|
* 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等.
|
||||||
|
* 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
|
||||||
|
* 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作.
|
||||||
|
* 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
|
||||||
|
*/
|
||||||
|
package vip.xiaonuo.dev.modular.config.param;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 组织树懒加载参数
|
||||||
|
*
|
||||||
|
* @author xuyuxiang
|
||||||
|
* @date 2022/4/21 16:13
|
||||||
|
**/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public class DevConfigSelectorOrgTreeLazyParam {
|
||||||
|
|
||||||
|
/** 父id */
|
||||||
|
@Schema(description = "父id")
|
||||||
|
private String parentId;
|
||||||
|
}
|
||||||
@@ -29,7 +29,7 @@ import vip.xiaonuo.common.pojo.CommonResult;
|
|||||||
import vip.xiaonuo.sys.modular.group.entity.SysGroup;
|
import vip.xiaonuo.sys.modular.group.entity.SysGroup;
|
||||||
import vip.xiaonuo.sys.modular.group.param.*;
|
import vip.xiaonuo.sys.modular.group.param.*;
|
||||||
import vip.xiaonuo.sys.modular.group.service.SysGroupService;
|
import vip.xiaonuo.sys.modular.group.service.SysGroupService;
|
||||||
import vip.xiaonuo.sys.modular.org.param.SysOrgTreeLazyParam;
|
import vip.xiaonuo.sys.modular.org.param.SysOrgSelectorTreeLazyParam;
|
||||||
import vip.xiaonuo.sys.modular.user.entity.SysUser;
|
import vip.xiaonuo.sys.modular.user.entity.SysUser;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -135,8 +135,8 @@ public class SysGroupController {
|
|||||||
*/
|
*/
|
||||||
@Operation(summary = "获取组织树选择器")
|
@Operation(summary = "获取组织树选择器")
|
||||||
@GetMapping("/sys/group/orgTreeSelector")
|
@GetMapping("/sys/group/orgTreeSelector")
|
||||||
public CommonResult<List<JSONObject>> orgTreeSelector(SysOrgTreeLazyParam sysOrgTreeLazyParam) {
|
public CommonResult<List<JSONObject>> orgTreeSelector(SysOrgSelectorTreeLazyParam sysOrgSelectorTreeLazyParam) {
|
||||||
return CommonResult.data(sysGroupService.orgTreeLazySelector(sysOrgTreeLazyParam));
|
return CommonResult.data(sysGroupService.orgTreeLazySelector(sysOrgSelectorTreeLazyParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import vip.xiaonuo.sys.modular.group.entity.SysGroup;
|
import vip.xiaonuo.sys.modular.group.entity.SysGroup;
|
||||||
import vip.xiaonuo.sys.modular.group.param.*;
|
import vip.xiaonuo.sys.modular.group.param.*;
|
||||||
import vip.xiaonuo.sys.modular.org.param.SysOrgTreeLazyParam;
|
import vip.xiaonuo.sys.modular.org.param.SysOrgSelectorTreeLazyParam;
|
||||||
import vip.xiaonuo.sys.modular.user.entity.SysUser;
|
import vip.xiaonuo.sys.modular.user.entity.SysUser;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -101,7 +101,7 @@ public interface SysGroupService extends IService<SysGroup> {
|
|||||||
* @author xuyuxiang
|
* @author xuyuxiang
|
||||||
* @date 2022/4/24 20:00
|
* @date 2022/4/24 20:00
|
||||||
*/
|
*/
|
||||||
List<JSONObject> orgTreeLazySelector(SysOrgTreeLazyParam sysOrgTreeLazyParam);
|
List<JSONObject> orgTreeLazySelector(SysOrgSelectorTreeLazyParam sysOrgSelectorTreeLazyParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户选择器
|
* 获取用户选择器
|
||||||
|
|||||||
@@ -38,9 +38,8 @@ import vip.xiaonuo.sys.modular.group.mapper.SysGroupMapper;
|
|||||||
import vip.xiaonuo.sys.modular.group.param.*;
|
import vip.xiaonuo.sys.modular.group.param.*;
|
||||||
import vip.xiaonuo.sys.modular.group.service.SysGroupService;
|
import vip.xiaonuo.sys.modular.group.service.SysGroupService;
|
||||||
import vip.xiaonuo.sys.modular.org.entity.SysOrg;
|
import vip.xiaonuo.sys.modular.org.entity.SysOrg;
|
||||||
import vip.xiaonuo.sys.modular.org.param.SysOrgTreeLazyParam;
|
import vip.xiaonuo.sys.modular.org.param.SysOrgSelectorTreeLazyParam;
|
||||||
import vip.xiaonuo.sys.modular.org.service.SysOrgService;
|
import vip.xiaonuo.sys.modular.org.service.SysOrgService;
|
||||||
import vip.xiaonuo.sys.modular.position.param.SysPositionIdParam;
|
|
||||||
import vip.xiaonuo.sys.modular.relation.entity.SysRelation;
|
import vip.xiaonuo.sys.modular.relation.entity.SysRelation;
|
||||||
import vip.xiaonuo.sys.modular.relation.enums.SysRelationCategoryEnum;
|
import vip.xiaonuo.sys.modular.relation.enums.SysRelationCategoryEnum;
|
||||||
import vip.xiaonuo.sys.modular.relation.service.SysRelationService;
|
import vip.xiaonuo.sys.modular.relation.service.SysRelationService;
|
||||||
@@ -147,8 +146,8 @@ public class SysGroupServiceImpl extends ServiceImpl<SysGroupMapper, SysGroup> i
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<JSONObject> orgTreeLazySelector(SysOrgTreeLazyParam sysOrgTreeLazyParam) {
|
public List<JSONObject> orgTreeLazySelector(SysOrgSelectorTreeLazyParam sysOrgSelectorTreeLazyParam) {
|
||||||
return sysOrgService.treeLazy(sysOrgTreeLazyParam);
|
return sysOrgService.treeLazy(sysOrgSelectorTreeLazyParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
*/
|
*/
|
||||||
package vip.xiaonuo.sys.modular.org.controller;
|
package vip.xiaonuo.sys.modular.org.controller;
|
||||||
|
|
||||||
import cn.hutool.core.lang.tree.Tree;
|
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.github.xingfudeshi.knife4j.annotations.ApiOperationSupport;
|
import com.github.xingfudeshi.knife4j.annotations.ApiOperationSupport;
|
||||||
@@ -74,8 +73,8 @@ public class SysOrgController {
|
|||||||
@ApiOperationSupport(order = 2)
|
@ApiOperationSupport(order = 2)
|
||||||
@Operation(summary = "获取组织树(懒加载)")
|
@Operation(summary = "获取组织树(懒加载)")
|
||||||
@GetMapping("/sys/org/tree")
|
@GetMapping("/sys/org/tree")
|
||||||
public CommonResult<List<JSONObject>> treeLazy(SysOrgTreeLazyParam sysOrgTreeLazyParam) {
|
public CommonResult<List<JSONObject>> treeLazy(SysOrgSelectorTreeLazyParam sysOrgSelectorTreeLazyParam) {
|
||||||
return CommonResult.data(sysOrgService.treeLazy(sysOrgTreeLazyParam));
|
return CommonResult.data(sysOrgService.treeLazy(sysOrgSelectorTreeLazyParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -163,8 +162,8 @@ public class SysOrgController {
|
|||||||
@ApiOperationSupport(order = 8)
|
@ApiOperationSupport(order = 8)
|
||||||
@Operation(summary = "获取组织树选择器(懒加载)")
|
@Operation(summary = "获取组织树选择器(懒加载)")
|
||||||
@GetMapping("/sys/org/orgTreeSelector")
|
@GetMapping("/sys/org/orgTreeSelector")
|
||||||
public CommonResult<List<JSONObject>> orgTreeLazySelector(SysOrgTreeLazyParam sysOrgTreeLazyParam) {
|
public CommonResult<List<JSONObject>> orgTreeLazySelector(SysOrgSelectorTreeLazyParam sysOrgSelectorTreeLazyParam) {
|
||||||
return CommonResult.data(sysOrgService.treeLazy(sysOrgTreeLazyParam));
|
return CommonResult.data(sysOrgService.treeLazy(sysOrgSelectorTreeLazyParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import lombok.Setter;
|
|||||||
**/
|
**/
|
||||||
@Getter
|
@Getter
|
||||||
@Setter
|
@Setter
|
||||||
public class SysOrgTreeLazyParam {
|
public class SysOrgSelectorTreeLazyParam {
|
||||||
|
|
||||||
/** 父id */
|
/** 父id */
|
||||||
@Schema(description = "父id")
|
@Schema(description = "父id")
|
||||||
@@ -23,7 +23,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import vip.xiaonuo.sys.api.SysOrgApi;
|
import vip.xiaonuo.sys.api.SysOrgApi;
|
||||||
import vip.xiaonuo.sys.modular.org.entity.SysOrg;
|
import vip.xiaonuo.sys.modular.org.entity.SysOrg;
|
||||||
import vip.xiaonuo.sys.modular.org.param.SysOrgSelectorOrgListParam;
|
import vip.xiaonuo.sys.modular.org.param.SysOrgSelectorOrgListParam;
|
||||||
import vip.xiaonuo.sys.modular.org.param.SysOrgTreeLazyParam;
|
import vip.xiaonuo.sys.modular.org.param.SysOrgSelectorTreeLazyParam;
|
||||||
import vip.xiaonuo.sys.modular.org.service.SysOrgService;
|
import vip.xiaonuo.sys.modular.org.service.SysOrgService;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -56,15 +56,15 @@ public class SysOrgApiProvider implements SysOrgApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Tree<String>> orgTreeSelector() {
|
public List<Tree<String>> orgTree() {
|
||||||
return sysOrgService.orgTreeSelector();
|
return sysOrgService.tree();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<JSONObject> orgTreeLazySelector(String parentId) {
|
public List<JSONObject> orgTreeLazy(String parentId) {
|
||||||
SysOrgTreeLazyParam sysOrgTreeLazyParam = new SysOrgTreeLazyParam();
|
SysOrgSelectorTreeLazyParam sysOrgSelectorTreeLazyParam = new SysOrgSelectorTreeLazyParam();
|
||||||
sysOrgTreeLazyParam.setParentId(parentId);
|
sysOrgSelectorTreeLazyParam.setParentId(parentId);
|
||||||
return sysOrgService.treeLazy(sysOrgTreeLazyParam);
|
return sysOrgService.treeLazy(sysOrgSelectorTreeLazyParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("ALL")
|
@SuppressWarnings("ALL")
|
||||||
|
|||||||
@@ -38,13 +38,21 @@ public interface SysOrgService extends IService<SysOrg> {
|
|||||||
*/
|
*/
|
||||||
Page<SysOrg> page(SysOrgPageParam sysOrgPageParam);
|
Page<SysOrg> page(SysOrgPageParam sysOrgPageParam);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取组织树
|
||||||
|
*
|
||||||
|
* @author xuyuxiang
|
||||||
|
* @date 2022/4/24 20:08
|
||||||
|
*/
|
||||||
|
List<Tree<String>> tree();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取机构树(懒加载),支持搜索
|
* 获取机构树(懒加载),支持搜索
|
||||||
*
|
*
|
||||||
* @author xuyuxiang
|
* @author xuyuxiang
|
||||||
* @date 2022/4/21 16:13
|
* @date 2022/4/21 16:13
|
||||||
**/
|
**/
|
||||||
List<JSONObject> treeLazy(SysOrgTreeLazyParam sysOrgTreeLazyParam);
|
List<JSONObject> treeLazy(SysOrgSelectorTreeLazyParam sysOrgSelectorTreeLazyParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加组织
|
* 添加组织
|
||||||
@@ -166,14 +174,6 @@ public interface SysOrgService extends IService<SysOrg> {
|
|||||||
**/
|
**/
|
||||||
SysOrg getChildById(List<SysOrg> originDataList, String id);
|
SysOrg getChildById(List<SysOrg> originDataList, String id);
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取组织树选择器
|
|
||||||
*
|
|
||||||
* @author xuyuxiang
|
|
||||||
* @date 2022/4/24 20:08
|
|
||||||
*/
|
|
||||||
List<Tree<String>> orgTreeSelector();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取组织列表选择器
|
* 获取组织列表选择器
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import vip.xiaonuo.auth.core.util.StpLoginUserUtil;
|
|
||||||
import vip.xiaonuo.common.cache.CommonCacheOperator;
|
import vip.xiaonuo.common.cache.CommonCacheOperator;
|
||||||
import vip.xiaonuo.common.enums.CommonSortOrderEnum;
|
import vip.xiaonuo.common.enums.CommonSortOrderEnum;
|
||||||
import vip.xiaonuo.common.exception.CommonException;
|
import vip.xiaonuo.common.exception.CommonException;
|
||||||
@@ -113,12 +112,21 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<JSONObject> treeLazy(SysOrgTreeLazyParam sysOrgTreeLazyParam) {
|
public List<Tree<String>> tree() {
|
||||||
|
List<SysOrg> sysOrgList = this.getAllOrgList();
|
||||||
|
List<TreeNode<String>> treeNodeList = sysOrgList.stream().map(sysOrg ->
|
||||||
|
new TreeNode<>(sysOrg.getId(), sysOrg.getParentId(), sysOrg.getName(), sysOrg.getSortCode()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
return TreeUtil.build(treeNodeList, "0");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<JSONObject> treeLazy(SysOrgSelectorTreeLazyParam sysOrgSelectorTreeLazyParam) {
|
||||||
// searchKey不为null时,走全量搜索模式,返回嵌套树结构
|
// searchKey不为null时,走全量搜索模式,返回嵌套树结构
|
||||||
if (sysOrgTreeLazyParam.getSearchKey() != null) {
|
if (sysOrgSelectorTreeLazyParam.getSearchKey() != null) {
|
||||||
return this.treeSearch(sysOrgTreeLazyParam.getSearchKey());
|
return this.treeSearch(sysOrgSelectorTreeLazyParam.getSearchKey());
|
||||||
}
|
}
|
||||||
String parentId = ObjectUtil.isNotEmpty(sysOrgTreeLazyParam.getParentId()) ? sysOrgTreeLazyParam.getParentId() : "0";
|
String parentId = ObjectUtil.isNotEmpty(sysOrgSelectorTreeLazyParam.getParentId()) ? sysOrgSelectorTreeLazyParam.getParentId() : "0";
|
||||||
// 超管接口,无需数据范围过滤,直接SQL查询当前父级下的子机构
|
// 超管接口,无需数据范围过滤,直接SQL查询当前父级下的子机构
|
||||||
List<SysOrg> childList = this.list(new LambdaQueryWrapper<SysOrg>()
|
List<SysOrg> childList = this.list(new LambdaQueryWrapper<SysOrg>()
|
||||||
.eq(SysOrg::getParentId, parentId)
|
.eq(SysOrg::getParentId, parentId)
|
||||||
@@ -429,15 +437,6 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
|
|||||||
|
|
||||||
/* ====组织部分所需要用到的选择器==== */
|
/* ====组织部分所需要用到的选择器==== */
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<Tree<String>> orgTreeSelector() {
|
|
||||||
List<SysOrg> sysOrgList = this.getAllOrgList();
|
|
||||||
List<TreeNode<String>> treeNodeList = sysOrgList.stream().map(sysOrg ->
|
|
||||||
new TreeNode<>(sysOrg.getId(), sysOrg.getParentId(), sysOrg.getName(), sysOrg.getSortCode()))
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
return TreeUtil.build(treeNodeList, "0");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<SysOrg> orgListSelector(SysOrgSelectorOrgListParam sysOrgSelectorOrgListParam) {
|
public Page<SysOrg> orgListSelector(SysOrgSelectorOrgListParam sysOrgSelectorOrgListParam) {
|
||||||
QueryWrapper<SysOrg> queryWrapper = new QueryWrapper<SysOrg>().checkSqlInjection();
|
QueryWrapper<SysOrg> queryWrapper = new QueryWrapper<SysOrg>().checkSqlInjection();
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
*/
|
*/
|
||||||
package vip.xiaonuo.sys.modular.position.controller;
|
package vip.xiaonuo.sys.modular.position.controller;
|
||||||
|
|
||||||
import cn.hutool.core.lang.tree.Tree;
|
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.github.xingfudeshi.knife4j.annotations.ApiOperationSupport;
|
import com.github.xingfudeshi.knife4j.annotations.ApiOperationSupport;
|
||||||
@@ -28,7 +27,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import vip.xiaonuo.common.annotation.CommonLog;
|
import vip.xiaonuo.common.annotation.CommonLog;
|
||||||
import vip.xiaonuo.common.pojo.CommonResult;
|
import vip.xiaonuo.common.pojo.CommonResult;
|
||||||
import vip.xiaonuo.sys.modular.org.param.SysOrgTreeLazyParam;
|
import vip.xiaonuo.sys.modular.org.param.SysOrgSelectorTreeLazyParam;
|
||||||
import vip.xiaonuo.sys.modular.position.entity.SysPosition;
|
import vip.xiaonuo.sys.modular.position.entity.SysPosition;
|
||||||
import vip.xiaonuo.sys.modular.position.param.*;
|
import vip.xiaonuo.sys.modular.position.param.*;
|
||||||
import vip.xiaonuo.sys.modular.position.service.SysPositionService;
|
import vip.xiaonuo.sys.modular.position.service.SysPositionService;
|
||||||
@@ -134,8 +133,8 @@ public class SysPositionController {
|
|||||||
@ApiOperationSupport(order = 6)
|
@ApiOperationSupport(order = 6)
|
||||||
@Operation(summary = "获取组织树选择器(懒加载)")
|
@Operation(summary = "获取组织树选择器(懒加载)")
|
||||||
@GetMapping("/sys/position/orgTreeSelector")
|
@GetMapping("/sys/position/orgTreeSelector")
|
||||||
public CommonResult<List<JSONObject>> orgTreeLazySelector(SysOrgTreeLazyParam sysOrgTreeLazyParam) {
|
public CommonResult<List<JSONObject>> orgTreeLazySelector(SysOrgSelectorTreeLazyParam sysOrgSelectorTreeLazyParam) {
|
||||||
return CommonResult.data(sysPositionService.orgTreeLazySelector(sysOrgTreeLazyParam));
|
return CommonResult.data(sysPositionService.orgTreeLazySelector(sysOrgSelectorTreeLazyParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import cn.hutool.core.lang.tree.Tree;
|
|||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import vip.xiaonuo.sys.modular.org.param.SysOrgTreeLazyParam;
|
import vip.xiaonuo.sys.modular.org.param.SysOrgSelectorTreeLazyParam;
|
||||||
import vip.xiaonuo.sys.modular.position.entity.SysPosition;
|
import vip.xiaonuo.sys.modular.position.entity.SysPosition;
|
||||||
import vip.xiaonuo.sys.modular.position.param.*;
|
import vip.xiaonuo.sys.modular.position.param.*;
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ public interface SysPositionService extends IService<SysPosition> {
|
|||||||
* @author xuyuxiang
|
* @author xuyuxiang
|
||||||
* @date 2022/4/22 15:53
|
* @date 2022/4/22 15:53
|
||||||
**/
|
**/
|
||||||
List<JSONObject> orgTreeLazySelector(SysOrgTreeLazyParam sysOrgTreeLazyParam);
|
List<JSONObject> orgTreeLazySelector(SysOrgSelectorTreeLazyParam sysOrgSelectorTreeLazyParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取职位选择器
|
* 获取职位选择器
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ import vip.xiaonuo.common.listener.CommonDataChangeEventCenter;
|
|||||||
import vip.xiaonuo.common.page.CommonPageRequest;
|
import vip.xiaonuo.common.page.CommonPageRequest;
|
||||||
import vip.xiaonuo.sys.core.enums.SysDataTypeEnum;
|
import vip.xiaonuo.sys.core.enums.SysDataTypeEnum;
|
||||||
import vip.xiaonuo.sys.modular.org.entity.SysOrg;
|
import vip.xiaonuo.sys.modular.org.entity.SysOrg;
|
||||||
import vip.xiaonuo.sys.modular.org.param.SysOrgTreeLazyParam;
|
import vip.xiaonuo.sys.modular.org.param.SysOrgSelectorTreeLazyParam;
|
||||||
import vip.xiaonuo.sys.modular.org.service.SysOrgService;
|
import vip.xiaonuo.sys.modular.org.service.SysOrgService;
|
||||||
import vip.xiaonuo.sys.modular.position.entity.SysPosition;
|
import vip.xiaonuo.sys.modular.position.entity.SysPosition;
|
||||||
import vip.xiaonuo.sys.modular.position.enums.SysPositionCategoryEnum;
|
import vip.xiaonuo.sys.modular.position.enums.SysPositionCategoryEnum;
|
||||||
@@ -202,8 +202,8 @@ public class SysPositionServiceImpl extends ServiceImpl<SysPositionMapper, SysPo
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<JSONObject> orgTreeLazySelector(SysOrgTreeLazyParam sysOrgTreeLazyParam) {
|
public List<JSONObject> orgTreeLazySelector(SysOrgSelectorTreeLazyParam sysOrgSelectorTreeLazyParam) {
|
||||||
return sysOrgService.treeLazy(sysOrgTreeLazyParam);
|
return sysOrgService.treeLazy(sysOrgSelectorTreeLazyParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
*/
|
*/
|
||||||
package vip.xiaonuo.sys.modular.role.controller;
|
package vip.xiaonuo.sys.modular.role.controller;
|
||||||
|
|
||||||
import cn.hutool.core.lang.tree.Tree;
|
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.github.xingfudeshi.knife4j.annotations.ApiOperationSupport;
|
import com.github.xingfudeshi.knife4j.annotations.ApiOperationSupport;
|
||||||
@@ -28,7 +27,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
import vip.xiaonuo.common.annotation.CommonLog;
|
import vip.xiaonuo.common.annotation.CommonLog;
|
||||||
import vip.xiaonuo.common.pojo.CommonResult;
|
import vip.xiaonuo.common.pojo.CommonResult;
|
||||||
import vip.xiaonuo.sys.modular.org.param.SysOrgTreeLazyParam;
|
import vip.xiaonuo.sys.modular.org.param.SysOrgSelectorTreeLazyParam;
|
||||||
import vip.xiaonuo.sys.modular.role.entity.SysRole;
|
import vip.xiaonuo.sys.modular.role.entity.SysRole;
|
||||||
import vip.xiaonuo.sys.modular.role.param.*;
|
import vip.xiaonuo.sys.modular.role.param.*;
|
||||||
import vip.xiaonuo.sys.modular.role.result.*;
|
import vip.xiaonuo.sys.modular.role.result.*;
|
||||||
@@ -249,8 +248,8 @@ public class SysRoleController {
|
|||||||
@ApiOperationSupport(order = 15)
|
@ApiOperationSupport(order = 15)
|
||||||
@Operation(summary = "获取组织树选择器(懒加载)")
|
@Operation(summary = "获取组织树选择器(懒加载)")
|
||||||
@GetMapping("/sys/role/orgTreeSelector")
|
@GetMapping("/sys/role/orgTreeSelector")
|
||||||
public CommonResult<List<JSONObject>> orgTreeLazySelector(SysOrgTreeLazyParam sysOrgTreeLazyParam) {
|
public CommonResult<List<JSONObject>> orgTreeLazySelector(SysOrgSelectorTreeLazyParam sysOrgSelectorTreeLazyParam) {
|
||||||
return CommonResult.data(sysRoleService.orgTreeLazySelector(sysOrgTreeLazyParam));
|
return CommonResult.data(sysRoleService.orgTreeLazySelector(sysOrgSelectorTreeLazyParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import cn.hutool.core.lang.tree.Tree;
|
|||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import vip.xiaonuo.sys.modular.org.param.SysOrgTreeLazyParam;
|
import vip.xiaonuo.sys.modular.org.param.SysOrgSelectorTreeLazyParam;
|
||||||
import vip.xiaonuo.sys.modular.resource.entity.SysMenu;
|
import vip.xiaonuo.sys.modular.resource.entity.SysMenu;
|
||||||
import vip.xiaonuo.sys.modular.role.entity.SysRole;
|
import vip.xiaonuo.sys.modular.role.entity.SysRole;
|
||||||
import vip.xiaonuo.sys.modular.role.param.*;
|
import vip.xiaonuo.sys.modular.role.param.*;
|
||||||
@@ -161,7 +161,7 @@ public interface SysRoleService extends IService<SysRole> {
|
|||||||
* @author xuyuxiang
|
* @author xuyuxiang
|
||||||
* @date 2022/4/24 20:00
|
* @date 2022/4/24 20:00
|
||||||
*/
|
*/
|
||||||
List<JSONObject> orgTreeLazySelector(SysOrgTreeLazyParam sysOrgTreeLazyParam);
|
List<JSONObject> orgTreeLazySelector(SysOrgSelectorTreeLazyParam sysOrgSelectorTreeLazyParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取资源授权树
|
* 获取资源授权树
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ import vip.xiaonuo.mobile.api.MobileMenuApi;
|
|||||||
import vip.xiaonuo.sys.core.enums.SysBuildInEnum;
|
import vip.xiaonuo.sys.core.enums.SysBuildInEnum;
|
||||||
import vip.xiaonuo.sys.core.enums.SysDataTypeEnum;
|
import vip.xiaonuo.sys.core.enums.SysDataTypeEnum;
|
||||||
import vip.xiaonuo.sys.modular.org.entity.SysOrg;
|
import vip.xiaonuo.sys.modular.org.entity.SysOrg;
|
||||||
import vip.xiaonuo.sys.modular.org.param.SysOrgTreeLazyParam;
|
import vip.xiaonuo.sys.modular.org.param.SysOrgSelectorTreeLazyParam;
|
||||||
import vip.xiaonuo.sys.modular.org.service.SysOrgService;
|
import vip.xiaonuo.sys.modular.org.service.SysOrgService;
|
||||||
import vip.xiaonuo.sys.modular.relation.entity.SysRelation;
|
import vip.xiaonuo.sys.modular.relation.entity.SysRelation;
|
||||||
import vip.xiaonuo.sys.modular.relation.enums.SysRelationCategoryEnum;
|
import vip.xiaonuo.sys.modular.relation.enums.SysRelationCategoryEnum;
|
||||||
@@ -359,8 +359,8 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<JSONObject> orgTreeLazySelector(SysOrgTreeLazyParam sysOrgTreeLazyParam) {
|
public List<JSONObject> orgTreeLazySelector(SysOrgSelectorTreeLazyParam sysOrgSelectorTreeLazyParam) {
|
||||||
return sysOrgService.treeLazy(sysOrgTreeLazyParam);
|
return sysOrgService.treeLazy(sysOrgSelectorTreeLazyParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -12,7 +12,6 @@
|
|||||||
*/
|
*/
|
||||||
package vip.xiaonuo.sys.modular.user.controller;
|
package vip.xiaonuo.sys.modular.user.controller;
|
||||||
|
|
||||||
import cn.hutool.core.lang.tree.Tree;
|
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.github.xingfudeshi.knife4j.annotations.ApiOperationSupport;
|
import com.github.xingfudeshi.knife4j.annotations.ApiOperationSupport;
|
||||||
@@ -31,7 +30,7 @@ import vip.xiaonuo.common.pojo.CommonResult;
|
|||||||
import vip.xiaonuo.sys.modular.org.entity.SysOrg;
|
import vip.xiaonuo.sys.modular.org.entity.SysOrg;
|
||||||
import vip.xiaonuo.sys.modular.position.entity.SysPosition;
|
import vip.xiaonuo.sys.modular.position.entity.SysPosition;
|
||||||
import vip.xiaonuo.sys.modular.role.entity.SysRole;
|
import vip.xiaonuo.sys.modular.role.entity.SysRole;
|
||||||
import vip.xiaonuo.sys.modular.org.param.SysOrgTreeLazyParam;
|
import vip.xiaonuo.sys.modular.org.param.SysOrgSelectorTreeLazyParam;
|
||||||
import vip.xiaonuo.sys.modular.user.entity.SysUser;
|
import vip.xiaonuo.sys.modular.user.entity.SysUser;
|
||||||
import vip.xiaonuo.sys.modular.user.enums.SysUserSourceFromTypeEnum;
|
import vip.xiaonuo.sys.modular.user.enums.SysUserSourceFromTypeEnum;
|
||||||
import vip.xiaonuo.sys.modular.user.param.*;
|
import vip.xiaonuo.sys.modular.user.param.*;
|
||||||
@@ -326,8 +325,8 @@ public class SysUserController {
|
|||||||
@ApiOperationSupport(order = 19)
|
@ApiOperationSupport(order = 19)
|
||||||
@Operation(summary = "获取组织树选择器(懒加载)")
|
@Operation(summary = "获取组织树选择器(懒加载)")
|
||||||
@GetMapping("/sys/user/orgTreeSelector")
|
@GetMapping("/sys/user/orgTreeSelector")
|
||||||
public CommonResult<List<JSONObject>> orgTreeLazySelector(SysOrgTreeLazyParam sysOrgTreeLazyParam) {
|
public CommonResult<List<JSONObject>> orgTreeLazySelector(SysOrgSelectorTreeLazyParam sysOrgSelectorTreeLazyParam) {
|
||||||
return CommonResult.data(sysUserService.orgTreeLazySelector(sysOrgTreeLazyParam));
|
return CommonResult.data(sysUserService.orgTreeLazySelector(sysOrgSelectorTreeLazyParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import vip.xiaonuo.sys.modular.group.entity.SysGroup;
|
|||||||
import vip.xiaonuo.sys.modular.org.entity.SysOrg;
|
import vip.xiaonuo.sys.modular.org.entity.SysOrg;
|
||||||
import vip.xiaonuo.sys.modular.position.entity.SysPosition;
|
import vip.xiaonuo.sys.modular.position.entity.SysPosition;
|
||||||
import vip.xiaonuo.sys.modular.role.entity.SysRole;
|
import vip.xiaonuo.sys.modular.role.entity.SysRole;
|
||||||
import vip.xiaonuo.sys.modular.org.param.SysOrgTreeLazyParam;
|
import vip.xiaonuo.sys.modular.org.param.SysOrgSelectorTreeLazyParam;
|
||||||
import vip.xiaonuo.sys.modular.user.entity.SysUser;
|
import vip.xiaonuo.sys.modular.user.entity.SysUser;
|
||||||
import vip.xiaonuo.sys.modular.user.entity.SysUserExt;
|
import vip.xiaonuo.sys.modular.user.entity.SysUserExt;
|
||||||
import vip.xiaonuo.sys.modular.user.param.*;
|
import vip.xiaonuo.sys.modular.user.param.*;
|
||||||
@@ -487,7 +487,7 @@ public interface SysUserService extends IService<SysUser> {
|
|||||||
* @author xuyuxiang
|
* @author xuyuxiang
|
||||||
* @date 2022/5/13 21:00
|
* @date 2022/5/13 21:00
|
||||||
*/
|
*/
|
||||||
List<JSONObject> orgTreeLazySelector(SysOrgTreeLazyParam sysOrgTreeLazyParam);
|
List<JSONObject> orgTreeLazySelector(SysOrgSelectorTreeLazyParam sysOrgSelectorTreeLazyParam);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取组织列表选择器
|
* 获取组织列表选择器
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ import vip.xiaonuo.sys.core.util.SysPasswordUtl;
|
|||||||
import vip.xiaonuo.sys.modular.group.entity.SysGroup;
|
import vip.xiaonuo.sys.modular.group.entity.SysGroup;
|
||||||
import vip.xiaonuo.sys.modular.group.service.SysGroupService;
|
import vip.xiaonuo.sys.modular.group.service.SysGroupService;
|
||||||
import vip.xiaonuo.sys.modular.org.entity.SysOrg;
|
import vip.xiaonuo.sys.modular.org.entity.SysOrg;
|
||||||
import vip.xiaonuo.sys.modular.org.param.SysOrgTreeLazyParam;
|
import vip.xiaonuo.sys.modular.org.param.SysOrgSelectorTreeLazyParam;
|
||||||
import vip.xiaonuo.sys.modular.org.service.SysOrgService;
|
import vip.xiaonuo.sys.modular.org.service.SysOrgService;
|
||||||
import vip.xiaonuo.sys.modular.position.entity.SysPosition;
|
import vip.xiaonuo.sys.modular.position.entity.SysPosition;
|
||||||
import vip.xiaonuo.sys.modular.position.service.SysPositionService;
|
import vip.xiaonuo.sys.modular.position.service.SysPositionService;
|
||||||
@@ -2010,8 +2010,8 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<JSONObject> orgTreeLazySelector(SysOrgTreeLazyParam sysOrgTreeLazyParam) {
|
public List<JSONObject> orgTreeLazySelector(SysOrgSelectorTreeLazyParam sysOrgSelectorTreeLazyParam) {
|
||||||
return sysOrgService.treeLazy(sysOrgTreeLazyParam);
|
return sysOrgService.treeLazy(sysOrgSelectorTreeLazyParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user