Browse Source

Merge branch 'dev_wx_msg' into dev_temp

dev_shibei_match
wxz 5 years ago
parent
commit
d3c2f9ab32
  1. 6
      epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java
  2. 4
      epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpResiUserSubscribeDao.xml
  3. 6
      epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpWorkUserSubscribeDao.xml

6
epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/WxmpMessageServiceImpl.java

@ -515,9 +515,10 @@ public class WxmpMessageServiceImpl implements WxmpMessageService {
} else if (WxMsgTemplateSubscribeStatus.UNSUBSCRIBE.equals(wxSubscribeStatus) && "yes".equals(wxAlwaysVisit)) { } else if (WxMsgTemplateSubscribeStatus.UNSUBSCRIBE.equals(wxSubscribeStatus) && "yes".equals(wxAlwaysVisit)) {
// 总是+取消 // 总是+取消
wxmpResiUserSubscribeDao.unSubscribe(userId, customerId, templateId, openId); wxmpResiUserSubscribeDao.unSubscribe(userId, customerId, templateId, openId);
wxmpResiUserSubscribeDao.clearResiSubscribeCount(openId, templateId, customerId, userId);
} else { } else {
// 取消 // 取消
wxmpResiUserSubscribeDao.decreaseResiSubscribeCount(openId, templateId, customerId, 1, userId); wxmpResiUserSubscribeDao.unSubscribe(userId, customerId, templateId, openId);
} }
} }
@ -547,9 +548,10 @@ public class WxmpMessageServiceImpl implements WxmpMessageService {
} else if (WxMsgTemplateSubscribeStatus.UNSUBSCRIBE.equals(wxSubscribeStatus) && "yes".equals(wxAlwaysVisit)) { } else if (WxMsgTemplateSubscribeStatus.UNSUBSCRIBE.equals(wxSubscribeStatus) && "yes".equals(wxAlwaysVisit)) {
// 取消订阅+总是 // 取消订阅+总是
wxmpWorkUserSubscribeDao.unSubscribe(userId, customerId, templateId, openId); wxmpWorkUserSubscribeDao.unSubscribe(userId, customerId, templateId, openId);
wxmpWorkUserSubscribeDao.clearWorkSubscribeCount(openId, templateId, customerId, userId);
} else { } else {
// 取消订阅+不总是 // 取消订阅+不总是
wxmpWorkUserSubscribeDao.decreaseWorkSubscribeCount(openId, templateId, customerId, 1, userId); wxmpWorkUserSubscribeDao.unSubscribe(userId, customerId, templateId, openId);
} }
} }

4
epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpResiUserSubscribeDao.xml

@ -49,18 +49,19 @@
and CUSTOMER_ID = #{customerId} and CUSTOMER_ID = #{customerId}
and TEMPLATE_ID = #{templateId} and TEMPLATE_ID = #{templateId}
and WX_OPEN_ID = #{resiOpenId} and WX_OPEN_ID = #{resiOpenId}
and del_flag = 0
</update> </update>
<!--取消订阅--> <!--取消订阅-->
<update id="unSubscribe"> <update id="unSubscribe">
update wxmp_resi_user_subscribe update wxmp_resi_user_subscribe
set WX_SUBSCRIBE_STATUS = 'unsubscribe', set WX_SUBSCRIBE_STATUS = 'unsubscribe',
COUNT = 0,
UPDATED_TIME = now() UPDATED_TIME = now()
where USER_ID = #{userId} where USER_ID = #{userId}
and CUSTOMER_ID = #{customerId} and CUSTOMER_ID = #{customerId}
and TEMPLATE_ID = #{templateId} and TEMPLATE_ID = #{templateId}
and WX_OPEN_ID = #{resiOpenId} and WX_OPEN_ID = #{resiOpenId}
and del_flag = 0
</update> </update>
<select id="getWxResiSubscribe" resultType="com.epmet.entity.WxmpResiUserSubscribeEntity"> <select id="getWxResiSubscribe" resultType="com.epmet.entity.WxmpResiUserSubscribeEntity">
@ -82,6 +83,7 @@
and CUSTOMER_ID = #{customerId} and CUSTOMER_ID = #{customerId}
and TEMPLATE_ID = #{templateId} and TEMPLATE_ID = #{templateId}
and WX_OPEN_ID = #{openId} and WX_OPEN_ID = #{openId}
and del_flag = 0
</select> </select>
</mapper> </mapper>

6
epmet-module/epmet-message/epmet-message-server/src/main/resources/mapper/WxmpWorkUserSubscribeDao.xml

@ -11,6 +11,7 @@
and CUSTOMER_ID = #{customerId} and CUSTOMER_ID = #{customerId}
and TEMPLATE_ID = #{templateId} and TEMPLATE_ID = #{templateId}
and WX_OPEN_ID = #{openId} and WX_OPEN_ID = #{openId}
and del_flag =0
</update> </update>
<select id="getWorkSubscribeInfo" parameterType="String" resultType="Integer"> <select id="getWorkSubscribeInfo" parameterType="String" resultType="Integer">
@ -49,13 +50,13 @@
<update id="unSubscribe"> <update id="unSubscribe">
update wxmp_work_user_subscribe update wxmp_work_user_subscribe
set WX_SUBSCRIBE_STATUS = 'unsubscribe', set WX_SUBSCRIBE_STATUS = 'unsubscribe'
COUNT = 0,
UPDATED_TIME = now() UPDATED_TIME = now()
where USER_ID = #{userId} where USER_ID = #{userId}
and CUSTOMER_ID = #{customerId} and CUSTOMER_ID = #{customerId}
and TEMPLATE_ID = #{templateId} and TEMPLATE_ID = #{templateId}
and WX_OPEN_ID = #{resiOpenId} and WX_OPEN_ID = #{resiOpenId}
and del_flag =0
</update> </update>
<select id="getWxWorkSubscribe" resultType="com.epmet.entity.WxmpWorkUserSubscribeEntity"> <select id="getWxWorkSubscribe" resultType="com.epmet.entity.WxmpWorkUserSubscribeEntity">
@ -77,5 +78,6 @@
and CUSTOMER_ID = #{customerId} and CUSTOMER_ID = #{customerId}
and TEMPLATE_ID = #{templateId} and TEMPLATE_ID = #{templateId}
and WX_OPEN_ID = #{openId} and WX_OPEN_ID = #{openId}
and del_flag =0
</select> </select>
</mapper> </mapper>

Loading…
Cancel
Save