forked from rongchao/epmet-cloud-rizhao
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
2.2 KiB
68 lines
2.2 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.epmet.dao.WxmpTemplateMsgSubscribeStatusDao">
|
|
|
|
<select id="getUserSubscribeStatusDTO" resultType="com.epmet.dto.result.WxMsgAuthInfoResultDTO">
|
|
select id,
|
|
customer_id,
|
|
client_type,
|
|
user_id,
|
|
always_visit,
|
|
subscribe_status,
|
|
wx_always_visit,
|
|
wx_subscribe_status,
|
|
del_flag,
|
|
revision,
|
|
created_by,
|
|
created_time,
|
|
updated_by,
|
|
updated_time,
|
|
WX_OPEN_ID
|
|
from wxmp_template_msg_subscribe_status status
|
|
where USER_ID = #{userId}
|
|
and CUSTOMER_ID = #{customerId}
|
|
and CLIENT_TYPE = #{clientType}
|
|
and TEMPLATE_ID = #{templateId}
|
|
and WX_OPEN_ID = #{openId}
|
|
</select>
|
|
|
|
<select id="getUserSubscribeStatusEntity" resultType="com.epmet.entity.WxmpTemplateMsgSubscribeStatusEntity">
|
|
select id,
|
|
customer_id,
|
|
client_type,
|
|
user_id,
|
|
always_visit,
|
|
subscribe_status,
|
|
wx_always_visit,
|
|
wx_subscribe_status,
|
|
del_flag,
|
|
revision,
|
|
created_by,
|
|
created_time,
|
|
updated_by,
|
|
updated_time,
|
|
WX_OPEN_ID
|
|
from wxmp_template_msg_subscribe_status status
|
|
where USER_ID = #{userId}
|
|
and CUSTOMER_ID = #{customerId}
|
|
and CLIENT_TYPE = #{clientType}
|
|
and TEMPLATE_ID = #{templateId}
|
|
and WX_OPEN_ID = #{openId}
|
|
</select>
|
|
|
|
<update id="updateUserSubscribe">
|
|
UPDATE wxmp_template_msg_subscribe_status
|
|
SET ALWAYS_VISIT = #{alwaysVisit},
|
|
UPDATED_BY = #{userId},
|
|
UPDATED_TIME = NOW()
|
|
WHERE
|
|
del_flag = '0'
|
|
AND customer_id = #{customerId}
|
|
AND client_type = #{clientType}
|
|
AND user_id = #{userId}
|
|
AND wx_open_id = #{openId}
|
|
AND template_id = #{templateId}
|
|
</update>
|
|
|
|
</mapper>
|