|
@@ -41,12 +41,12 @@ public class SysDeptServiceImpl implements ISysDeptService
|
|
|
@Override
|
|
|
@DataScope(deptAlias = "d")
|
|
|
public List<SysDept> selectDeptList(SysDept dept) {
|
|
|
+ if(StringUtils.isNotEmpty(dept.getDeptName()) || StringUtils.isNotEmpty(dept.getStatus())) {
|
|
|
+ dept.setListByParentId(Boolean.TRUE);
|
|
|
+ return deptMapper.selectDeptList(dept);
|
|
|
+ }
|
|
|
Long id = dept.getId();
|
|
|
if(id == null) {
|
|
|
- if(StringUtils.isNotEmpty(dept.getDeptName()) || StringUtils.isNotEmpty(dept.getStatus())) {
|
|
|
- dept.setListByParentId(Boolean.TRUE);
|
|
|
- return deptMapper.selectDeptList(dept);
|
|
|
- }
|
|
|
dept.setListByParentId(Boolean.FALSE);
|
|
|
}else{
|
|
|
dept.setListByParentId(Boolean.TRUE);
|
|
@@ -75,6 +75,12 @@ public class SysDeptServiceImpl implements ISysDeptService
|
|
|
return depts;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ @DataScope(deptAlias = "d")
|
|
|
+ public List<SysDept> selectDepts(SysDept dept) {
|
|
|
+ return deptMapper.selectDeptList(dept);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 构建前端所需要树结构
|
|
|
*
|