解决bug:同一个微信绑定可以绑定多个用户账号

This commit is contained in:
jishenghua
2024-03-30 17:38:47 +08:00
parent 997508894a
commit 5985778fce

View File

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