|
@@ -1032,7 +1032,8 @@ public class ImGroupServiceImpl extends BaseServiceImpl<String, ImGroup> impleme
|
|
|
username = Optional.ofNullable(user.getRealName()).filter(StringUtils::isNotBlank).orElse(username);
|
|
|
}
|
|
|
// 自动激活学生IM帐号
|
|
|
- imGroupCoreService.register(userId,clientType, username, sysUserService.getImAvatar(user));
|
|
|
+// imGroupCoreService.register(userId,clientType, username, sysUserService.getImAvatar(user));
|
|
|
+ imGroupCoreService.register(userId,clientType, username, avatar);
|
|
|
} catch (Exception e) {
|
|
|
log.error("register user error", e);
|
|
|
}
|
|
@@ -1068,7 +1069,11 @@ public class ImGroupServiceImpl extends BaseServiceImpl<String, ImGroup> impleme
|
|
|
SysConfig studentAvatar = sysConfigService.findByParamName(SysConfigService.STUDENT_DEFAULT_AVATAR);
|
|
|
while (!student.isEmpty()) {
|
|
|
for (String[] next : student) {
|
|
|
- register(next[0], next[1],studentAvatar.getParanValue());
|
|
|
+ String avatar = next[2];
|
|
|
+ if (StringUtils.isEmpty(avatar)) {
|
|
|
+ avatar = studentAvatar.getParanValue();
|
|
|
+ }
|
|
|
+ register(next[0], next[1], avatar);
|
|
|
}
|
|
|
count += student.size();
|
|
|
log.info("import im student success count:{}", count);
|
|
@@ -1084,7 +1089,11 @@ public class ImGroupServiceImpl extends BaseServiceImpl<String, ImGroup> impleme
|
|
|
List<String[]> staff = getStaff(page, rows);
|
|
|
while (!staff.isEmpty()) {
|
|
|
for (String[] next : staff) {
|
|
|
- register(next[0], next[1],staffAvatar.getParanValue());
|
|
|
+ String avatar = next[2];
|
|
|
+ if (StringUtils.isEmpty(avatar)) {
|
|
|
+ avatar = staffAvatar.getParanValue();
|
|
|
+ }
|
|
|
+ register(next[0], next[1], avatar);
|
|
|
}
|
|
|
count += staff.size();
|
|
|
log.info("import im staff success count:{}", count);
|
|
@@ -1100,7 +1109,11 @@ public class ImGroupServiceImpl extends BaseServiceImpl<String, ImGroup> impleme
|
|
|
List<String[]> emps = getEmp(page, rows);
|
|
|
while (!emps.isEmpty()) {
|
|
|
for (String[] next : emps) {
|
|
|
- register(next[0], next[1],empAvatar.getParanValue());
|
|
|
+ String avatar = next[2];
|
|
|
+ if (StringUtils.isEmpty(avatar)) {
|
|
|
+ avatar = empAvatar.getParanValue();
|
|
|
+ }
|
|
|
+ register(next[0], next[1], avatar);
|
|
|
}
|
|
|
count += emps.size();
|
|
|
log.info("import im emps success count:{}", count);
|
|
@@ -1115,7 +1128,11 @@ public class ImGroupServiceImpl extends BaseServiceImpl<String, ImGroup> impleme
|
|
|
List<String[]> teachers = getTeachers(page, rows);
|
|
|
while (!teachers.isEmpty()) {
|
|
|
for (String[] next : teachers) {
|
|
|
- register(next[0], next[1], teacherAvatar.getParanValue());
|
|
|
+ String avatar = next[2];
|
|
|
+ if (StringUtils.isEmpty(avatar)) {
|
|
|
+ avatar = teacherAvatar.getParanValue();
|
|
|
+ }
|
|
|
+ register(next[0], next[1], avatar);
|
|
|
}
|
|
|
count += teachers.size();
|
|
|
log.info("import im teacher success count:{}", count);
|
|
@@ -1138,9 +1155,10 @@ public class ImGroupServiceImpl extends BaseServiceImpl<String, ImGroup> impleme
|
|
|
queryInfo.setRows(rows);
|
|
|
PageInfo<Employee> employeePageInfo = employeeService.queryBaseInfoByPage(queryInfo);
|
|
|
return employeePageInfo.getRows().stream().map(next -> {
|
|
|
- String[] strList = new String[2];
|
|
|
+ String[] strList = new String[3];
|
|
|
strList[0] = next.getUserId().toString();
|
|
|
strList[1] = "SYSTEM";
|
|
|
+ strList[2] = next.getAvatar();
|
|
|
return strList;
|
|
|
}).collect(Collectors.toList());
|
|
|
}
|
|
@@ -1150,9 +1168,10 @@ public class ImGroupServiceImpl extends BaseServiceImpl<String, ImGroup> impleme
|
|
|
IPage<SchoolStaffWrapper.SchoolStaff> iPage = schoolStaffService.selectBaseInfoByPage(staffPage,
|
|
|
new SchoolStaffWrapper.SchoolStaffQuery());
|
|
|
return iPage.getRecords().stream().map(next -> {
|
|
|
- String[] strList = new String[2];
|
|
|
+ String[] strList = new String[3];
|
|
|
strList[0] = next.getUserId().toString();
|
|
|
strList[1] = "SCHOOL";
|
|
|
+ strList[2] = next.getAvatar();
|
|
|
return strList;
|
|
|
}).collect(Collectors.toList());
|
|
|
}
|
|
@@ -1163,9 +1182,10 @@ public class ImGroupServiceImpl extends BaseServiceImpl<String, ImGroup> impleme
|
|
|
queryInfo.setRows(rows);
|
|
|
PageInfo<Student> studentPageInfo = studentService.queryBaseInfoByPage(queryInfo);
|
|
|
return studentPageInfo.getRows().stream().map(next -> {
|
|
|
- String[] strList = new String[2];
|
|
|
+ String[] strList = new String[3];
|
|
|
strList[0] = next.getUserId().toString();
|
|
|
strList[1] = "STUDENT";
|
|
|
+ strList[2] = next.getAvatar();
|
|
|
return strList;
|
|
|
}).collect(Collectors.toList());
|
|
|
}
|
|
@@ -1176,9 +1196,10 @@ public class ImGroupServiceImpl extends BaseServiceImpl<String, ImGroup> impleme
|
|
|
queryInfo.setRows(rows);
|
|
|
PageInfo<Teacher> teacherPageInfo = teacherService.queryBaseInfoByPage(queryInfo);
|
|
|
return teacherPageInfo.getRows().stream().map(next -> {
|
|
|
- String[] strList = new String[2];
|
|
|
+ String[] strList = new String[3];
|
|
|
strList[0] = next.getId().toString();
|
|
|
strList[1] = "TEACHER";
|
|
|
+ strList[2] = next.getAvatar();
|
|
|
return strList;
|
|
|
}).collect(Collectors.toList());
|
|
|
}
|