1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?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.zcxk.smartcity.data.access.dao.ConfigMapper">
- <!--auto generated Code-->
- <resultMap id="BaseResultMap" type="com.zcxk.smartcity.data.access.entity.Config">
- <result column="id" property="id" jdbcType="INTEGER"/>
- <result column="config_name" property="configName" jdbcType="VARCHAR"/>
- <result column="config_value" property="configValue" jdbcType="VARCHAR"/>
- <result column="config_desc" property="configDesc" jdbcType="VARCHAR"/>
- <result column="parent_id" property="parentId" jdbcType="INTEGER"/>
- <result column="status" property="status" jdbcType="TINYINT"/>
- <result column="create_by" property="createBy" jdbcType="VARCHAR"/>
- <result column="update_by" property="updateBy" jdbcType="VARCHAR"/>
- <result column="date_create" property="dateCreate" jdbcType="TIMESTAMP"/>
- <result column="date_update" property="dateUpdate" jdbcType="TIMESTAMP"/>
- </resultMap>
- <!--auto generated Code-->
- <sql id="Base_Column_List">
- id,
- config_name,
- config_value,
- config_desc,
- parent_id,
- status,
- create_by,
- update_by,
- date_create,
- date_update
- </sql>
- <select id="findByParentId" resultType="com.zcxk.smartcity.data.access.dto.ConfigDataDto">
- select config_name as `name`,config_value as `value`
- from sc_config_t where status = 1 and parent_id = #{parentId} order by config_value asc
- </select>
- <select id="findByName" resultMap="BaseResultMap">
- select <include refid="Base_Column_List"/> from sc_config_t
- where status = 1 and config_name = #{name}
- </select>
- <select id="findByValue" resultMap="BaseResultMap">
- select <include refid="Base_Column_List"/> from sc_config_t
- where status = 1 and config_value = #{value}
- </select>
- </mapper>
|