|
@@ -11,8 +11,10 @@ import com.ym.mec.biz.dal.dao.*;
|
|
import com.ym.mec.biz.dal.dto.ClassGroupStudentInfoDto;
|
|
import com.ym.mec.biz.dal.dto.ClassGroupStudentInfoDto;
|
|
import com.ym.mec.biz.dal.entity.*;
|
|
import com.ym.mec.biz.dal.entity.*;
|
|
import com.ym.mec.biz.dal.enums.GroupType;
|
|
import com.ym.mec.biz.dal.enums.GroupType;
|
|
|
|
+import com.ym.mec.biz.dal.wrapper.ImGroupWrapper;
|
|
import com.ym.mec.biz.service.TeacherService;
|
|
import com.ym.mec.biz.service.TeacherService;
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
import org.springframework.data.redis.core.RedisTemplate;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -203,6 +205,21 @@ public class ImUserFriendServiceImpl extends BaseServiceImpl<Long, ImUserFriend>
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 根据条件查询指定用户的好友列表
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public List<ImUserFriendDto> queryFriendListByUserId(ImGroupWrapper.ImQuery query) {
|
|
|
|
+ if (StringUtils.isNotBlank(query.getRoleType()) && StringUtils.isNotBlank(query.getMusicGroupId())) {
|
|
|
|
+ if (!query.getRoleType().equals("STUDENT")) {
|
|
|
|
+ return new ArrayList<>();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return imUserFriendDao.getFriendListByUserId(query);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
public List<ImUserFriend> saveImUserFriends(Set<Integer> studentIds,Set<Integer> teacherIds,GroupType groupType,String musicGroupId){
|
|
public List<ImUserFriend> saveImUserFriends(Set<Integer> studentIds,Set<Integer> teacherIds,GroupType groupType,String musicGroupId){
|
|
List<ImUserFriend> imUserFriends = new ArrayList<>();
|
|
List<ImUserFriend> imUserFriends = new ArrayList<>();
|
|
Set<Integer> educationIds = new HashSet<>();
|
|
Set<Integer> educationIds = new HashSet<>();
|