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