|
@@ -92,7 +92,9 @@ public class UserController {
|
|
|
|
|
|
String username = userInfo.getUsername();
|
|
|
List<String> userTypes = Lists.newArrayList(userInfo.getUserType().split(","));
|
|
|
- if (userTypes.size() > 1 || userTypes.contains(ClientEnum.TEACHER.getCode())) {
|
|
|
+ if (userTypes.size() > 1
|
|
|
+ || userTypes.contains(ClientEnum.TEACHER.getCode())
|
|
|
+ || userTypes.contains(ClientEnum.SYSTEM.getCode())) {
|
|
|
username = Optional.ofNullable(userInfo.getRealName()).filter(StringUtils::isNotBlank).orElse(username);
|
|
|
}
|
|
|
|
|
@@ -130,7 +132,9 @@ public class UserController {
|
|
|
|
|
|
String username = userInfo.getUsername();
|
|
|
List<String> userTypes = Lists.newArrayList(userInfo.getUserType().split(","));
|
|
|
- if (userTypes.size() > 1 || userTypes.contains(ClientEnum.TEACHER.getCode())) {
|
|
|
+ if (userTypes.size() > 1
|
|
|
+ || userTypes.contains(ClientEnum.TEACHER.getCode())
|
|
|
+ || userTypes.contains(ClientEnum.SYSTEM.getCode())) {
|
|
|
username = Optional.ofNullable(userInfo.getRealName()).filter(StringUtils::isNotBlank).orElse(username);
|
|
|
}
|
|
|
|
|
@@ -164,7 +168,9 @@ public class UserController {
|
|
|
|
|
|
String username = userInfo.getUsername();
|
|
|
List<String> userTypes = Lists.newArrayList(userInfo.getUserType().split(","));
|
|
|
- if (userTypes.size() > 1 || userTypes.contains(ClientEnum.TEACHER.getCode())) {
|
|
|
+ if (userTypes.size() > 1
|
|
|
+ || userTypes.contains(ClientEnum.TEACHER.getCode())
|
|
|
+ || userTypes.contains(ClientEnum.SYSTEM.getCode())) {
|
|
|
username = Optional.ofNullable(userInfo.getRealName()).filter(StringUtils::isNotBlank).orElse(username);
|
|
|
}
|
|
|
|
|
@@ -173,7 +179,7 @@ public class UserController {
|
|
|
ImGroupWrapper.ImUserInfo register = imGroupCoreService.register(userModel.getId(), "",
|
|
|
username, sysUserService.getImAvatar(teacherDao.getUser(userInfo.getUserId().intValue())));
|
|
|
|
|
|
- log.info("update IM_USER register: {}", JSONObject.toJSONString(register));
|
|
|
+ log.info("update IM_USER userId={}, username={} register: {}", userModel.getId(), username, JSONObject.toJSONString(register));
|
|
|
} catch (Exception e) {
|
|
|
log.error("更新注册IM用户信息", e);
|
|
|
}
|