提交修改
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.xinda.system.service;
|
||||
|
||||
import com.xinda.common.core.domain.TreeProSelect;
|
||||
import com.xinda.common.core.domain.TreeSelect;
|
||||
import com.xinda.common.core.domain.entity.SysDept;
|
||||
import com.xinda.common.core.domain.entity.SysRole;
|
||||
@@ -152,4 +153,6 @@ public interface ISysDeptService
|
||||
* @return java.lang.Long
|
||||
*/
|
||||
Long selectRoleIdByDeptId(Long deptId);
|
||||
|
||||
public List<TreeProSelect> selectDeptProTreeList(SysDept dept);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.xinda.system.service.impl;
|
||||
|
||||
import com.xinda.common.annotation.DataScope;
|
||||
import com.xinda.common.constant.UserConstants;
|
||||
import com.xinda.common.core.domain.TreeProSelect;
|
||||
import com.xinda.common.core.domain.TreeSelect;
|
||||
import com.xinda.common.core.domain.entity.SysDept;
|
||||
import com.xinda.common.core.domain.entity.SysRole;
|
||||
@@ -82,6 +83,13 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||
return buildDeptTreeSelect(depts);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TreeProSelect> selectDeptProTreeList(SysDept dept)
|
||||
{
|
||||
List<SysDept> depts = SpringUtils.getAopProxy(this).selectDeptList(dept);
|
||||
return buildDeptProTreeSelect(depts);
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建前端所需要树结构
|
||||
*
|
||||
@@ -122,6 +130,12 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||
return deptTrees.stream().map(TreeSelect::new).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
public List<TreeProSelect> buildDeptProTreeSelect(List<SysDept> depts)
|
||||
{
|
||||
List<SysDept> deptTrees = buildDeptTree(depts);
|
||||
return deptTrees.stream().map(TreeProSelect::new).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据角色ID查询部门树信息
|
||||
*
|
||||
@@ -142,7 +156,7 @@ public class SysDeptServiceImpl implements ISysDeptService
|
||||
* @param deptId 部门ID
|
||||
* @return 部门信息
|
||||
*/
|
||||
@Cacheable(value = "dept", key = "#root.methodName + '_' + #deptId", unless = "#result == null")
|
||||
// @Cacheable(value = "dept", key = "#root.methodName + '_' + #deptId", unless = "#result == null")
|
||||
@Override
|
||||
public SysDept selectDeptById(Long deptId)
|
||||
{
|
||||
|
||||
@@ -136,7 +136,7 @@ public class SysUserServiceImpl implements ISysUserService
|
||||
* @param userId 用户ID
|
||||
* @return 用户对象信息
|
||||
*/
|
||||
@Cacheable(value = "sysUser", key = "#root.methodName + '_' + #userId", unless = "#result == null")
|
||||
// @Cacheable(value = "sysUser", key = "#root.methodName + '_' + #userId", unless = "#result == null")
|
||||
@Override
|
||||
public SysUser selectUserById(Long userId)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user