<?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="io.dataease.base.mapper.ext.ExtPanelStoreMapper">

    <resultMap id="panelStoreMap" type="io.dataease.dto.panel.PanelStoreDto" >
        <id column="store_id" property="storeId"></id>
        <result column="name" property="name"></result>
    </resultMap>




    <select id="query" parameterType="io.dataease.base.mapper.ext.query.GridExample" resultMap="panelStoreMap">
       select s.store_id, g.name
       from panel_store s
       left join panel_group g on g.id = s.panel_group_id
        <if test="_parameter != null">
            <include refid="io.dataease.base.mapper.ext.query.GridSql.gridCondition" />
        </if>
        <if test="orderByClause != null">
            order by ${orderByClause}
        </if>
        <if test="orderByClause == null">
            order by s.create_time desc
        </if>

    </select>





</mapper>
