12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?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.fuzamei.mapperInterface.CargoDeliverMapper">
-
- <select id="queryOrdersByCarrier" parameterType="Params" resultType="DeliverOrder">
- select
- o.order_id,
- o.box_no,
- o.box_qty,
- o.car_no,
- o.transport_time,
- o.update_time,
- s.status_name
- from
- orders o
- left join
- status s
- on
- o.status_id=s.status_id
- <where>
- o.carrier_id=#{userId}
- <if test="orderId!=null">
- and o.order_id=#{orderId}
- </if>
- <if test="carNo!=null">
- and o.car_no=#{carNo}
- </if>
- <if test="statusId!=null">
- and o.status_id=#{statusId}
- </if>
- <if test="startTime!=null and endTime!=null">
- and o.require_time between #{startTime} and #{endTime}
- </if>
- </where>
- order by o.require_time desc
- limit #{startPage},#{rowNum}
- </select>
-
-
- <select id="findQueryCountByCarrier" parameterType="Params" resultType="int">
- select
- count(*)
- from
- orders
- <where>
- carrier_id=#{userId}
- <if test="orderId!=null">
- and order_id=#{orderId}
- </if>
- <if test="carNo!=null">
- and car_no=#{carNo}
- </if>
- <if test="statusId!=null">
- and status_id=#{statusId}
- </if>
- <if test="startTime!=null and endTime!=null">
- and require_time between #{startTime} and #{endTime}
- </if>
- </where>
- </select>
- </mapper>
|