Commit c8cfe78e by danmo

会话存档消息内容查询修改

1 parent 40dfd647
......@@ -20,7 +20,6 @@ public interface IWeChatContactMsgService extends IService<WeChatContactMsg> {
*/
List<WeChatContactMsg> queryList(WeChatContactMsg weChatContactMsg);
/**
* 外部联系人 会话列表
* @param fromId 消息发送人id
......
......@@ -36,10 +36,12 @@ public class WeChatContactMsgServiceImpl extends ServiceImpl<WeChatContactMsgMap
lqw.eq(WeChatContactMsg::getMsgId ,weChatContactMsg.getMsgId());
}
if (StringUtils.isNotBlank(weChatContactMsg.getFromId())){
lqw.eq(WeChatContactMsg::getFromId ,weChatContactMsg.getFromId());
lqw.and(wrapper -> wrapper.eq(WeChatContactMsg::getFromId ,weChatContactMsg.getFromId())
.or().eq(WeChatContactMsg::getToList,weChatContactMsg.getFromId()));
}
if (StringUtils.isNotBlank(weChatContactMsg.getToList())){
lqw.eq(WeChatContactMsg::getToList ,weChatContactMsg.getToList());
lqw.and(wrapper -> wrapper.eq(WeChatContactMsg::getFromId ,weChatContactMsg.getToList())
.or().eq(WeChatContactMsg::getToList,weChatContactMsg.getToList()));
}
if (StringUtils.isNotBlank(weChatContactMsg.getRoomId())){
lqw.eq(WeChatContactMsg::getRoomId ,weChatContactMsg.getRoomId());
......@@ -51,7 +53,8 @@ public class WeChatContactMsgServiceImpl extends ServiceImpl<WeChatContactMsgMap
lqw.eq(WeChatContactMsg::getMsgType ,weChatContactMsg.getMsgType());
}
if (weChatContactMsg.getMsgTime() != null){
lqw.eq(WeChatContactMsg::getMsgTime ,weChatContactMsg.getMsgTime());
lqw.and(wrapper -> wrapper.ge(WeChatContactMsg::getMsgTime,weChatContactMsg.getMsgTime())
.le(WeChatContactMsg::getMsgTime,weChatContactMsg.getMsgTime()));
}
if (StringUtils.isNotBlank(weChatContactMsg.getContact())){
lqw.like(WeChatContactMsg::getContact ,weChatContactMsg.getContact());
......
......@@ -20,6 +20,7 @@
<result property="updateTime" column="update_time"/>
</resultMap>
<sql id="chatSql">select msg_id, from_id, to_list as receiver, `action`, msg_time, msg_type,is_external, contact from we_chat_contact_msg</sql>
<select id="selectExternalChatList" resultType="com.linkwechat.wecom.domain.vo.WeChatContactMsgVo">
select t.*, wc.name, wc.avatar from
......@@ -132,6 +133,5 @@
AND date_format(t.msg_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
</if>
</where>
</select>
</mapper>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!