新增系统配置表及默认配置,更新链接生成请求DTO以支持链接数量参数,重构链接生成服务逻辑,添加链接状态查询和有效性检查接口,优化日志记录。

This commit is contained in:
zyh
2025-08-26 10:33:26 +08:00
parent 7317866f98
commit 599ec0a36b
73 changed files with 1829 additions and 50 deletions

View 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>