|
|
|
@ -190,7 +190,7 @@ public class SysUserService implements ISysUserService {
|
|
|
|
|
LOGGER.info("平台用户 SYS_USER departmentId:{}", departmentId);
|
|
|
|
|
LOGGER.info("平台用户 SYS_USER SessionUser:{}", user);
|
|
|
|
|
|
|
|
|
|
refUserDepartmentRDao.deleteByProperties("userId", sysUser.getId()); //删除用户部门关系
|
|
|
|
|
refUserDepartmentRDao.deleteByProperty("userId", sysUser.getId()); //删除用户部门关系
|
|
|
|
|
|
|
|
|
|
Department dep = departmentRDao.getById(Long.parseLong(departmentId));
|
|
|
|
|
if(dep != null ){
|
|
|
|
@ -224,7 +224,7 @@ public class SysUserService implements ISysUserService {
|
|
|
|
|
List<SysRole> list = sysRoleRDao.findByHqlWhere(where);
|
|
|
|
|
|
|
|
|
|
// 删除角色关系信息
|
|
|
|
|
refUserRoleRDao.deleteByProperties("userId", sysUser.getId()); // 删除用户角色关系
|
|
|
|
|
refUserRoleRDao.deleteByProperty("userId", sysUser.getId()); // 删除用户角色关系
|
|
|
|
|
|
|
|
|
|
if(null != list && list.size() > 0){
|
|
|
|
|
// 新增用户角色关系
|
|
|
|
@ -256,7 +256,7 @@ public class SysUserService implements ISysUserService {
|
|
|
|
|
Position pos = positionRDao.getById(Long.parseLong(positionId));
|
|
|
|
|
ValidatorBean.checkNotNull(pos);
|
|
|
|
|
|
|
|
|
|
refUserPositionRDao.deleteByProperties("userId", sysUser.getId()); //删除用户部门关系
|
|
|
|
|
refUserPositionRDao.deleteByProperty("userId", sysUser.getId()); //删除用户部门关系
|
|
|
|
|
|
|
|
|
|
RefUserPosition refUserPosition = new RefUserPosition(sysUser.getId(), pos.getId(), pos.getName());
|
|
|
|
|
refUserPositionRDao.insert(refUserPosition);
|
|
|
|
@ -272,9 +272,9 @@ public class SysUserService implements ISysUserService {
|
|
|
|
|
sysUserRDao.updateByProperties("id", id, "isValid", CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue());
|
|
|
|
|
|
|
|
|
|
// 删除用户关系(物理删除)
|
|
|
|
|
refUserRoleRDao.deleteByProperties("userId", Long.parseLong(id)); // 删除用户角色关系
|
|
|
|
|
refUserDepartmentRDao.deleteByProperties("userId", Long.parseLong(id)); //删除用户部门关系
|
|
|
|
|
refUserPositionRDao.deleteByProperties("userId", Long.parseLong(id)); //删除用户部门关系
|
|
|
|
|
refUserRoleRDao.deleteByProperty("userId", Long.parseLong(id)); // 删除用户角色关系
|
|
|
|
|
refUserDepartmentRDao.deleteByProperty("userId", Long.parseLong(id)); //删除用户部门关系
|
|
|
|
|
refUserPositionRDao.deleteByProperty("userId", Long.parseLong(id)); //删除用户部门关系
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|