feat:用户导出bug
This commit is contained in:
1 parent
d127f0be1e
commit
481e537d6c
3 files changed
+10
-11
No files matched your search
-3
@@ -88,9 +88,6 @@ public class SysDeptController {
|
||||
|
||||
/**
|
||||
* 返回树形菜单集合
|
||||
*
|
||||
* @param deptName 部门名称
|
||||
* @return 树形菜单
|
||||
*/
|
||||
@GetMapping(value = "/tree")
|
||||
public R getTree(String deptName, Long parentId) {
|
||||
|
||||
+3
-8
@@ -134,14 +134,9 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
|
||||
@Override
|
||||
public List<Tree<Long>> selectTree(String deptName, Long parentId) {
|
||||
List<SysDept> deptAllList = new ArrayList<>();
|
||||
if (ObjectUtil.isEmpty(parentId)) {
|
||||
// 查询全部部门
|
||||
deptAllList = deptMapper
|
||||
.selectList(Wrappers.<SysDept>lambdaQuery().like(StrUtil.isNotBlank(deptName), SysDept::getName, deptName));
|
||||
} else {
|
||||
deptAllList = listDescendant(parentId);
|
||||
}
|
||||
|
||||
// 查询全部部门
|
||||
LambdaQueryWrapper<SysDept> queryWrapper = Wrappers.<SysDept>lambdaQuery().like(StrUtil.isNotBlank(deptName), SysDept::getName, deptName);
|
||||
deptAllList = deptMapper.selectListByScope(queryWrapper, DataScope.of());
|
||||
// 查询数据权限内部门
|
||||
List<Long> deptOwnIdList = deptMapper
|
||||
.selectListByScope(
|
||||
|
||||
@@ -267,6 +267,7 @@
|
||||
FROM
|
||||
sys_user u
|
||||
LEFT JOIN sys_dept d ON d.dept_id = u.dept_id
|
||||
LEFT JOIN sys_user_role urole ON urole.user_id = u.user_id
|
||||
<where>
|
||||
u.del_flag = '0'
|
||||
<if test="query.username != null and query.username != ''">
|
||||
@@ -276,6 +277,12 @@
|
||||
<if test="query.deptId != null and query.deptId != ''">
|
||||
AND u.dept_id = #{query.deptId}
|
||||
</if>
|
||||
<if test="query.role != null and query.role.size() != 0">
|
||||
and urole.role_id IN
|
||||
<foreach collection="query.role" item="v" open="(" close=")" separator=",">
|
||||
#{v}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="query.deptIds != null and query.deptIds.size() != 0">
|
||||
<choose>
|
||||
<when test="query.isInclude != null and query.isInclude == true">
|
||||
|
||||
Reference in new issue
Block a user