|
|
@@ -1,145 +1,145 @@
|
|
|
-<?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.dk.mdm.mapper.core.SettingValueMapper">
|
|
|
+<!--<?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.dk.mdm.mapper.core.SettingValueMapper">-->
|
|
|
|
|
|
- <!-- 通用设置 -->
|
|
|
- <!-- 通用查询列 -->
|
|
|
- <sql id="Base_Column_List">
|
|
|
- fty_id, setting_code, setting_value, remarks, flg_valid, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user
|
|
|
- </sql>
|
|
|
+<!-- <!– 通用设置 –>-->
|
|
|
+<!-- <!– 通用查询列 –>-->
|
|
|
+<!-- <sql id="Base_Column_List">-->
|
|
|
+<!-- fty_id, setting_code, setting_value, remarks, flg_valid, op_create_time, op_create_user_id, op_update_time, op_update_user_id, op_app_code, op_timestamp, op_db_user-->
|
|
|
+<!-- </sql>-->
|
|
|
|
|
|
- <!-- 通用查询映射结果 -->
|
|
|
- <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.core.SettingValue">
|
|
|
- <id column="fty_id" property="ftyId"/>
|
|
|
- <result column="setting_code" property="settingCode"/>
|
|
|
- <result column="setting_value" property="settingValue"/>
|
|
|
- <result column="remarks" property="remarks"/>
|
|
|
- <result column="flg_valid" property="flgValid"/>
|
|
|
- <result column="op_create_time" property="opCreateTime"
|
|
|
- typeHandler="com.dk.common.infrastructure.handler.TimestampTypeHandler"/>
|
|
|
- <result column="op_create_user_id" property="opCreateUserId"/>
|
|
|
- <result column="op_update_time" property="opUpdateTime"
|
|
|
- typeHandler="com.dk.common.infrastructure.handler.TimestampTypeHandler"/>
|
|
|
- <result column="op_update_user_id" property="opUpdateUserId"/>
|
|
|
- <result column="op_app_code" property="opAppCode"/>
|
|
|
- <result column="op_timestamp" property="opTimestamp"
|
|
|
- typeHandler="com.dk.common.infrastructure.handler.TimestampTypeHandler"/>
|
|
|
- <result column="op_db_user" property="opDbUser"/>
|
|
|
- </resultMap>
|
|
|
+<!-- <!– 通用查询映射结果 –>-->
|
|
|
+<!-- <resultMap id="BaseResultMap" type="com.dk.mdm.model.pojo.core.SettingValue">-->
|
|
|
+<!-- <id column="fty_id" property="ftyId"/>-->
|
|
|
+<!-- <result column="setting_code" property="settingCode"/>-->
|
|
|
+<!-- <result column="setting_value" property="settingValue"/>-->
|
|
|
+<!-- <result column="remarks" property="remarks"/>-->
|
|
|
+<!-- <result column="flg_valid" property="flgValid"/>-->
|
|
|
+<!-- <result column="op_create_time" property="opCreateTime"-->
|
|
|
+<!-- typeHandler="com.dk.common.infrastructure.handler.TimestampTypeHandler"/>-->
|
|
|
+<!-- <result column="op_create_user_id" property="opCreateUserId"/>-->
|
|
|
+<!-- <result column="op_update_time" property="opUpdateTime"-->
|
|
|
+<!-- typeHandler="com.dk.common.infrastructure.handler.TimestampTypeHandler"/>-->
|
|
|
+<!-- <result column="op_update_user_id" property="opUpdateUserId"/>-->
|
|
|
+<!-- <result column="op_app_code" property="opAppCode"/>-->
|
|
|
+<!-- <result column="op_timestamp" property="opTimestamp"-->
|
|
|
+<!-- typeHandler="com.dk.common.infrastructure.handler.TimestampTypeHandler"/>-->
|
|
|
+<!-- <result column="op_db_user" property="opDbUser"/>-->
|
|
|
+<!-- </resultMap>-->
|
|
|
|
|
|
- <!-- 通用条件列 -->
|
|
|
- <sql id="Condition">
|
|
|
- <where>
|
|
|
- <if test="settingCode != null and settingCode != ''">
|
|
|
- AND setting_code = #{settingCode}
|
|
|
- </if>
|
|
|
- <if test="settingValue != null and settingValue != ''">
|
|
|
- AND setting_value = #{settingValue}
|
|
|
- </if>
|
|
|
- <if test="remarks != null and remarks != ''">
|
|
|
- AND remarks = #{remarks}
|
|
|
- </if>
|
|
|
- <if test="flgValid != null">
|
|
|
- AND flg_valid = #{flgValid}
|
|
|
- </if>
|
|
|
- <if test="opCreateTime != null">
|
|
|
- AND op_create_time = #{opCreateTime}
|
|
|
- </if>
|
|
|
- <if test="opCreateUserId != null">
|
|
|
- AND op_create_user_id = #{opCreateUserId}
|
|
|
- </if>
|
|
|
- <if test="opUpdateTime != null">
|
|
|
- AND op_update_time = #{opUpdateTime}
|
|
|
- </if>
|
|
|
- <if test="opUpdateUserId != null">
|
|
|
- AND op_update_user_id = #{opUpdateUserId}
|
|
|
- </if>
|
|
|
- <if test="opAppCode != null and opAppCode != ''">
|
|
|
- AND op_app_code = #{opAppCode}
|
|
|
- </if>
|
|
|
- <if test="opTimestamp != null">
|
|
|
- AND op_timestamp = #{opTimestamp}
|
|
|
- </if>
|
|
|
- <if test="opDbUser != null and opDbUser != ''">
|
|
|
- AND op_db_user = #{opDbUser}
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- </sql>
|
|
|
+<!-- <!– 通用条件列 –>-->
|
|
|
+<!-- <sql id="Condition">-->
|
|
|
+<!-- <where>-->
|
|
|
+<!-- <if test="settingCode != null and settingCode != ''">-->
|
|
|
+<!-- AND setting_code = #{settingCode}-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <if test="settingValue != null and settingValue != ''">-->
|
|
|
+<!-- AND setting_value = #{settingValue}-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <if test="remarks != null and remarks != ''">-->
|
|
|
+<!-- AND remarks = #{remarks}-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <if test="flgValid != null">-->
|
|
|
+<!-- AND flg_valid = #{flgValid}-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <if test="opCreateTime != null">-->
|
|
|
+<!-- AND op_create_time = #{opCreateTime}-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <if test="opCreateUserId != null">-->
|
|
|
+<!-- AND op_create_user_id = #{opCreateUserId}-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <if test="opUpdateTime != null">-->
|
|
|
+<!-- AND op_update_time = #{opUpdateTime}-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <if test="opUpdateUserId != null">-->
|
|
|
+<!-- AND op_update_user_id = #{opUpdateUserId}-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <if test="opAppCode != null and opAppCode != ''">-->
|
|
|
+<!-- AND op_app_code = #{opAppCode}-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <if test="opTimestamp != null">-->
|
|
|
+<!-- AND op_timestamp = #{opTimestamp}-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- <if test="opDbUser != null and opDbUser != ''">-->
|
|
|
+<!-- AND op_db_user = #{opDbUser}-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- </where>-->
|
|
|
+<!-- </sql>-->
|
|
|
|
|
|
- <sql id="idsForeach">
|
|
|
- <!-- 根据主键ftyId批量操作 -->
|
|
|
- WHERE fty_id in
|
|
|
- <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
- </sql>
|
|
|
+<!-- <sql id="idsForeach">-->
|
|
|
+<!-- <!– 根据主键ftyId批量操作 –>-->
|
|
|
+<!-- WHERE fty_id in-->
|
|
|
+<!-- <foreach collection="ids" index="index" item="item" separator="," open="(" close=")">-->
|
|
|
+<!-- #{item}-->
|
|
|
+<!-- </foreach>-->
|
|
|
+<!-- </sql>-->
|
|
|
|
|
|
- <!-- 查询表core.t_setting_value,(条件查询+分页)列表 -->
|
|
|
- <select id="selectByCond" resultMap="BaseResultMap">
|
|
|
- SELECT
|
|
|
- <include refid="Base_Column_List"/>
|
|
|
- FROM core.t_setting_value
|
|
|
- <include refid="Condition"/>
|
|
|
- <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">
|
|
|
- limit #{end} offset #{start}
|
|
|
- </if>
|
|
|
- </select>
|
|
|
+<!-- <!– 查询表core.t_setting_value,(条件查询+分页)列表 –>-->
|
|
|
+<!-- <select id="selectByCond" resultMap="BaseResultMap">-->
|
|
|
+<!-- SELECT-->
|
|
|
+<!-- <include refid="Base_Column_List"/>-->
|
|
|
+<!-- FROM core.t_setting_value-->
|
|
|
+<!-- <include refid="Condition"/>-->
|
|
|
+<!-- <if test="pageSize != null and currentPage != null and pageSize != 0 and currentPage != 0">-->
|
|
|
+<!-- limit #{end} offset #{start}-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- </select>-->
|
|
|
|
|
|
- <!-- 查询表core.t_setting_value,(条件查询)个数 -->
|
|
|
- <select id="countByCond" resultType="Long">
|
|
|
- SELECT
|
|
|
- count(1)
|
|
|
- FROM core.t_setting_value
|
|
|
- <include refid="Condition"/>
|
|
|
- </select>
|
|
|
+<!-- <!– 查询表core.t_setting_value,(条件查询)个数 –>-->
|
|
|
+<!-- <select id="countByCond" resultType="Long">-->
|
|
|
+<!-- SELECT-->
|
|
|
+<!-- count(1)-->
|
|
|
+<!-- FROM core.t_setting_value-->
|
|
|
+<!-- <include refid="Condition"/>-->
|
|
|
+<!-- </select>-->
|
|
|
|
|
|
- <!-- 根据系统参数类别查询参数信息 -->
|
|
|
- <select id="getSettingValue" resultType="java.util.Map">
|
|
|
- <include refid="select"/>
|
|
|
- <if test="settingKind != null and settingKind != ''">
|
|
|
- AND item.setting_kind = #{settingKind}
|
|
|
- </if>
|
|
|
- order by kind.kind_code,item.display_no
|
|
|
- </select>
|
|
|
+<!-- <!– 根据系统参数类别查询参数信息 –>-->
|
|
|
+<!-- <select id="getSettingValue" resultType="java.util.Map">-->
|
|
|
+<!-- <include refid="select"/>-->
|
|
|
+<!-- <if test="settingKind != null and settingKind != ''">-->
|
|
|
+<!-- AND item.setting_kind = #{settingKind}-->
|
|
|
+<!-- </if>-->
|
|
|
+<!-- order by kind.kind_code,item.display_no-->
|
|
|
+<!-- </select>-->
|
|
|
|
|
|
- <sql id="select">
|
|
|
- select
|
|
|
- sys.f_get_name_i18n_lang(kind.kind_name_i18n,#{i18n}) as "classCode",
|
|
|
- sys.f_get_name_i18n_lang(item.setting_name_i18n,#{i18n}) as "settingName",
|
|
|
- item.def_value as "settingDefault",
|
|
|
- item.flg_modifiable as "flgModifiable",
|
|
|
- item.display_no as "displayNo",
|
|
|
- item.value_kind as "valueKind",
|
|
|
- item.value_format as "valueFormat",
|
|
|
- sys.f_get_name_i18n_lang(item.description_i18n,#{i18n}) as "settingDescription",
|
|
|
- case when setting.setting_value is not null then setting.setting_value else item.def_value end "settingValue",
|
|
|
- --setting.setting_value as "settingValue",
|
|
|
- item.setting_code as "settingCode"
|
|
|
- from sys.t_setting_kind as kind
|
|
|
- inner join sys.t_setting_item as item
|
|
|
- on kind.kind_code = item.setting_kind
|
|
|
- left join core.t_setting_value as setting
|
|
|
- on item.setting_code = setting.setting_code and setting.fty_id=#{ftyId}
|
|
|
- where kind.flg_valid and item.flg_valid
|
|
|
- </sql>
|
|
|
+<!-- <sql id="select">-->
|
|
|
+<!-- select-->
|
|
|
+<!-- sys.f_get_name_i18n_lang(kind.kind_name_i18n,#{i18n}) as "classCode",-->
|
|
|
+<!-- sys.f_get_name_i18n_lang(item.setting_name_i18n,#{i18n}) as "settingName",-->
|
|
|
+<!-- item.def_value as "settingDefault",-->
|
|
|
+<!-- item.flg_modifiable as "flgModifiable",-->
|
|
|
+<!-- item.display_no as "displayNo",-->
|
|
|
+<!-- item.value_kind as "valueKind",-->
|
|
|
+<!-- item.value_format as "valueFormat",-->
|
|
|
+<!-- sys.f_get_name_i18n_lang(item.description_i18n,#{i18n}) as "settingDescription",-->
|
|
|
+<!-- case when setting.setting_value is not null then setting.setting_value else item.def_value end "settingValue",-->
|
|
|
+<!-- --setting.setting_value as "settingValue",-->
|
|
|
+<!-- item.setting_code as "settingCode"-->
|
|
|
+<!-- from sys.t_setting_kind as kind-->
|
|
|
+<!-- inner join sys.t_setting_item as item-->
|
|
|
+<!-- on kind.kind_code = item.setting_kind-->
|
|
|
+<!-- left join core.t_setting_value as setting-->
|
|
|
+<!-- on item.setting_code = setting.setting_code and setting.fty_id=#{ftyId}-->
|
|
|
+<!-- where kind.flg_valid and item.flg_valid-->
|
|
|
+<!-- </sql>-->
|
|
|
|
|
|
- <!-- 修改系统参数参数值-->
|
|
|
- <update id="updateSettingValues" >
|
|
|
- UPDATE core.t_setting_value
|
|
|
- set setting_value=#{settingValue}
|
|
|
- where fty_id=#{ftyId} and setting_code = #{settingCode}
|
|
|
- </update>
|
|
|
+<!-- <!– 修改系统参数参数值–>-->
|
|
|
+<!-- <update id="updateSettingValues" >-->
|
|
|
+<!-- UPDATE core.t_setting_value-->
|
|
|
+<!-- set setting_value=#{settingValue}-->
|
|
|
+<!-- where fty_id=#{ftyId} and setting_code = #{settingCode}-->
|
|
|
+<!-- </update>-->
|
|
|
|
|
|
- <!--组织部门编码是否重复-->
|
|
|
- <select id="selectByCode" resultType="Long">
|
|
|
- select count(1)
|
|
|
- from core.t_setting_value
|
|
|
- where setting_code = #{settingCode} and fty_id = #{ftyId}
|
|
|
- and flg_valid
|
|
|
- </select>
|
|
|
+<!-- <!–组织部门编码是否重复–>-->
|
|
|
+<!-- <select id="selectByCode" resultType="Long">-->
|
|
|
+<!-- select count(1)-->
|
|
|
+<!-- from core.t_setting_value-->
|
|
|
+<!-- where setting_code = #{settingCode} and fty_id = #{ftyId}-->
|
|
|
+<!-- and flg_valid-->
|
|
|
+<!-- </select>-->
|
|
|
|
|
|
- <select id="selectById" resultType="java.util.Map">
|
|
|
- <include refid="select"/>
|
|
|
- AND item.setting_code = #{settingCode}
|
|
|
- </select>
|
|
|
-</mapper>
|
|
|
+<!-- <select id="selectById" resultType="java.util.Map">-->
|
|
|
+<!-- <include refid="select"/>-->
|
|
|
+<!-- AND item.setting_code = #{settingCode}-->
|
|
|
+<!-- </select>-->
|
|
|
+<!--</mapper>-->
|