<?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.yiqi.settlement.mapper.SettlementStoreRateMapper">

    <select id="queryList" resultType="com.yiqi.settlement.domain.vo.SettlementStoreRateListVO">
        select s.id as 'storeId', s.name as 'storeName', sr.*
        from sys_store s
        left join settlement_store_rate sr on s.id = sr.store_id
        where s.del_flag = '0'
        <if test="storeId != null">
            and s.id = #{storeId}
        </if>
        order by s.id desc
    </select>
</mapper>