| | |
| | | create_time |
| | | ) value (null ,#{orderId},#{url},#{name},now()) |
| | | </insert> |
| | | <insert id="saveLonLat"> |
| | | insert into t_order_lonlat(id,orderId,lon,lat) value (null,#{id},#{lon},#{lat}) |
| | | </insert> |
| | | |
| | | <update id="agreePay"> |
| | | update t_order set pay_audit =1 where id=#{number} |
| | |
| | | left JOIN t_country t5 on t1.e_state = t5.id |
| | | LEFT JOIN t_goods t6 on t6.order_id = t1.id |
| | | left join t_user t7 on t1.user_id = t7.id |
| | | where (t1.s_driverId = #{id}) |
| | | where (t1.s_driverId = #{id} or t1.s_driverId_one=#{id} or t1.e_driverId_one = #{id} or t1.e_driverId = #{id} ) |
| | | <if test="containerNo !=null and containerNo !=''"> |
| | | and t6.container_number like concat("%",#{containerNo},"%") |
| | | </if> |
| | |
| | | <if test="type !=1"> |
| | | and t1.status =1 |
| | | </if> |
| | | union all |
| | | select t7.phone phone, CONCAT(t2.`name`,t3.`name`) start,2 type,t1.id orderId,t1.status,CONCAT(t1.e_address,t4.name,t5.name,t1.e_zip_code) end,t1.shipment_date pickUpTime,t6.container_number ccontainerNumber ,t1.type sendType from t_order t1 |
| | | left JOIN t_port t2 on t1.`port` = t2.id |
| | | LEFT JOIN t_country t3 on t2.city =t3.id |
| | | left JOIN t_country t4 on t1.e_city =t4.id |
| | | left JOIN t_country t5 on t1.e_state = t5.id |
| | | LEFT JOIN t_goods t6 on t6.order_id = t1.id |
| | | left join t_user t7 on t1.user_id = t7.id |
| | | where (t1.s_driverId_one = #{id} ) |
| | | <if test="containerNo !=null and containerNo !=''"> |
| | | and t6.container_number like concat("%",#{containerNo},"%") |
| | | </if> |
| | | <if test="sTime !=null"> |
| | | and t1.shipment_date between #{sTime} and #{eTime} |
| | | </if> |
| | | <if test="type ==1"> |
| | | and t1.status !=1 |
| | | </if> |
| | | <if test="type !=1"> |
| | | and t1.status =1 |
| | | </if> |
| | | union all |
| | | select t7.phone phone, CONCAT(t2.`name`,t3.`name`) start,3 type,t1.id orderId,t1.status,CONCAT(t1.e_address,t4.name,t5.name,t1.e_zip_code) end,t1.shipment_date pickUpTime,t6.container_number ccontainerNumber,t1.type sendType from t_order t1 |
| | | left JOIN t_port t2 on t1.`port` = t2.id |
| | | LEFT JOIN t_country t3 on t2.city =t3.id |
| | | left JOIN t_country t4 on t1.e_city =t4.id |
| | | left JOIN t_country t5 on t1.e_state = t5.id |
| | | LEFT JOIN t_goods t6 on t6.order_id = t1.id |
| | | left join t_user t7 on t1.user_id = t7.id |
| | | where ( t1.e_driverId_one = #{id}) |
| | | <if test="containerNo !=null and containerNo !=''"> |
| | | and t6.container_number like concat("%",#{containerNo},"%") |
| | | </if> |
| | | <if test="sTime !=null"> |
| | | and t1.shipment_date between #{sTime} and #{eTime} |
| | | </if> |
| | | <if test="type ==1"> |
| | | and t1.status !=1 |
| | | </if> |
| | | <if test="type !=1"> |
| | | and t1.status =1 |
| | | </if> |
| | | union all |
| | | select t7.phone phone, CONCAT(t2.`name`,t3.`name`) start,4 type,t1.id orderId,t1.status,CONCAT(t1.e_address,t4.name,t5.name,t1.e_zip_code) end,t1.shipment_date pickUpTime,t6.container_number ccontainerNumber ,t1.type sendType from t_order t1 |
| | | left JOIN t_port t2 on t1.`port` = t2.id |
| | | LEFT JOIN t_country t3 on t2.city =t3.id |
| | | left JOIN t_country t4 on t1.e_city =t4.id |
| | | left JOIN t_country t5 on t1.e_state = t5.id |
| | | LEFT JOIN t_goods t6 on t6.order_id = t1.id |
| | | left join t_user t7 on t1.user_id = t7.id |
| | | where ( t1.e_driverId = #{id} ) |
| | | <if test="containerNo !=null and containerNo !=''"> |
| | | and t6.container_number like concat("%",#{containerNo},"%") |
| | | </if> |
| | | <if test="sTime !=null"> |
| | | and t1.shipment_date between #{sTime} and #{eTime} |
| | | </if> |
| | | <if test="type ==1"> |
| | | and t1.status !=1 |
| | | </if> |
| | | <if test="type !=1"> |
| | | and t1.status =1 |
| | | </if> |
| | | <!-- union all--> |
| | | <!-- select t7.phone phone, CONCAT(t2.`name`,t3.`name`) start,2 type,t1.id orderId,t1.status,CONCAT(t1.e_address,t4.name,t5.name,t1.e_zip_code) end,t1.shipment_date pickUpTime,t6.container_number ccontainerNumber ,t1.type sendType from t_order t1--> |
| | | <!-- left JOIN t_port t2 on t1.`port` = t2.id--> |
| | | <!-- LEFT JOIN t_country t3 on t2.city =t3.id--> |
| | | <!-- left JOIN t_country t4 on t1.e_city =t4.id--> |
| | | <!-- left JOIN t_country t5 on t1.e_state = t5.id--> |
| | | <!-- LEFT JOIN t_goods t6 on t6.order_id = t1.id--> |
| | | <!-- left join t_user t7 on t1.user_id = t7.id--> |
| | | <!-- where (t1.s_driverId_one = #{id} )--> |
| | | <!-- <if test="containerNo !=null and containerNo !=''">--> |
| | | <!-- and t6.container_number like concat("%",#{containerNo},"%")--> |
| | | <!-- </if>--> |
| | | <!-- <if test="sTime !=null">--> |
| | | <!-- and t1.shipment_date between #{sTime} and #{eTime}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="type ==1">--> |
| | | <!-- and t1.status !=1--> |
| | | <!-- </if>--> |
| | | <!-- <if test="type !=1">--> |
| | | <!-- and t1.status =1--> |
| | | <!-- </if>--> |
| | | <!-- union all--> |
| | | <!-- select t7.phone phone, CONCAT(t2.`name`,t3.`name`) start,3 type,t1.id orderId,t1.status,CONCAT(t1.e_address,t4.name,t5.name,t1.e_zip_code) end,t1.shipment_date pickUpTime,t6.container_number ccontainerNumber,t1.type sendType from t_order t1--> |
| | | <!-- left JOIN t_port t2 on t1.`port` = t2.id--> |
| | | <!-- LEFT JOIN t_country t3 on t2.city =t3.id--> |
| | | <!-- left JOIN t_country t4 on t1.e_city =t4.id--> |
| | | <!-- left JOIN t_country t5 on t1.e_state = t5.id--> |
| | | <!-- LEFT JOIN t_goods t6 on t6.order_id = t1.id--> |
| | | <!-- left join t_user t7 on t1.user_id = t7.id--> |
| | | <!-- where ( t1.e_driverId_one = #{id})--> |
| | | <!-- <if test="containerNo !=null and containerNo !=''">--> |
| | | <!-- and t6.container_number like concat("%",#{containerNo},"%")--> |
| | | <!-- </if>--> |
| | | <!-- <if test="sTime !=null">--> |
| | | <!-- and t1.shipment_date between #{sTime} and #{eTime}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="type ==1">--> |
| | | <!-- and t1.status !=1--> |
| | | <!-- </if>--> |
| | | <!-- <if test="type !=1">--> |
| | | <!-- and t1.status =1--> |
| | | <!-- </if>--> |
| | | <!-- union all--> |
| | | <!-- select t7.phone phone, CONCAT(t2.`name`,t3.`name`) start,4 type,t1.id orderId,t1.status,CONCAT(t1.e_address,t4.name,t5.name,t1.e_zip_code) end,t1.shipment_date pickUpTime,t6.container_number ccontainerNumber ,t1.type sendType from t_order t1--> |
| | | <!-- left JOIN t_port t2 on t1.`port` = t2.id--> |
| | | <!-- LEFT JOIN t_country t3 on t2.city =t3.id--> |
| | | <!-- left JOIN t_country t4 on t1.e_city =t4.id--> |
| | | <!-- left JOIN t_country t5 on t1.e_state = t5.id--> |
| | | <!-- LEFT JOIN t_goods t6 on t6.order_id = t1.id--> |
| | | <!-- left join t_user t7 on t1.user_id = t7.id--> |
| | | <!-- where ( t1.e_driverId = #{id} )--> |
| | | <!-- <if test="containerNo !=null and containerNo !=''">--> |
| | | <!-- and t6.container_number like concat("%",#{containerNo},"%")--> |
| | | <!-- </if>--> |
| | | <!-- <if test="sTime !=null">--> |
| | | <!-- and t1.shipment_date between #{sTime} and #{eTime}--> |
| | | <!-- </if>--> |
| | | <!-- <if test="type ==1">--> |
| | | <!-- and t1.status !=1--> |
| | | <!-- </if>--> |
| | | <!-- <if test="type !=1">--> |
| | | <!-- and t1.status =1--> |
| | | <!-- </if>--> |
| | | </select> |
| | | <select id="getLonLat" resultType="java.util.Map"> |
| | | select lon,lat from t_order_lonlat where orderId =#{orderId} |
| | | </select> |
| | | |
| | | </mapper> |