123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- <?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.CargoConsignMapper">
-
- <select id="queryOrdersBySupplier" parameterType="Params" resultType="SendOrder">
- select
- o.order_id,
- u.person_name as carrier_name,
- o.part_no,
- o.box_no,
- o.inbox_qty,
- o.send_time,
- o.update_time,
- s.status_name
- from
- orders o
- left join
- status s
- on
- o.status_id=s.status_id
- left join
- users u
- on
- o.carrier_id=u.user_id
- <where>
- o.supplier_id=#{userId}
- and o.status_id not in (1)
- <if test="orderId!=null">
- and o.order_id=#{orderId}
- </if>
- <if test="boxNo!=null and boxNo!=''">
- and o.box_no=#{boxNo}
- </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="findQueryCountBySupplier" parameterType="Params" resultType="int">
- select
- count(*)
- from
- orders
- <where>
- supplier_id=#{userId}
- and o.status_id not in (1)
- <if test="orderId!=null">
- and order_id=#{orderId}
- </if>
- <if test="boxNo!=null">
- and box_no=#{boxNo}
- </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>
-
- <select id="queryOrdersByCarrier" parameterType="Params" resultType="SendOrder">
- select
- o.order_id,
- o.part_no,
- o.box_no,
- o.inbox_qty,
- o.send_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}
- and o.status_id not in (1,2)
- <if test="orderId!=null">
- and o.order_id=#{orderId}
- </if>
- <if test="boxNo!=null">
- and o.box_no=#{boxNo}
- </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}
- and o.status_id not in (1,2)
- <if test="orderId!=null">
- and order_id=#{orderId}
- </if>
- <if test="boxNo!=null">
- and box_no=#{boxNo}
- </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>
-
- <update id="doCarry">
- update
- orders
- set
- transport_time=#{transportTime},
- status_id=#{statusId},
- update_time=#{updateTime},
- car_no=#{carNo}
- where
- order_id=#{orderId}
- </update>
-
- </mapper>
|