Files
en-edu/enlish-service/src/main/resources/mapper/UserDOMapper.xml
lbw f4498e5676 feat(auth): 实现基于阿里云短信验证码的登录注册功能
- 新增阿里云短信发送客户端配置及属性绑定类
- 集成阿里云短信服务实现验证码发送功能
- 基于 Sa-Token 完成登录状态管理和 token 生成
- 实现手机号验证码登录、密码登录及验证码注册支持
- 添加密码加密 Bean,使用 BCrypt 保障密码安全
- 新增 Redis 缓存验证码,实现验证码有效期和校验
- Vue 前端新增登录弹窗组件,支持三种登录模式切换
- 统一 Axios 请求添加 Token 请求头及响应错误提示
- 更新配置文件,加入 Sa-Token 相关配置项
- 调整后端数据库实体生成配置,新增用户表映射
- 添加前端依赖包 @vueuse/integrations 和 universal-cookie
- 新增前端 Cookie 操作逻辑,用于 Token 的存取管理
- 优化 Header 组件,增加 Login 按钮触发登录弹窗
2025-12-22 17:26:21 +08:00

27 lines
1.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yinlihupo.enlish.service.domain.mapper.UserDOMapper">
<resultMap id="BaseResultMap" type="com.yinlihupo.enlish.service.domain.dataobject.UserDO">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="openid" jdbcType="VARCHAR" property="openid" />
<result column="phone" jdbcType="VARCHAR" property="phone" />
<result column="email" jdbcType="VARCHAR" property="email" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="is_deleted" jdbcType="INTEGER" property="isDeleted" />
</resultMap>
<insert id="insert" useGeneratedKeys="true" keyProperty="id">
insert into user (password, phone, name)
values (#{password}, #{phone}, #{name})
</insert>
<select id="selectByPhone" resultMap="BaseResultMap">
select *
from user
where phone = #{phone}
and is_deleted = 0
</select>
</mapper>