系统配置

This commit is contained in:
2025-11-18 18:46:14 +08:00
parent 9f3176194b
commit ca756dcfd7
23 changed files with 1039 additions and 49 deletions

View File

@@ -6,10 +6,20 @@
<resultMap id="BaseResultMap" type="org.xyzh.common.dto.system.TbSysConfig">
<id column="id" property="ID" />
<result column="config_key" property="configKey" />
<result column="config_name" property="configName" />
<result column="config_value" property="configValue" />
<result column="config_type" property="configType" />
<result column="render_type" property="renderType" />
<result column="config_group" property="configGroup" />
<result column="description" property="description" />
<result column="placeholder" property="placeholder" />
<result column="remark" property="remark" />
<result column="rows" property="rows" />
<result column="min_value" property="minValue" />
<result column="max_value" property="maxValue" />
<result column="unit" property="unit" />
<result column="options" property="options" />
<result column="order_num" property="orderNum" />
<result column="is_system" property="isSystem" />
<result column="creator" property="creator" />
<result column="updater" property="updater" />
@@ -21,7 +31,8 @@
<!-- 字段列表 -->
<sql id="Base_Column_List">
id, config_key, config_value, config_type, config_group, description,
id, config_key, config_name, config_value, config_type, render_type, config_group,
description, placeholder, remark, `rows`, min_value, max_value, unit, `options`, order_num,
is_system, creator, updater, create_time, update_time, delete_time, deleted
</sql>
@@ -47,22 +58,35 @@
<!-- 插入系统配置 -->
<insert id="insertSysConfig" parameterType="org.xyzh.common.dto.system.TbSysConfig">
INSERT INTO tb_sys_config (
id, config_key, config_value, config_type, config_group, description,
id, config_key, config_name, config_value, config_type, render_type, config_group,
description, placeholder, remark, `rows`, min_value, max_value, unit, `options`, order_num,
is_system, creator, create_time
) VALUES (
#{config.ID}, #{config.configKey}, #{config.configValue}, #{config.configType},
#{config.configGroup}, #{config.description}, #{config.isSystem},
#{config.creator}, NOW()
#{config.ID}, #{config.configKey}, #{config.configName}, #{config.configValue},
#{config.configType}, #{config.renderType}, #{config.configGroup}, #{config.description},
#{config.placeholder}, #{config.remark}, #{config.rows}, #{config.minValue},
#{config.maxValue}, #{config.unit}, #{config.options}, #{config.orderNum},
#{config.isSystem}, #{config.creator}, NOW()
)
</insert>
<!-- 更新系统配置 -->
<update id="updateSysConfig" parameterType="org.xyzh.common.dto.system.TbSysConfig">
UPDATE tb_sys_config
SET config_value = #{config.configValue},
SET config_name = #{config.configName},
config_value = #{config.configValue},
config_type = #{config.configType},
render_type = #{config.renderType},
config_group = #{config.configGroup},
description = #{config.description},
placeholder = #{config.placeholder},
remark = #{config.remark},
`rows` = #{config.rows},
min_value = #{config.minValue},
max_value = #{config.maxValue},
unit = #{config.unit},
`options` = #{config.options},
order_num = #{config.orderNum},
is_system = #{config.isSystem},
updater = #{config.updater},
update_time = NOW()
@@ -100,7 +124,7 @@
SELECT <include refid="Base_Column_List" />
FROM tb_sys_config
WHERE deleted = 0
ORDER BY config_group, config_key
ORDER BY config_group, order_num, config_key
</select>
<!-- 根据分组查询 -->
@@ -109,7 +133,7 @@
FROM tb_sys_config
WHERE config_group = #{configGroup}
AND deleted = 0
ORDER BY config_key
ORDER BY order_num, config_key
</select>
<!-- 查询系统配置列表 -->
@@ -117,7 +141,7 @@
SELECT <include refid="Base_Column_List" />
FROM tb_sys_config
<include refid="Base_Where_Clause" />
ORDER BY config_group, config_key
ORDER BY config_group, order_num, config_key
</select>
<!-- 分页查询 -->
@@ -125,7 +149,7 @@
SELECT <include refid="Base_Column_List" />
FROM tb_sys_config
<include refid="Base_Where_Clause" />
ORDER BY config_group, config_key
ORDER BY config_group, order_num, config_key
LIMIT #{pageParam.offset}, #{pageParam.pageSize}
</select>