feat(auth): 新增 Apple 登录并集成 Sa-Token 鉴权

- AppleServiceImpl:返回完整用户信息并签发 Sa-Token
- 新增 KeyboardUser 实体、Mapper、Service,支持按 subjectId 查询与创建
- GlobalExceptionHandler 统一处理 Sa-Token 未登录异常
- 补充 APPLE_LOGIN_ERROR 等错误码
- 配置文件增加 Sa-Token 相关参数
This commit is contained in:
2025-12-02 16:47:01 +08:00
parent bcbb623ee4
commit fdc024e58f
25 changed files with 575 additions and 30 deletions

View File

@@ -0,0 +1,26 @@
<?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.yolo.keyborad.mapper.KeyboardUserMapper">
<resultMap id="BaseResultMap" type="com.yolo.keyborad.model.entity.KeyboardUser">
<!--@mbg.generated-->
<!--@Table keyboard_user-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="uid" jdbcType="BIGINT" property="uid" />
<result column="nick_name" jdbcType="VARCHAR" property="nickName" />
<result column="gender" jdbcType="INTEGER" property="gender" />
<result column="avatar_url" jdbcType="VARCHAR" property="avatarUrl" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="deleted" jdbcType="BOOLEAN" property="deleted" />
<result column="email" jdbcType="VARCHAR" property="email" />
<result column="status" jdbcType="BOOLEAN" property="status" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="subject_id" jdbcType="VARCHAR" property="subjectId" />
<result column="email_verified" jdbcType="BOOLEAN" property="emailVerified" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, "uid", nick_name, gender, avatar_url, created_at, updated_at, deleted, email,
"status", "password", subject_id, email_verified
</sql>
</mapper>