Commit 01478808 by 孙喜旺

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

1 parent a3a8f5da
...@@ -20,7 +20,6 @@ public interface IWeChatContactMsgService extends IService<WeChatContactMsg> { ...@@ -20,7 +20,6 @@ public interface IWeChatContactMsgService extends IService<WeChatContactMsg> {
*/ */
List<WeChatContactMsg> queryList(WeChatContactMsg weChatContactMsg); List<WeChatContactMsg> queryList(WeChatContactMsg weChatContactMsg);
/** /**
* 外部联系人 会话列表 * 外部联系人 会话列表
* @param fromId 消息发送人id * @param fromId 消息发送人id
......
...@@ -36,10 +36,12 @@ public class WeChatContactMsgServiceImpl extends ServiceImpl<WeChatContactMsgMap ...@@ -36,10 +36,12 @@ public class WeChatContactMsgServiceImpl extends ServiceImpl<WeChatContactMsgMap
lqw.eq(WeChatContactMsg::getMsgId ,weChatContactMsg.getMsgId()); lqw.eq(WeChatContactMsg::getMsgId ,weChatContactMsg.getMsgId());
} }
if (StringUtils.isNotBlank(weChatContactMsg.getFromId())){ 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())){ 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())){ if (StringUtils.isNotBlank(weChatContactMsg.getRoomId())){
lqw.eq(WeChatContactMsg::getRoomId ,weChatContactMsg.getRoomId()); lqw.eq(WeChatContactMsg::getRoomId ,weChatContactMsg.getRoomId());
...@@ -51,7 +53,8 @@ public class WeChatContactMsgServiceImpl extends ServiceImpl<WeChatContactMsgMap ...@@ -51,7 +53,8 @@ public class WeChatContactMsgServiceImpl extends ServiceImpl<WeChatContactMsgMap
lqw.eq(WeChatContactMsg::getMsgType ,weChatContactMsg.getMsgType()); lqw.eq(WeChatContactMsg::getMsgType ,weChatContactMsg.getMsgType());
} }
if (weChatContactMsg.getMsgTime() != null){ 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())){ if (StringUtils.isNotBlank(weChatContactMsg.getContact())){
lqw.like(WeChatContactMsg::getContact ,weChatContactMsg.getContact()); lqw.like(WeChatContactMsg::getContact ,weChatContactMsg.getContact());
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
<result property="updateTime" column="update_time"/> <result property="updateTime" column="update_time"/>
</resultMap> </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 id="selectExternalChatList" resultType="com.linkwechat.wecom.domain.vo.WeChatContactMsgVo">
select t.*, wc.name, wc.avatar from select t.*, wc.name, wc.avatar from
...@@ -132,6 +133,5 @@ ...@@ -132,6 +133,5 @@
AND date_format(t.msg_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d') AND date_format(t.msg_time,'%y%m%d') &lt;= date_format(#{endTime},'%y%m%d')
</if> </if>
</where> </where>
</select> </select>
</mapper> </mapper>
\ No newline at end of file \ 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!