|
@@ -2,6 +2,7 @@ package com.ym.mec.biz.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.ym.mec.biz.dal.dao.LiveGoodsMapperDao;
|
|
|
+import com.ym.mec.biz.dal.dto.LiveGoodsMapperDto;
|
|
|
import com.ym.mec.biz.dal.entity.ImLiveBroadcastRoom;
|
|
|
import com.ym.mec.biz.dal.entity.LiveGoods;
|
|
|
import com.ym.mec.biz.dal.entity.LiveGoodsMapper;
|
|
@@ -62,12 +63,12 @@ public class LiveGoodsMapperServiceImpl extends BaseServiceImpl<Integer, LiveGoo
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public PageInfo<LiveGoods> queryGoodsPage(LiveGoodsMapperQueryInfo queryInfo) {
|
|
|
- PageInfo<LiveGoods> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
|
|
|
+ public PageInfo<LiveGoodsMapperDto> queryGoodsPage(LiveGoodsMapperQueryInfo queryInfo) {
|
|
|
+ PageInfo<LiveGoodsMapperDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
|
|
|
Map<String, Object> params = new HashMap<String, Object>();
|
|
|
MapUtil.populateMap(params, queryInfo);
|
|
|
|
|
|
- List<LiveGoods> dataList = null;
|
|
|
+ List<LiveGoodsMapperDto> dataList = null;
|
|
|
int count = liveGoodsMapperDao.countLiveGoods(params);
|
|
|
if (count > 0) {
|
|
|
pageInfo.setTotal(count);
|
|
@@ -81,13 +82,18 @@ public class LiveGoodsMapperServiceImpl extends BaseServiceImpl<Integer, LiveGoo
|
|
|
return pageInfo;
|
|
|
}
|
|
|
|
|
|
- private void publishRoomMsg(ImLiveBroadcastRoom imLiveBroadcastRoom) {
|
|
|
+ @Override
|
|
|
+ public List<LiveGoodsMapperDto> getLiveGoodsList(String liveId, Integer liveGoodsId, Boolean status) {
|
|
|
+ return liveGoodsMapperDao.getLiveGoodsList(liveId,liveGoodsId,status);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void publishRoomMsg(ImLiveBroadcastRoom imLiveBroadcastRoom) {
|
|
|
ImRoomMessage message = new ImRoomMessage();
|
|
|
message.setIsIncludeSender(1);
|
|
|
message.setObjectName(ImRoomMessage.LIVE_GOODS_CHANGE);
|
|
|
message.setToChatroomId(imLiveBroadcastRoom.getRoomUid());
|
|
|
message.setFromUserId(imLiveBroadcastRoom.getSpeakerId().toString());
|
|
|
- message.setContent(liveGoodsMapperDao.getLiveGoodsList(imLiveBroadcastRoom.getRoomUid()));
|
|
|
+ message.setContent(liveGoodsMapperDao.getLiveGoodsList(imLiveBroadcastRoom.getRoomUid(),null,true));
|
|
|
imFeignService.publishRoomMsg(message);
|
|
|
}
|
|
|
|