<?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.xingyun.template.gen.mappers.GenQueryParamsColumnConfigMapper">
    <resultMap id="GenQueryParamsColumnConfigDto"
               type="com.lframework.xingyun.template.gen.dto.gen.GenQueryParamsColumnConfigDto">
        <id column="id" property="id"/>
        <result column="query_type" property="queryType"/>
        <result column="order_no" property="orderNo"/>
    </resultMap>

    <sql id="GenQueryParamsColumnConfigDto_sql">
        SELECT
            g.id,
            g.query_type,
            g.order_no
        FROM gen_query_params_column_config AS g
    </sql>
    <select id="getByIds" resultMap="GenQueryParamsColumnConfigDto">
        <include refid="GenQueryParamsColumnConfigDto_sql"/>
        WHERE g.id IN
        <foreach collection="ids" open="(" separator="," close=")" item="item">#{item}</foreach>
        ORDER BY g.order_no
    </select>
    <select id="findById" resultMap="GenQueryParamsColumnConfigDto">
        <include refid="GenQueryParamsColumnConfigDto_sql"/>
        WHERE g.id = #{id}
    </select>
</mapper>
