From 4a5b21922d00e251faaf79c4b5bc825986ff8a65 Mon Sep 17 00:00:00 2001 From: "jiakun.lin" Date: Tue, 13 Apr 2021 15:25:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E7=AB=AF=EF=BC=8C=E6=95=99?= =?UTF-8?q?=E5=B8=88=E7=AB=AF=E7=99=BB=E5=BD=95=E5=A2=9E=E5=8A=A0=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E5=8F=B7=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/yipin/liuwanr/mapper/UserInfoMapper.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/yipin/liuwanr/mapper/UserInfoMapper.java b/src/main/java/com/yipin/liuwanr/mapper/UserInfoMapper.java index 56079c8..de0e6cd 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/UserInfoMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/UserInfoMapper.java @@ -129,11 +129,11 @@ public interface UserInfoMapper { UserInfo logins(UserInfo userInfo); //登陆 - @Select("SELECT token,userId,userName,roleId,userAvatars,password from hr_user_info where isdel=0 and account = #{account} and password = #{password}") + @Select("SELECT token,userId,userName,roleId,userAvatars,password from hr_user_info where isdel=0 and (account = #{account} or phone = #{account}) and password = #{password}") UserInfo adminLogins(UserInfo userInfo); //登陆账号密码 - @Select("SELECT hui.schoolId,hui.account,hui.cityId,hui.countries,hui.creationTime,hui.dateBirth,hui.documentType,hui.educationDegree,hui.email,hui.iDNumber,hui.logInNumber,hui.phone,hui.provinceId,hui.sex,hui.uniqueIdentificationAccount,hui.userAvatars,hui.userId,hui.userName,hui.weChatID,hui.password from hr_user_info hui where hui.isdel=0 and hui.account = #{account} and password = #{password} ") + @Select("SELECT hui.schoolId,hui.account,hui.cityId,hui.countries,hui.creationTime,hui.dateBirth,hui.documentType,hui.educationDegree,hui.email,hui.iDNumber,hui.logInNumber,hui.phone,hui.provinceId,hui.sex,hui.uniqueIdentificationAccount,hui.userAvatars,hui.userId,hui.userName,hui.weChatID,hui.password from hr_user_info hui where hui.isdel=0 and (hui.account = #{account} or hui.phone = #{account}) and password = #{password} ") UserInfo loginsAP(UserInfo userInfo); //查询用户角色 @@ -338,7 +338,7 @@ public interface UserInfoMapper { ""}) void deleteOrganizationRelationship(Integer userId); - @Select("SELECT disableAccount FROM hr_user_info u LEFT JOIN student s ON u.userId = s.userId WHERE s.schoolId = #{schoolId} AND account = #{account} AND u.isdel = 0 AND s.isdel = 0") + @Select("SELECT disableAccount FROM hr_user_info u LEFT JOIN student s ON u.userId = s.userId WHERE s.schoolId = #{schoolId} AND (account = #{account} OR phone = #{account}) AND u.isdel = 0 AND s.isdel = 0") Integer queryDisableAccount(UserInfo userInfo); @Select("select roleId from hr_user_info where userId = #{userId}")