修改提出的问题和新需求

This commit is contained in:
2025-07-30 10:09:14 +08:00
parent e08e1689a7
commit ecd499a497
11 changed files with 140 additions and 12 deletions

View File

@ -43,6 +43,14 @@ public interface SysUserMapper
*/
public SysUser selectUserByUserName(String userName);
/**
* 根据手机号查询用户
* @param phone 手机号
* @return
*/
public SysUser selectUserByPhone(String phone);
/**
* 通过用户ID查询用户
*

View File

@ -42,6 +42,13 @@ public interface ISysUserService
*/
public SysUser selectUserByUserName(String userName);
/**
* 根据手机号查询用户
* @param phone 手机号
* @return
*/
public SysUser selectUserByPhone(String phone);
/**
* 通过用户ID查询用户
*

View File

@ -116,6 +116,12 @@ public class SysUserServiceImpl implements ISysUserService
return userMapper.selectUserByUserName(userName);
}
@Override
public SysUser selectUserByPhone(String phone)
{
return userMapper.selectUserByPhone(phone);
}
/**
* 通过用户ID查询用户
*

View File

@ -125,6 +125,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectUserVo"/>
where u.user_name = #{userName} and u.del_flag = '0'
</select>
<select id="selectUserByPhone" parameterType="String" resultMap="SysUserResult">
<include refid="selectUserVo"/>
where u.phonenumber = #{phone} and u.del_flag = '0' limit 1
</select>
<select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
<include refid="selectUserVo"/>