新增系统配置表及默认配置,更新链接生成请求DTO以支持链接数量参数,重构链接生成服务逻辑,添加链接状态查询和有效性检查接口,优化日志记录。
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
68
target/classes/mapper/admin/SystemConfigMapper.xml
Normal file
68
target/classes/mapper/admin/SystemConfigMapper.xml
Normal file
@@ -0,0 +1,68 @@
|
||||
<?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.SystemConfigMapper">
|
||||
<resultMap id="SystemConfigMap" type="com.gameplatform.server.model.entity.admin.SystemConfig">
|
||||
<id property="id" column="id" />
|
||||
<result property="configKey" column="config_key" />
|
||||
<result property="configValue" column="config_value" />
|
||||
<result property="configType" column="config_type" />
|
||||
<result property="description" column="description" />
|
||||
<result property="isSystem" column="is_system" />
|
||||
<result property="createdAt" column="created_at" />
|
||||
<result property="updatedAt" column="updated_at" />
|
||||
</resultMap>
|
||||
|
||||
<select id="findById" parameterType="long" resultMap="SystemConfigMap">
|
||||
SELECT id, config_key, config_value, config_type, description, is_system, created_at, updated_at
|
||||
FROM system_config
|
||||
WHERE id = #{id}
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="findByKey" parameterType="string" resultMap="SystemConfigMap">
|
||||
SELECT id, config_key, config_value, config_type, description, is_system, created_at, updated_at
|
||||
FROM system_config
|
||||
WHERE config_key = #{configKey}
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="findByType" parameterType="string" resultMap="SystemConfigMap">
|
||||
SELECT id, config_key, config_value, config_type, description, is_system, created_at, updated_at
|
||||
FROM system_config
|
||||
WHERE config_type = #{configType}
|
||||
ORDER BY config_key ASC
|
||||
</select>
|
||||
|
||||
<select id="findAll" resultMap="SystemConfigMap">
|
||||
SELECT id, config_key, config_value, config_type, description, is_system, created_at, updated_at
|
||||
FROM system_config
|
||||
ORDER BY config_key ASC
|
||||
LIMIT #{size} OFFSET #{offset}
|
||||
</select>
|
||||
|
||||
<select id="countAll" resultType="long">
|
||||
SELECT COUNT(1) FROM system_config
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.gameplatform.server.model.entity.admin.SystemConfig" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO system_config (config_key, config_value, config_type, description, is_system)
|
||||
VALUES (#{configKey}, #{configValue}, #{configType}, #{description}, #{isSystem})
|
||||
</insert>
|
||||
|
||||
<update id="update" parameterType="com.gameplatform.server.model.entity.admin.SystemConfig">
|
||||
UPDATE system_config
|
||||
SET config_value = #{configValue},
|
||||
config_type = #{configType},
|
||||
description = #{description},
|
||||
is_system = #{isSystem}
|
||||
WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteById" parameterType="long">
|
||||
DELETE FROM system_config WHERE id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByKey" parameterType="string">
|
||||
DELETE FROM system_config WHERE config_key = #{configKey}
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -6,26 +6,24 @@
|
||||
<result property="agentId" column="agent_id" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="times" column="times" />
|
||||
<result property="batchSize" column="batch_size" />
|
||||
<result property="deductPoints" column="deduct_points" />
|
||||
<result property="operatorId" column="operator_id" />
|
||||
<result property="createdAt" column="created_at" />
|
||||
</resultMap>
|
||||
|
||||
<select id="findById" parameterType="long" resultMap="LinkBatchMap">
|
||||
SELECT id, agent_id, quantity, times, batch_size, deduct_points, operator_id, created_at
|
||||
SELECT id, agent_id, quantity, times, operator_id, created_at
|
||||
FROM link_batch
|
||||
WHERE id = #{id}
|
||||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.gameplatform.server.model.entity.agent.LinkBatch" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO link_batch (agent_id, quantity, times, batch_size, deduct_points, operator_id)
|
||||
VALUES (#{agentId}, #{quantity}, #{times}, #{batchSize}, #{deductPoints}, #{operatorId})
|
||||
INSERT INTO link_batch (agent_id, quantity, times, operator_id)
|
||||
VALUES (#{agentId}, #{quantity}, #{times}, #{operatorId})
|
||||
</insert>
|
||||
|
||||
<select id="findByAgentId" resultMap="LinkBatchMap">
|
||||
SELECT id, agent_id, quantity, times, batch_size, deduct_points, operator_id, created_at
|
||||
SELECT id, agent_id, quantity, times, operator_id, created_at
|
||||
FROM link_batch
|
||||
WHERE agent_id = #{agentId}
|
||||
ORDER BY created_at DESC
|
||||
@@ -37,7 +35,7 @@
|
||||
</select>
|
||||
|
||||
<select id="findAll" resultMap="LinkBatchMap">
|
||||
SELECT id, agent_id, quantity, times, batch_size, deduct_points, operator_id, created_at
|
||||
SELECT id, agent_id, quantity, times, operator_id, created_at
|
||||
FROM link_batch
|
||||
ORDER BY created_at DESC
|
||||
LIMIT #{size} OFFSET #{offset}
|
||||
|
||||
Reference in New Issue
Block a user