<?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.sckw.transport.dao.KwtLogisticsOrderLineFreightRateMapper">
    <select id="findByAddress" resultType="com.sckw.transport.model.KwtLogisticsOrderLineFreightRate">
        select *
        from kwt_logistics_order_line_freight_rate
        where del_flag = 0
          and l_order_id = #{lOrderId, jdbcType=BIGINT}
          and name = #{name, jdbcType=VARCHAR}
    </select>

    <select id="selectListByOrderId" resultType="com.sckw.transport.model.vo.LineFreightRateVo">
        select id,
               line_freight_rate_id AS lineFreightId,
               `name`               AS lineFreightName,
               transport_amount     AS lineFreightCount,
               transport_price  as price
        from kwt_logistics_order_line_freight_rate
        where l_order_id = #{orderId}
          AND del_flag = 0
    </select>

    <select id="selectListByOrderIdList" resultType="com.sckw.transport.model.KwtLogisticsOrderLineFreightRate">
        select *
        from kwt_logistics_order_line_freight_rate
        where del_flag = 0
          and l_order_id in <foreach collection="list" item="item" open="(" close=")" separator=",">
                #{item}
    </foreach>

    </select>
</mapper>