修改签名问题,index设置url
This commit is contained in:
parent
6dabeb436a
commit
06b5fc35da
@ -44,6 +44,7 @@ public class RouteController {
|
||||
} else {
|
||||
mv.addObject("oauthServer", systemProperties.getPortalUrl());
|
||||
}
|
||||
mv.addObject("url", systemProperties.getUrl());
|
||||
mv.addObject("ws", systemProperties.getWs());
|
||||
mv.addObject("title", systemProperties.getTitle());
|
||||
return mv;
|
||||
|
@ -50,34 +50,48 @@ public class UserImServiceImpl extends AbstractService implements IUserImService
|
||||
mine.setUsername(currentUser.getUserName());
|
||||
mine.setAvatar("assets/images/random-avatar1.jpg");
|
||||
mine.setStatus("online");
|
||||
mine.setSign("暂无简介");
|
||||
mine.setSign("暂无签名");
|
||||
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
|
||||
List<SuccessResultLayImData.Friend> friends = listDepartmentUser(params);
|
||||
// 非管理员添加系统管理员
|
||||
if(!StringUtils.equals(ISystemConstant.ADMIN, currentUser.getUserUsername())) {
|
||||
if (!StringUtils.equals(ISystemConstant.ADMIN, currentUser.getUserUsername())) {
|
||||
// 加载管理员
|
||||
SuccessResultLayImData.Friend adminFriend = new SuccessResultLayImData.Friend();
|
||||
adminFriend.setId("admin");
|
||||
adminFriend.setGroupname("管理员");
|
||||
SuccessResultLayImData.User user = new SuccessResultLayImData.User();
|
||||
user.setId("1");
|
||||
mine.setStatus("offline");
|
||||
user.setUsername("系统管理员");
|
||||
List<SuccessResultLayImData.User> users = new ArrayList<>();
|
||||
users.add(user);
|
||||
adminFriend.setList(users);
|
||||
friends.add(adminFriend);
|
||||
}
|
||||
for (SuccessResultLayImData.Friend friend : friends) {
|
||||
for (SuccessResultLayImData.User user : friend.getList()) {
|
||||
for (int i = 0; i < friends.size(); i++) {
|
||||
SuccessResultLayImData.Friend friend = friends.get(i);
|
||||
for (int j = 0; j < friend.getList().size(); j++) {
|
||||
SuccessResultLayImData.User user = friend.getList().get(j);
|
||||
// 删除自己
|
||||
if (StringUtils.equals(user.getId(), mine.getId())) {
|
||||
friend.getList().remove(j);
|
||||
j--;
|
||||
continue;
|
||||
}
|
||||
if (StringUtils.isBlank(user.getAvatar())) {
|
||||
user.setAvatar("assets/images/random-avatar1.jpg");
|
||||
} else {
|
||||
user.setAvatar(apiPathProperties.getUserCenter() + "/route/file/downloadfile/true/" + user.getAvatar());
|
||||
}
|
||||
user.setStatus("online");
|
||||
user.setSign("暂无简介");
|
||||
user.setStatus("offline");
|
||||
user.setSign("暂无签名");
|
||||
}
|
||||
// 删除用户为空的朋友组
|
||||
if (friend.getList().isEmpty()) {
|
||||
friends.remove(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user