|
@@ -10,6 +10,7 @@ import com.yonge.cooleshow.biz.dal.dto.search.StudentSearch;
|
|
|
import com.yonge.cooleshow.biz.dal.entity.StudentTotal;
|
|
|
import com.yonge.cooleshow.biz.dal.entity.Subject;
|
|
|
import com.yonge.cooleshow.biz.dal.entity.UserBindingTeacher;
|
|
|
+import com.yonge.cooleshow.biz.dal.service.ImUserFriendService;
|
|
|
import com.yonge.cooleshow.common.enums.CacheNameEnum;
|
|
|
import com.yonge.cooleshow.biz.dal.service.StudentTotalService;
|
|
|
import com.yonge.cooleshow.biz.dal.vo.*;
|
|
@@ -35,6 +36,8 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme
|
|
|
@Autowired
|
|
|
private StudentTotalService totalService;
|
|
|
@Autowired
|
|
|
+ private ImUserFriendService imUserFriendService;
|
|
|
+ @Autowired
|
|
|
private UserBindingTeacherDao userBindingTeacherDao;
|
|
|
@Autowired
|
|
|
private StudentService studentService;
|
|
@@ -144,6 +147,11 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme
|
|
|
userBindingTeacher.setTeacherId(userId);
|
|
|
userBindingTeacher.setStudentId(studentVo.getUserId());
|
|
|
userBindingTeacherDao.insert(userBindingTeacher);
|
|
|
+
|
|
|
+ //学生老师增加好友关系
|
|
|
+ Set<Long> studentIds = new HashSet<>();
|
|
|
+ studentIds.add(studentVo.getUserId());
|
|
|
+ imUserFriendService.saveUserFriend(userId,studentIds);
|
|
|
}
|
|
|
resMap.put("now", detail);
|
|
|
return HttpResponseResult.succeed(resMap);
|