会话存档客户重复问题修复

1 parent e8fd3cd4
......@@ -29,8 +29,6 @@ public class WeMsgTlpServiceImpl implements IWeMsgTlpService
@Autowired
private WeMsgTlpMapper weMsgTlpMapper;
@Autowired
private IWeMsgTlpScopeService iWeMsgTlpScopeService;
/**
* 查询欢迎语模板
......
......@@ -37,7 +37,7 @@
where FIND_IN_SET(#{fromId}, to_list) and is_external = 0 and room_id = ''
order by msg_time desc
) as msg group by receiver order by msg.msg_time desc) t
inner join we_customer wc on t.receiver = wc.external_userid;
inner join we_customer wc on t.receiver = wc.external_userid and wc.first_user_id=#{fromId};
</select>
<select id="selectAloneChatList" resultType="com.linkwechat.wecom.domain.vo.WeChatContactMsgVo">
......
......@@ -37,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="welcomeMsgTplType !=null "> and wmt.welcome_msg_tpl_type = #{welcomeMsgTplType}</if>
and wmt.del_flag = 0
</where>
ORDER BY wmt.create_time DESC
</select>
......@@ -54,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="delFlag != null">del_flag,</if>
<if test="welcomeMsgTplType != null">welcome_msg_tpl_type,</if>
<if test="createBy != null ">create_by,</if>
<if test="createTime !=null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
......@@ -62,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="delFlag != null">#{delFlag},</if>
<if test="welcomeMsgTplType != null">#{welcomeMsgTplType},</if>
<if test="createBy != null ">#{createBy},</if>
<if test="createTime !=null">#{createTime},</if>
</trim>
</insert>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!