Commit 6a7b4b64 by 徐高华

链接

parent 4f5f003f
......@@ -35,10 +35,12 @@ import com.gic.haoban.manage.service.dao.mapper.chat.GroupChatHmMapper;
import com.gic.haoban.manage.service.dao.mapper.chat.GroupChatHmRelationMapper;
import com.gic.haoban.manage.service.dao.mapper.chat.GroupChatMapper;
import com.gic.haoban.manage.service.dao.mapper.hm.HmLinkChatMapper;
import com.gic.haoban.manage.service.dao.mapper.hm.HmLinkMapper;
import com.gic.haoban.manage.service.entity.chat.TabChatNotice;
import com.gic.haoban.manage.service.entity.chat.TabGroupChat;
import com.gic.haoban.manage.service.entity.chat.TabGroupChatHm;
import com.gic.haoban.manage.service.entity.chat.TabGroupChatHmRelation;
import com.gic.haoban.manage.service.entity.hm.TabHmLink;
import com.gic.haoban.manage.service.pojo.bo.chat.GroupChatHmBO;
import com.gic.haoban.manage.service.pojo.bo.chat.GroupChatHmRelationBO;
import com.gic.haoban.manage.service.service.SecretSettingService;
......@@ -73,19 +75,26 @@ public class GroupChatHmServiceImpl implements GroupChatHmService {
private ChatNoticeMapper chatNoticeMapper;
@Autowired
private HmLinkChatService hmLinkChatService;
@Autowired
private HmLinkMapper hmLinkMapper;
@Override
public Page<GroupChatHmBO> listPage(ChatHmSearchQDTO qdto, BasePageInfo basePageInfo) {
String wxEnterpriseId = qdto.getWxEnterpriseId();
String enterpriseId = qdto.getEnterpriseId();
Long linkId = qdto.getLinkId();
if (null != qdto.getLinkId()) {
if (null != linkId) {
// 查询链接下的关联的活码列表
List<HmLinkChatDTO> linkChatList = this.hmLinkChatMapper.listByLinkId(wxEnterpriseId, enterpriseId, linkId);
if (CollectionUtils.isEmpty(linkChatList)) {
return new Page<>();
}
List<Long> chatHmIdList = linkChatList.stream().map(o -> o.getChatHmId()).collect(Collectors.toList());
TabHmLink link = this.hmLinkMapper.selectById(linkId);
if (null == link) {
return new Page<>();
}
chatHmIdList.add(link.getOtherChatHmId()) ;
qdto.setChatHmIdList(chatHmIdList);
}
PageHelper.startPage(basePageInfo);
......
......@@ -54,7 +54,8 @@
and type in
<foreach collection="list" close=")" index="index" item="type" open="(" separator=",">
#{type}
</foreach> and status_flag = 0
</foreach>
and status_flag = 0
</update>
<select id="listAll" resultMap="result-map-tabHaobanChatNotice">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment