<?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.kxs.store.biz.mapper.KxsMachineApplyDetailMapper">

    <resultMap type="com.kxs.store.api.model.KxsMachineApplyDetail" id="KxsMachineApplyDetailMap">
        <result column="id" property="id" />
        <result column="create_time" property="createTime" />
        <result column="update_time" property="updateTime" />
        <result column="del_flag" property="delFlag" />
        <result column="version" property="version" />
        <result column="order_id" property="orderId" />
        <result column="recycle_machine_id" property="recycleMachineId" />
        <result column="ticket_id" property="ticketId" />
        <result column="apply_type" property="applyType" />
        <result column="ticket_code" property="ticketCode" />
        <result column="pos_sn" property="posSn" />
        <result column="machine_id" property="machineId" />

    </resultMap>
    <select id="listDateQueries" resultType="java.lang.String">
        select b.pos_sn
        from kxs_machine_apply a
        left join kxs_machine_apply_detail b on a.id = b.order_id
        <where>
            and a.brand_id = #{brandId}
            and a.warehouse_id = #{warehouseId}
            and a.status = 1
            and a.create_time between #{startTime} and #{endTime}
        </where>
    </select>

</mapper>
