添加Swagger/OpenAPI依赖并更新用户账户管理相关的API文档注释,优化用户和管理员账户控制器的接口描述,移除不必要的字段和参数,调整数据库映射以简化用户账户管理逻辑。
This commit is contained in:
74
target/classes/mapper/admin/OperationLogMapper.xml
Normal file
74
target/classes/mapper/admin/OperationLogMapper.xml
Normal file
@@ -0,0 +1,74 @@
|
||||
<?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.OperationLogMapper">
|
||||
<resultMap id="OperationLogMap" type="com.gameplatform.server.model.entity.admin.OperationLog">
|
||||
<id property="id" column="id" />
|
||||
<result property="actorType" column="actor_type" />
|
||||
<result property="actorId" column="actor_id" />
|
||||
<result property="codeNo" column="code_no" />
|
||||
<result property="op" column="op" />
|
||||
<result property="detail" column="detail" />
|
||||
<result property="clientIp" column="client_ip" />
|
||||
<result property="userAgent" column="user_agent" />
|
||||
<result property="createdAt" column="created_at" />
|
||||
</resultMap>
|
||||
|
||||
<select id="findById" parameterType="long" resultMap="OperationLogMap">
|
||||
SELECT id, actor_type, actor_id, code_no, op, detail, client_ip, user_agent, created_at
|
||||
FROM operation_log
|
||||
WHERE id = #{id}
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.gameplatform.server.model.entity.admin.OperationLog" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO operation_log (actor_type, actor_id, code_no, op, detail, client_ip, user_agent)
|
||||
VALUES (#{actorType}, #{actorId}, #{codeNo}, #{op}, #{detail}, #{clientIp}, #{userAgent})
|
||||
</insert>
|
||||
|
||||
<select id="findByCodeNo" resultMap="OperationLogMap">
|
||||
SELECT id, actor_type, actor_id, code_no, op, detail, client_ip, user_agent, created_at
|
||||
FROM operation_log
|
||||
WHERE code_no = #{codeNo}
|
||||
ORDER BY created_at DESC
|
||||
LIMIT #{size} OFFSET #{offset}
|
||||
</select>
|
||||
|
||||
<select id="countByCodeNo" resultType="long">
|
||||
SELECT COUNT(1) FROM operation_log WHERE code_no = #{codeNo}
|
||||
</select>
|
||||
|
||||
<select id="findByActorId" resultMap="OperationLogMap">
|
||||
SELECT id, actor_type, actor_id, code_no, op, detail, client_ip, user_agent, created_at
|
||||
FROM operation_log
|
||||
WHERE actor_id = #{actorId}
|
||||
ORDER BY created_at DESC
|
||||
LIMIT #{size} OFFSET #{offset}
|
||||
</select>
|
||||
|
||||
<select id="countByActorId" resultType="long">
|
||||
SELECT COUNT(1) FROM operation_log WHERE actor_id = #{actorId}
|
||||
</select>
|
||||
|
||||
<select id="findByActorType" resultMap="OperationLogMap">
|
||||
SELECT id, actor_type, actor_id, code_no, op, detail, client_ip, user_agent, created_at
|
||||
FROM operation_log
|
||||
WHERE actor_type = #{actorType}
|
||||
ORDER BY created_at DESC
|
||||
LIMIT #{size} OFFSET #{offset}
|
||||
</select>
|
||||
|
||||
<select id="countByActorType" resultType="long">
|
||||
SELECT COUNT(1) FROM operation_log WHERE actor_type = #{actorType}
|
||||
</select>
|
||||
|
||||
<select id="findAll" resultMap="OperationLogMap">
|
||||
SELECT id, actor_type, actor_id, code_no, op, detail, client_ip, user_agent, created_at
|
||||
FROM operation_log
|
||||
ORDER BY created_at DESC
|
||||
LIMIT #{size} OFFSET #{offset}
|
||||
</select>
|
||||
|
||||
<select id="countAll" resultType="long">
|
||||
SELECT COUNT(1) FROM operation_log
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user