mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-20 02:08:15 +08:00
去除测试文件
This commit is contained in:
parent
e7e91ecd7b
commit
f8ef90ab98
@ -45,10 +45,6 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SysUserMapper userMapper;
|
private SysUserMapper userMapper;
|
||||||
|
|
||||||
//测试当前数据源
|
|
||||||
@Autowired
|
|
||||||
private DataSource dataSource;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询部门管理数据
|
* 查询部门管理数据
|
||||||
*
|
*
|
||||||
@ -58,10 +54,6 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
|
|||||||
@Override
|
@Override
|
||||||
@DataScope(deptAlias = "d")
|
@DataScope(deptAlias = "d")
|
||||||
public List<SysDept> selectDeptList(SysDept dept) {
|
public List<SysDept> selectDeptList(SysDept dept) {
|
||||||
DynamicRoutingDataSource ds = (DynamicRoutingDataSource) dataSource;
|
|
||||||
DataSource datasource=ds.determineDataSource();
|
|
||||||
String dataName = DynamicDataSourceContextHolder.peek();
|
|
||||||
log.info("--查询部门管理数据---当前数据源名称:"+dataName);
|
|
||||||
return baseMapper.selectDeptList(dept);
|
return baseMapper.selectDeptList(dept);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,10 +117,6 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
|
|||||||
@Override
|
@Override
|
||||||
@DS("slave")
|
@DS("slave")
|
||||||
public SysDept selectDeptById(Long deptId) {
|
public SysDept selectDeptById(Long deptId) {
|
||||||
DynamicRoutingDataSource ds = (DynamicRoutingDataSource) dataSource;
|
|
||||||
DataSource datasource=ds.determineDataSource();
|
|
||||||
String dataName = DynamicDataSourceContextHolder.peek();
|
|
||||||
log.info("mp内置方法--根据部门ID查询信息---当前数据源名称:"+dataName);
|
|
||||||
return getById(deptId);
|
return getById(deptId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -218,7 +206,6 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@DS("slave")
|
|
||||||
public int updateDept(SysDept dept) {
|
public int updateDept(SysDept dept) {
|
||||||
SysDept newParentDept = getById(dept.getParentId());
|
SysDept newParentDept = getById(dept.getParentId());
|
||||||
SysDept oldDept = getById(dept.getDeptId());
|
SysDept oldDept = getById(dept.getDeptId());
|
||||||
@ -228,8 +215,6 @@ public class SysDeptServiceImpl extends ServiceImpl<SysDeptMapper, SysDept> impl
|
|||||||
dept.setAncestors(newAncestors);
|
dept.setAncestors(newAncestors);
|
||||||
updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors);
|
updateDeptChildren(dept.getDeptId(), newAncestors, oldAncestors);
|
||||||
}
|
}
|
||||||
String dataName = DynamicDataSourceContextHolder.peek();
|
|
||||||
log.info("mp内置方法--修改保存部门信息---当前数据源名称:"+dataName);
|
|
||||||
int result = baseMapper.updateById(dept);
|
int result = baseMapper.updateById(dept);
|
||||||
if (UserConstants.DEPT_NORMAL.equals(dept.getStatus())) {
|
if (UserConstants.DEPT_NORMAL.equals(dept.getStatus())) {
|
||||||
// 如果该部门是启用状态,则启用该部门的所有上级部门
|
// 如果该部门是启用状态,则启用该部门的所有上级部门
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user