Commit 4d25aa3d by 徐高华

活码关联群

parent 96599e99
...@@ -21,15 +21,16 @@ public interface HmLinkChatMapper { ...@@ -21,15 +21,16 @@ public interface HmLinkChatMapper {
public int insert(TabHmLinkChat tabHaobanHmLinkChat); public int insert(TabHmLinkChat tabHaobanHmLinkChat);
public int delete(@Param("linkId") Long linkId, @Param("idList") List<Long> idList); public int delete(@Param("linkId") Long linkId, @Param("idList") List<Long> idList,
@Param("otherFlag") int otherFlag);
public int update(TabHmLinkChat entity); public int update(TabHmLinkChat entity);
public List<HmLinkChatDTO> listByLinkId(@Param("wxEnterpriseId") String wxEnterpriseId, public List<HmLinkChatDTO> listByLinkId(@Param("wxEnterpriseId") String wxEnterpriseId,
@Param("enterpriseId") String enterpriseId, @Param("linkId") Long linkId); @Param("enterpriseId") String enterpriseId, @Param("linkId") Long linkId);
public List<HmLinkChatDTO> getLinkCountForHm(@Param("wxEnterpriseId") String wxEnterpriseId, public List<HmLinkChatDTO> getLinkCountForHm(@Param("wxEnterpriseId") String wxEnterpriseId,
@Param("chatHmIdList") List<Long> chatHmIdList) ; @Param("chatHmIdList") List<Long> chatHmIdList);
public List<HmLinkChatDTO> listPage(HmLinkChatQDTO qdto) ; public List<HmLinkChatDTO> listPage(HmLinkChatQDTO qdto);
} }
\ No newline at end of file
...@@ -56,7 +56,7 @@ public class HmLinkChatServiceImpl implements HmLinkChatService { ...@@ -56,7 +56,7 @@ public class HmLinkChatServiceImpl implements HmLinkChatService {
String enterpriseId = list.get(0).getEnterpriseId(); String enterpriseId = list.get(0).getEnterpriseId();
// 先查出历史记录 // 先查出历史记录
List<HmLinkChatDTO> oldList = this.hmLinkChatMapper.listByLinkId(wxEnterpriseId, enterpriseId, linkId); List<HmLinkChatDTO> oldList = this.hmLinkChatMapper.listByLinkId(wxEnterpriseId, enterpriseId, linkId);
this.hmLinkChatMapper.delete(linkId, notDelIdList); this.hmLinkChatMapper.delete(linkId, notDelIdList , 0);
if (CollectionUtils.isNotEmpty(updateList)) { if (CollectionUtils.isNotEmpty(updateList)) {
for (HmLinkChatDTO item : updateList) { for (HmLinkChatDTO item : updateList) {
TabHmLinkChat entity = EntityUtil.changeEntityByJSON(TabHmLinkChat.class, item); TabHmLinkChat entity = EntityUtil.changeEntityByJSON(TabHmLinkChat.class, item);
...@@ -87,7 +87,7 @@ public class HmLinkChatServiceImpl implements HmLinkChatService { ...@@ -87,7 +87,7 @@ public class HmLinkChatServiceImpl implements HmLinkChatService {
if (null != link) { if (null != link) {
idList.add(link.getOtherChatHmId()); idList.add(link.getOtherChatHmId());
if (otherHmId.equals(link.getOtherChatHmId())) { if (otherHmId.equals(link.getOtherChatHmId())) {
this.hmLinkChatMapper.delete(linkId, Arrays.asList(link.getOtherChatHmId())); this.hmLinkChatMapper.delete(linkId, Arrays.asList(link.getOtherChatHmId()) , 1);
addOther = true; addOther = true;
} }
} else { } else {
......
...@@ -69,6 +69,9 @@ ...@@ -69,6 +69,9 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="null !=otherFlag">
and other_flag = #{otherFlag}
</if>
</update> </update>
<!-- ==================更新 ========== --> <!-- ==================更新 ========== -->
......
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