|
|
@ -5,7 +5,8 @@ |
|
|
|
<update id="incrSubscribeCount"> |
|
|
|
update wxmp_work_user_subscribe |
|
|
|
set COUNT=COUNT + #{incr}, |
|
|
|
WX_SUBSCRIBE_STATUS = 'subscribe' |
|
|
|
WX_SUBSCRIBE_STATUS = 'subscribe', |
|
|
|
UPDATED_TIME = now() |
|
|
|
where USER_ID = #{userId} |
|
|
|
and CUSTOMER_ID = #{customerId} |
|
|
|
and TEMPLATE_ID = #{templateId} |
|
|
@ -26,7 +27,8 @@ |
|
|
|
|
|
|
|
<update id="decreaseWorkSubscribeCount"> |
|
|
|
update Wxmp_Work_User_Subscribe |
|
|
|
set count = if(count < 1, 0, count - ${num} ) |
|
|
|
set count = if(count < 1, 0, count - ${num} ), |
|
|
|
UPDATED_TIME = now() |
|
|
|
where |
|
|
|
del_flag =0 |
|
|
|
and customer_id = #{customerId} |
|
|
@ -36,7 +38,7 @@ |
|
|
|
</update> |
|
|
|
<update id="clearWorkSubscribeCount" parameterType="String"> |
|
|
|
update Wxmp_Work_User_Subscribe |
|
|
|
set count = 0 |
|
|
|
set count = 0, UPDATED_TIME = now() |
|
|
|
where |
|
|
|
del_flag =0 |
|
|
|
and customer_id = #{customerId} |
|
|
@ -48,7 +50,8 @@ |
|
|
|
<update id="unSubscribe"> |
|
|
|
update wxmp_work_user_subscribe |
|
|
|
set WX_SUBSCRIBE_STATUS = 'unsubscribe', |
|
|
|
COUNT = 0 |
|
|
|
COUNT = 0, |
|
|
|
UPDATED_TIME = now() |
|
|
|
where USER_ID = #{userId} |
|
|
|
and CUSTOMER_ID = #{customerId} |
|
|
|
and TEMPLATE_ID = #{templateId} |
|
|
|