|
@@ -641,9 +641,7 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherDao, Teacher> impleme
|
|
List<TeacherWrapper.CustomerServiceSendMsg2User> customerServiceSendMsg2User = new ArrayList<>();
|
|
List<TeacherWrapper.CustomerServiceSendMsg2User> customerServiceSendMsg2User = new ArrayList<>();
|
|
if (Boolean.TRUE.equals(customerService) && Boolean.FALSE.equals(teacherSubmitReq.getCustomerService())) {
|
|
if (Boolean.TRUE.equals(customerService) && Boolean.FALSE.equals(teacherSubmitReq.getCustomerService())) {
|
|
customerServiceSendMsg2User.addAll(transferFriendV2(teacher.getUserId(), true));
|
|
customerServiceSendMsg2User.addAll(transferFriendV2(teacher.getUserId(), true));
|
|
- this.update(null, new UpdateWrapper<Teacher>().lambda()
|
|
|
|
- .eq(Teacher::getCustomerId, teacherSubmitReq.getUserId())
|
|
|
|
- .set(Teacher::getCustomerId, null));
|
|
|
|
|
|
+ clearUserCustomerRelation(teacherSubmitReq.getUserId());
|
|
}
|
|
}
|
|
// 如果机构解绑,更新机构ID为-1
|
|
// 如果机构解绑,更新机构ID为-1
|
|
if (Boolean.TRUE.equals(teacherSubmitReq.getBindTenant())) {
|
|
if (Boolean.TRUE.equals(teacherSubmitReq.getBindTenant())) {
|
|
@@ -696,6 +694,16 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherDao, Teacher> impleme
|
|
return teacher;
|
|
return teacher;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ // 清除专属客服信息
|
|
|
|
+ private void clearUserCustomerRelation(Long userId) {
|
|
|
|
+ this.update(null, new UpdateWrapper<Teacher>().lambda()
|
|
|
|
+ .eq(Teacher::getCustomerId, userId)
|
|
|
|
+ .set(Teacher::getCustomerId, null));
|
|
|
|
+ studentService.update(null, new UpdateWrapper<Student>().lambda()
|
|
|
|
+ .eq(Student::getCustomerId, userId)
|
|
|
|
+ .set(Student::getCustomerId, null));
|
|
|
|
+ }
|
|
|
|
+
|
|
// 客服好友移交给其他客服
|
|
// 客服好友移交给其他客服
|
|
private List<TeacherWrapper.CustomerServiceSendMsg2User> transferFriend(Long userId, boolean saveGroupFriend) {
|
|
private List<TeacherWrapper.CustomerServiceSendMsg2User> transferFriend(Long userId, boolean saveGroupFriend) {
|
|
List<TeacherWrapper.CustomerServiceSendMsg2User> result = new ArrayList<>();
|
|
List<TeacherWrapper.CustomerServiceSendMsg2User> result = new ArrayList<>();
|
|
@@ -1633,9 +1641,7 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherDao, Teacher> impleme
|
|
Boolean customerService = teacher.getCustomerService();
|
|
Boolean customerService = teacher.getCustomerService();
|
|
if (UserLockFlag.NORMAL.equals(teacher.getLockFlag()) && Boolean.TRUE.equals(customerService)) {
|
|
if (UserLockFlag.NORMAL.equals(teacher.getLockFlag()) && Boolean.TRUE.equals(customerService)) {
|
|
List<TeacherWrapper.CustomerServiceSendMsg2User> customerServiceSendMsg2User = transferFriendV2(teacherId, false);
|
|
List<TeacherWrapper.CustomerServiceSendMsg2User> customerServiceSendMsg2User = transferFriendV2(teacherId, false);
|
|
- this.update(null, new UpdateWrapper<Teacher>().lambda()
|
|
|
|
- .eq(Teacher::getCustomerId, teacherId)
|
|
|
|
- .set(Teacher::getCustomerId, null));
|
|
|
|
|
|
+ clearUserCustomerRelation(teacherId);
|
|
for (TeacherWrapper.CustomerServiceSendMsg2User serviceSendMsg2User : customerServiceSendMsg2User) {
|
|
for (TeacherWrapper.CustomerServiceSendMsg2User serviceSendMsg2User : customerServiceSendMsg2User) {
|
|
String customerMessage = sysConfigService.findConfigValue(SysConfigConstant.CUSTOMER_SERVICE_ADD_MSG);
|
|
String customerMessage = sysConfigService.findConfigValue(SysConfigConstant.CUSTOMER_SERVICE_ADD_MSG);
|
|
String customerTitle = sysConfigService.findConfigValue(SysConfigConstant.CUSTOMER_SERVICE_ADD_MSG_TITLE);
|
|
String customerTitle = sysConfigService.findConfigValue(SysConfigConstant.CUSTOMER_SERVICE_ADD_MSG_TITLE);
|