|
@@ -512,21 +512,6 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherDao, Teacher> impleme
|
|
|
|
|
|
imUserFriendService.saveUserFriend(teacher.getUserId(), collect);
|
|
|
|
|
|
- // 机构老师添加机构绑定记录
|
|
|
- addBindUnBindRecord(teacher.getUserId(),teacher.getTenantId(),true);
|
|
|
- sendBindUnBindSMS(teacher.getUserId(), teacherSubmitReq.getPhone(), MessageTypeEnum.TEACHER_BIND_TENANT, teacher.getTenantId());
|
|
|
- }
|
|
|
- // 与客服建立好友
|
|
|
- String customerService = customerServiceConfig.getCustomerService();
|
|
|
- if (StringUtils.isNotBlank(customerService)) {
|
|
|
- List<String> phones = Arrays.stream(customerService.split(",")).collect(Collectors.toList());
|
|
|
- Random rand = new Random();
|
|
|
- String mobile = phones.get(rand.nextInt(phones.size()));
|
|
|
- SysUser friend = sysUserMapper.findUserByPhone(mobile);
|
|
|
- if (friend != null) {
|
|
|
- imUserFriendService.registerUserBindCustomerService(teacher.getUserId(),
|
|
|
- Collections.singletonList(friend.getId()), ClientEnum.TEACHER);
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
return HttpResponseResult.succeed(true);
|
|
@@ -603,6 +588,22 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherDao, Teacher> impleme
|
|
|
userAccount.setUserId(teacherSubmitReq.getUserId());
|
|
|
userAccountService.save(userAccount);
|
|
|
}
|
|
|
+ // 机构老师添加机构绑定记录
|
|
|
+ addBindUnBindRecord(teacher.getUserId(),teacher.getTenantId(),true);
|
|
|
+ sendBindUnBindSMS(teacher.getUserId(), teacherSubmitReq.getPhone(), MessageTypeEnum.TEACHER_BIND_TENANT, teacher.getTenantId());
|
|
|
+
|
|
|
+ // 与客服建立好友
|
|
|
+ String customerService = customerServiceConfig.getCustomerService();
|
|
|
+ if (StringUtils.isNotBlank(customerService)) {
|
|
|
+ List<String> phones = Arrays.stream(customerService.split(",")).collect(Collectors.toList());
|
|
|
+ Random rand = new Random();
|
|
|
+ String mobile = phones.get(rand.nextInt(phones.size()));
|
|
|
+ SysUser friend = sysUserMapper.findUserByPhone(mobile);
|
|
|
+ if (friend != null) {
|
|
|
+ imUserFriendService.registerUserBindCustomerService(teacher.getUserId(),
|
|
|
+ Collections.singletonList(friend.getId()), ClientEnum.TEACHER);
|
|
|
+ }
|
|
|
+ }
|
|
|
} else {
|
|
|
// 如果机构解绑,更新机构ID为-1
|
|
|
if (Boolean.TRUE.equals(teacherSubmitReq.getBindTenant())) {
|