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}")