修改签名问题,index设置url

This commit is contained in:
wanggeng888 2021-01-19 23:15:39 +08:00
parent 6dabeb436a
commit 06b5fc35da
2 changed files with 21 additions and 6 deletions

View File

@ -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;

View File

@ -50,7 +50,7 @@ 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);
@ -63,21 +63,35 @@ public class UserImServiceImpl extends AbstractService implements IUserImService
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--;
}
}