mappers.GenQueryColumnConfigMapper.xml Maven / Gradle / Ivy
<?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.lframework.gen.mappers.GenQueryColumnConfigMapper"> <resultMap id="GenQueryColumnConfigDto" type="com.lframework.gen.dto.dataobj.GenQueryColumnConfigDto"> <id column="id" property="id"/> <result column="width_type" property="widthType"/> <result column="width" property="width"/> <result column="sortable" property="sortable"/> <result column="order_no" property="orderNo"/> </resultMap> <sql id="GenQueryColumnConfigDto_sql"> SELECT g.id, g.width_type, g.width, g.sortable, g.order_no FROM gen_query_column_config AS g </sql> <select id="getByIds" resultMap="GenQueryColumnConfigDto"> <include refid="GenQueryColumnConfigDto_sql"/> WHERE g.id IN <foreach collection="ids" open="(" separator="," close=")" item="item">#{item}</foreach> ORDER BY g.order_no </select> <select id="getById" resultMap="GenQueryColumnConfigDto"> <include refid="GenQueryColumnConfigDto_sql"/> WHERE g.id = #{id} </select> </mapper>