解决微信与用户绑定的bug

This commit is contained in:
jishenghua
2024-04-02 23:52:51 +08:00
parent de95be05f6
commit 4f8524e688
2 changed files with 11 additions and 12 deletions

View File

@@ -153,7 +153,8 @@
</select>
<update id="updateUserWithWeixinOpenId">
update jsh_user u set u.weixin_open_id = null where u.weixin_open_id = #{weixinOpenId};
update jsh_user u set u.weixin_open_id = #{weixinOpenId} where u.login_name = #{loginName} and u.password = #{password} and ifnull(u.status,'0') not in('1','2');
update jsh_user u set u.weixin_open_id = #{weixinOpenId}
where u.login_name = #{loginName} and u.password = #{password}
and ifnull(u.status,'0') not in('1','2')
</update>
</mapper>