|
@@ -23,16 +23,16 @@ import java.util.stream.Collectors;
|
|
public class SysDeptRoleServiceImpl extends ServiceImpl<SysDeptRoleMapper, SysDeptRole> implements SysDeptRoleService {
|
|
public class SysDeptRoleServiceImpl extends ServiceImpl<SysDeptRoleMapper, SysDeptRole> implements SysDeptRoleService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public void saveDeptRole(Long deptId, List<Long> roleIds) {
|
|
|
|
- List<SysDeptRole> sysDeptRoles = roleIds.stream().map(roleId -> new SysDeptRole().setDeptId(deptId).setRoleId(roleId)).collect(Collectors.toList());
|
|
|
|
|
|
+ public void saveDeptRole(Long deptId, List<Long> roleIds, Long sysId) {
|
|
|
|
+ List<SysDeptRole> sysDeptRoles = roleIds.stream().map(roleId -> new SysDeptRole().setSysId(sysId).setDeptId(deptId).setRoleId(roleId)).collect(Collectors.toList());
|
|
saveBatch(sysDeptRoles);
|
|
saveBatch(sysDeptRoles);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
- public void updateDeptRole(Long deptId, List<Long> roleIds) {
|
|
|
|
|
|
+ public void updateDeptRole(Long deptId, List<Long> roleIds, Long sysId) {
|
|
removeDeptRoleById(deptId);
|
|
removeDeptRoleById(deptId);
|
|
- saveDeptRole(deptId, roleIds);
|
|
|
|
|
|
+ saveDeptRole(deptId, roleIds, sysId);
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|