Forráskód Böngészése

琴房课注册流程处理

yuanliang 11 hónapja
szülő
commit
dcedc7e3a8

+ 6 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/StudentServiceImpl.java

@@ -386,6 +386,12 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme
             studentIds.add(studentVo.getUserId());
             imUserFriendService.saveUserFriend(userId, studentIds, EImUserFriendSourceForm.TEACHER);
         }
+        Long customerId = studentVo.getCustomerId();
+        if (userId.equals(customerId)) {
+            Set<Long> studentIds = new HashSet<>();
+            studentIds.add(studentVo.getUserId());
+            imUserFriendService.saveUserFriend(userId, studentIds, EImUserFriendSourceForm.TEACHER);
+        }
         resMap.put("now", detail);
         return HttpResponseResult.succeed(resMap);
     }