sfd
2025-05-26 2a64b537e8e3bce9ce030585a3da17d48379c0ad
aps-modules/aps-system/src/main/resources/mapper/system/SysConfigMapper.xml
@@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.aps.system.mapper.SysConfigMapper">
    
    <resultMap type="SysConfig" id="SysConfigResult">
    <resultMap type="com.aps.system.domain.SysConfig" id="SysConfigResult">
       <id     property="configId"      column="config_id"      />
        <result property="configName"    column="config_name"    />
        <result property="configKey"     column="config_key"     />
@@ -33,22 +33,22 @@
      </where>
   </sql>
    
    <select id="selectConfig" parameterType="SysConfig" resultMap="SysConfigResult">
    <select id="selectConfig" parameterType="com.aps.system.domain.SysConfig" resultMap="SysConfigResult">
        <include refid="selectConfigVo"/>
        <include refid="sqlwhereSearch"/>
    </select>
    
    <select id="selectConfigList" parameterType="SysConfig" resultMap="SysConfigResult">
    <select id="selectConfigList" parameterType="com.aps.system.domain.SysConfig" resultMap="SysConfigResult">
        <include refid="selectConfigVo"/>
        <where>
         <if test="configName != null and configName != ''">
            AND config_name like concat('%', #{configName}, '%')
            AND config_name like '%' || #{configName} || '%'
         </if>
         <if test="configType != null and configType != ''">
            AND config_type = #{configType}
         </if>
         <if test="configKey != null and configKey != ''">
            AND config_key like concat('%', #{configKey}, '%')
            AND config_key like '%' || #{configKey} || '%'
         </if>
         <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
            and date_format(create_time,'%Y%m%d') &gt;= date_format(#{params.beginTime},'%Y%m%d')
@@ -69,7 +69,7 @@
        where config_key = #{configKey} limit 1
    </select>
    
    <insert id="insertConfig" parameterType="SysConfig">
    <insert id="insertConfig" parameterType="com.aps.system.domain.SysConfig">
        insert into sys_config (
         <if test="configName != null and configName != '' ">config_name,</if>
         <if test="configKey != null and configKey != '' ">config_key,</if>
@@ -85,11 +85,11 @@
         <if test="configType != null and configType != ''">#{configType},</if>
         <if test="createBy != null and createBy != ''">#{createBy},</if>
         <if test="remark != null and remark != ''">#{remark},</if>
          sysdate()
          now()
      )
    </insert>
    
    <update id="updateConfig" parameterType="SysConfig">
    <update id="updateConfig" parameterType="com.aps.system.domain.SysConfig">
        update sys_config 
        <set>
            <if test="configName != null and configName != ''">config_name = #{configName},</if>
@@ -98,7 +98,7 @@
            <if test="configType != null and configType != ''">config_type = #{configType},</if>
            <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
            <if test="remark != null">remark = #{remark},</if>
          update_time = sysdate()
          update_time = now()
        </set>
        where config_id = #{configId}
    </update>