微信绑定多个用户处理

master
shijie 4 years ago
parent b8c6805e92
commit 4d5d875521
  1. 12
      dq-financial-hrms-auth/src/main/resources/mapper/hrauth/UserLoginMapper.xml

@ -25,13 +25,15 @@
</select>
<select id="login" parameterType="com.daqing.framework.domain.hrms.request.LoginRequest" resultType="com.daqing.framework.domain.hrms.UserEntity">
select id,account,phone_account,password,login_num,head_portarit_url from hrms_user
where del_or_not = 0 and status = 0
select hu.id,hu.account,hu.phone_account,hu.password,hu.login_num,hu.head_portarit_url
from hrms_user hu
INNER JOIN hrms_employee he ON he.user_id=hu.id
where hu.del_or_not = 0 and hu.status = 0
<if test="phone != null and phone != '' ">
and (phone_account = #{phone} or account = #{phone})
and (hu.phone_account = #{phone} or hu.account = #{phone})
</if>
<if test="wechatId != null and wechatId != '' ">
and wechat_id = #{wechatId}
and hu.wechat_id = #{wechatId}
</if>
</select>
@ -39,7 +41,7 @@
SELECT id,account,password FROM hrms_user WHERE phone_account = #{phoneAccount}
</select>
<select id="findByOpenid" parameterType="string" resultType="com.daqing.framework.domain.hrms.UserEntity">
select id,phone_account from hrms_user where wechat_id = #{openId}
SELECT hu.id,hu.phone_account FROM hrms_user hu INNER JOIN hrms_employee he ON he.user_id=hu.id WHERE hu.wechat_id = #{openId}
</select>
<update id="updateOpenIdByPhoneAccount">

Loading…
Cancel
Save