Refactor authentication logic to unify user account handling and update database schema for user accounts

This commit is contained in:
zyh
2025-08-24 15:54:21 +08:00
parent be437a360d
commit c65c03b933
22 changed files with 256 additions and 288 deletions

View File

@@ -1,21 +0,0 @@
<?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.gameplatform.server.mapper.admin.AdminUserMapper">
<resultMap id="AdminUserMap" type="com.gameplatform.server.model.entity.admin.AdminUser">
<id property="id" column="id" />
<result property="username" column="username" />
<result property="passwordHash" column="password_hash" />
<result property="role" column="role" />
<result property="status" column="status" />
<result property="createdAt" column="created_at" />
<result property="updatedAt" column="updated_at" />
</resultMap>
<select id="findByUsername" parameterType="string" resultMap="AdminUserMap">
SELECT id, username, password_hash, role, status, created_at, updated_at
FROM admin_user
WHERE username = #{username}
LIMIT 1
</select>
</mapper>