<?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.huatek.busi.mapper.SysConfigMapper">
  <resultMap id="BaseResultMap" type="com.huatek.busi.dto.SysConfigDTO">
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="param_key" jdbcType="VARCHAR" property="paramKey" />
    <result column="param_value" jdbcType="VARCHAR" property="paramValue" />
    <result column="status" jdbcType="VARCHAR" property="status" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
  </resultMap>
  <sql id="Base_Column_List">
    id, param_key, param_value, status, remark
  </sql>
  <select id="selectSysConfigPage" parameterType="java.lang.String" resultMap="BaseResultMap">
    SELECT 
    <include refid="Base_Column_List" />
    FROM sys_config
    WHERE status = '1'
    <if test="paramKey != null">
    	AND param_key like CONCAT('%',#{paramKey,jdbcType=VARCHAR},'%')
    </if>
    ORDER BY created DESC
  </select>
</mapper>