@@ -75,6 +75,9 @@ public class ImUserFriendServiceImpl extends ServiceImpl<ImUserFriendDao, ImUser
@Override
@Transactional(rollbackFor = Exception.class)
public void saveUserFriend(Long teacherId, Set<Long> studentIds) {
+ if (CollectionUtils.isEmpty(studentIds)) {
+ return;
+ }
Date now = new Date();
//老师添加学员联系人
List<ImUserFriend> imUserFriends = new ArrayList<>();