bug fix
This commit is contained in:
parent
3c0d9ab8b3
commit
22eea4c2f5
|
@ -15,6 +15,7 @@ import io.renren.modules.security.password.PasswordUtils;
|
|||
import io.renren.modules.security.user.SecurityUser;
|
||||
import io.renren.modules.security.user.UserDetail;
|
||||
import io.renren.modules.sys.dto.PasswordDTO;
|
||||
import io.renren.modules.sys.dto.SysDeptDTO;
|
||||
import io.renren.modules.sys.dto.SysUserDTO;
|
||||
import io.renren.modules.sys.excel.SysUserExcel;
|
||||
import io.renren.modules.sys.service.SysDeptService;
|
||||
|
@ -92,7 +93,10 @@ public class SysUserController {
|
|||
@ApiOperation("登录用户信息")
|
||||
public Result<SysUserDTO> info(){
|
||||
SysUserDTO data = ConvertUtils.sourceToTarget(SecurityUser.getUser(), SysUserDTO.class);
|
||||
data.setDeptName(sysDeptService.get(data.getDeptId()).getName());
|
||||
SysDeptDTO sysDeptDTO=sysDeptService.get(data.getDeptId());
|
||||
if(sysDeptDTO != null){
|
||||
data.setDeptName(sysDeptService.get(data.getDeptId()).getName());
|
||||
}
|
||||
data.setRoleIdList(sysRoleUserService.getRoleIdList(data.getId()));
|
||||
return new Result<SysUserDTO>().ok(data);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue