Browse Source

1.去掉重复加好友

yuanliang 1 year ago
parent
commit
7ae01a3b5d

+ 8 - 8
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TeacherServiceImpl.java

@@ -493,14 +493,14 @@ public class TeacherServiceImpl extends ServiceImpl<TeacherDao, Teacher> impleme
             baseMapper.insert(teacher);
 
             // 机构老师与学生互加好友关系
-            if (Optional.ofNullable(teacher.getTenantId()).orElse(-1L) > 0) {
-                // 自动与机构老师成为好友
-                Set<Long> collect = studentService.lambdaQuery()
-                        .eq(Student::getTenantId, teacher.getTenantId()).list().stream()
-                        .map(Student::getUserId).collect(Collectors.toSet());
-
-                imUserFriendService.saveUserFriend(teacher.getUserId(), collect);
-            }
+//            if (Optional.ofNullable(teacher.getTenantId()).orElse(-1L) > 0) {
+//                // 自动与机构老师成为好友
+//                Set<Long> collect = studentService.lambdaQuery()
+//                        .eq(Student::getTenantId, teacher.getTenantId()).list().stream()
+//                        .map(Student::getUserId).collect(Collectors.toSet());
+//
+//                imUserFriendService.saveUserFriend(teacher.getUserId(), collect);
+//            }
 
             //插入老师账户表
             UserAccount oldAcc = userAccountService.getById(teacherSubmitReq.getUserId());