Refactor authentication logic to unify user account handling and update database schema for user accounts
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -37,4 +37,3 @@
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,22 +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.agent.AgentMapper">
|
||||
<resultMap id="AgentMap" type="com.gameplatform.server.model.entity.agent.Agent">
|
||||
<id property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="loginAccount" column="login_account" />
|
||||
<result property="passwordHash" column="password_hash" />
|
||||
<result property="status" column="status" />
|
||||
<result property="pointsBalance" column="points_balance" />
|
||||
<result property="createdAt" column="created_at" />
|
||||
<result property="updatedAt" column="updated_at" />
|
||||
</resultMap>
|
||||
|
||||
<select id="findByLoginAccount" parameterType="string" resultMap="AgentMap">
|
||||
SELECT id, name, login_account, password_hash, status, points_balance, created_at, updated_at
|
||||
FROM agent
|
||||
WHERE login_account = #{loginAccount}
|
||||
LIMIT 1
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user