|
@@ -33,6 +33,7 @@ import com.ym.mec.biz.dal.enums.*;
|
|
|
import com.ym.mec.biz.dal.enums.live.ELiveViewMode;
|
|
|
import com.ym.mec.biz.dal.page.LiveRoomGoodsOrderQueryInfo;
|
|
|
import com.ym.mec.biz.dal.vo.*;
|
|
|
+import com.ym.mec.biz.dal.wrapper.LiveRoomWrapper;
|
|
|
import com.ym.mec.biz.redisson.RedissonMessageService;
|
|
|
import com.ym.mec.biz.service.*;
|
|
|
import com.ym.mec.biz.service.im.ImGroupCoreService;
|
|
@@ -3178,6 +3179,34 @@ public class ImLiveBroadcastRoomServiceImpl extends ServiceImpl<ImLiveBroadcastR
|
|
|
return list.get(0);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public LiveRoomWrapper.LiveRoomCount queryRoomMemberCount(String roomUid) {
|
|
|
+ LiveRoomWrapper.LiveRoomCount liveRoomCount = new LiveRoomWrapper.LiveRoomCount();
|
|
|
+ liveRoomCount.setLookNum(0);
|
|
|
+ liveRoomCount.setTotalLookNum(0);
|
|
|
+ try {
|
|
|
+
|
|
|
+ List<TencentWrapper.ChatRoomGroupCounter> chatRoomGroupDefinedData = livePluginContext.getPluginService().getChatRoomGroupDefinedData(roomUid);
|
|
|
+ if (CollectionUtils.isNotEmpty(chatRoomGroupDefinedData)) {
|
|
|
+ chatRoomGroupDefinedData.forEach(data -> {
|
|
|
+ switch (data.getKey()) {
|
|
|
+ case "MEMBER_TOTAL":
|
|
|
+ liveRoomCount.setTotalLookNum(Integer.parseInt(data.getValue()));
|
|
|
+ break;
|
|
|
+ case "MEMBER_ONLINE":
|
|
|
+ liveRoomCount.setLookNum(Integer.parseInt(data.getValue()));
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("获取直播群配置失败", e);
|
|
|
+ }
|
|
|
+ return liveRoomCount;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 查询直播间所有用户信息
|