Commit 445c0771 by fengshuonan

修复用户详情,部门显示的问题

parent bd3c3d42
......@@ -343,11 +343,11 @@ public class ConstantFactory implements IConstantFactory {
if (userPosList != null && userPosList.size() > 0) {
for (UserPos userPos : userPosList) {
Position position = positionService.getById(userPos.getPosId());
positionNames.append(position.getName());
positionNames.append(",").append(position.getName());
}
}
return positionNames.toString();
return StrUtil.removePrefix(positionNames.toString(), ",");
}
......
......@@ -254,12 +254,12 @@ public class UserService extends ServiceImpl<UserMapper, User> {
User user = this.getById(userId);
Map<String, Object> map = UserFactory.removeUnSafeFields(user);
HashMap<Object, Object> hashMap = CollectionUtil.newHashMap();
HashMap<String, Object> hashMap = CollectionUtil.newHashMap();
hashMap.putAll(map);
hashMap.put("roleName", ConstantFactory.me().getRoleName(user.getRoleId()));
hashMap.put("deptName", ConstantFactory.me().getDeptName(user.getDeptId()));
return map;
return hashMap;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment