Merge branch 'master' into cc_20251028_decoration
This commit is contained in:
@@ -195,4 +195,23 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<select id="selectLastBindRecord" resultType="com.cool.store.dto.wechat.ServiceAccountOpenIdDTO">
|
||||
select
|
||||
b.partner_id as partnerId,
|
||||
b.union_id as unionId,
|
||||
b.service_account_open_id as serviceAccountOpenId,
|
||||
MAX(b.update_time) as lastUpdateTime
|
||||
from xfsg_partner_user_info a
|
||||
left join xfsg_partner_user_wechat_bind b
|
||||
on a.partner_id = b.partner_id
|
||||
where b.partner_id is not null
|
||||
and service_account_open_id is not null
|
||||
<if test="mobileList !=null and mobileList.size>0">
|
||||
<foreach collection="mobileList" open="and mobile in (" close=")" separator="," item="mobile">
|
||||
#{mobile}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY b.partner_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -8,6 +8,8 @@
|
||||
<result column="open_id" property="openId" jdbcType="VARCHAR" />
|
||||
<result column="bind_time" property="bindTime" jdbcType="TIMESTAMP" />
|
||||
<result column="partner_id" property="partnerId" jdbcType="VARCHAR" />
|
||||
<result column="union_id" property="unionId" jdbcType="VARCHAR" />
|
||||
<result column="service_account_open_id" property="serviceAccountOpenId" jdbcType="VARCHAR" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
|
||||
</resultMap>
|
||||
@@ -17,15 +19,33 @@
|
||||
open_id,
|
||||
bind_time,
|
||||
partner_id,
|
||||
union_id,
|
||||
create_time
|
||||
) VALUES (
|
||||
#{openId, jdbcType=VARCHAR},
|
||||
#{bindTime, jdbcType=TIMESTAMP},
|
||||
#{partnerId, jdbcType=VARCHAR},
|
||||
#{unionId, jdbcType=VARCHAR},
|
||||
#{createTime, jdbcType=TIMESTAMP}
|
||||
)
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.cool.store.entity.PartnerUserWechatBindDO">
|
||||
UPDATE xfsg_partner_user_wechat_bind
|
||||
<set>
|
||||
<if test="unionId != null">
|
||||
union_id = #{unionId, jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="updateByUnionId" >
|
||||
UPDATE xfsg_partner_user_wechat_bind
|
||||
set service_account_open_id = #{serviceAccountOpenId}
|
||||
where union_id = #{unionId}
|
||||
</update>
|
||||
|
||||
<select id="selectByPartnerAndOpenId" resultMap="BaseResultMap">
|
||||
select * from xfsg_partner_user_wechat_bind where partner_id = #{partnerId} and open_id = #{openId}
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user