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