|
@@ -394,21 +394,27 @@
|
|
|
|
|
|
<select id="queryOffilineOrderList" resultType="com.kmall.admin.entity.OrderEntity">
|
|
|
SELECT distinct
|
|
|
- o.*,
|
|
|
- u.username AS userName,
|
|
|
- p.is_payment_send,
|
|
|
- p.is_ele_order_send,
|
|
|
- p.is_customs_send,
|
|
|
- s.store_name storeName
|
|
|
- FROM
|
|
|
- mall_order o
|
|
|
-
|
|
|
- LEFT JOIN mall_order_process_record p ON o.order_sn = p.order_sn
|
|
|
+ o.id,
|
|
|
+ o.order_sn,
|
|
|
+ u.username as userName,
|
|
|
+ c.pick_up_code_sn,
|
|
|
+ o.pay_name,
|
|
|
+ o.mobile,
|
|
|
+ o.is_onffline_order,
|
|
|
+ o.order_biz_type,
|
|
|
+ o.order_status,
|
|
|
+ o.pay_status,
|
|
|
+ o.coupon_name,
|
|
|
+ o.coupon_price,
|
|
|
+ o.actual_price,
|
|
|
+ o.order_price,
|
|
|
+ o.pay_time,
|
|
|
+ o.pay_flag
|
|
|
+ from mall_order o
|
|
|
LEFT JOIN mall_order_goods g ON o.id = g.order_id
|
|
|
- left join mall_store s on o.store_id = s.id
|
|
|
- LEFT JOIN mall_goods gs ON g.goods_id = gs.id
|
|
|
- left join mall_sale_record record on record.order_sn = o.order_sn
|
|
|
+ LEFT JOIN mall_sale_record record ON record.order_sn = o.order_sn
|
|
|
LEFT JOIN sys_user u ON record.saller_id = u.user_id
|
|
|
+ LEFT JOIN mall_pick_up_code c ON o.order_sn = c.order_sn
|
|
|
WHERE 1=1
|
|
|
<if test="storeId != null and storeId != ''">
|
|
|
AND o.store_id = #{storeId}
|
|
@@ -416,18 +422,6 @@
|
|
|
<if test="merchSn != null and merchSn.trim() != ''">
|
|
|
AND o.merch_sn = #{merchSn}
|
|
|
</if>
|
|
|
- <if test="goodsSn != null and goodsSn.trim() != ''">
|
|
|
- AND gs.goods_sn = #{goodsSn}
|
|
|
- </if>
|
|
|
- <if test="sku != null and sku.trim() != ''">
|
|
|
- AND gs.sku = #{sku}
|
|
|
- </if>
|
|
|
- <if test="prodBarcode != null and prodBarcode.trim() != ''">
|
|
|
- AND gs.prod_barcode = #{prodBarcode}
|
|
|
- </if>
|
|
|
- <if test="thirdPartyMerchCode != null and thirdPartyMerchCode.trim() != ''">
|
|
|
- AND s.third_party_merch_code = #{thirdPartyMerchCode}
|
|
|
- </if>
|
|
|
<if test="orderSn != null and orderSn.trim() != ''">
|
|
|
AND o.order_sn LIKE concat('%',#{orderSn},'%')
|
|
|
</if>
|
|
@@ -1941,7 +1935,37 @@
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
-
|
|
|
+ <select id="queryPickUpCodeList" resultType="com.kmall.admin.entity.OrderEntity">
|
|
|
+ SELECT distinct
|
|
|
+ o.*,
|
|
|
+ c.pick_up_code_sn,
|
|
|
+ c.pick_up_code_status
|
|
|
+ FROM mall_order o
|
|
|
+ LEFT JOIN mall_pick_up_code c ON c.order_sn = o.order_sn
|
|
|
+ WHERE 1=1
|
|
|
+ <if test="storeId != null and storeId != ''">
|
|
|
+ AND o.store_id = #{storeId}
|
|
|
+ </if>
|
|
|
+ <if test="isOnfiilineOrder != null">
|
|
|
+ AND o.is_onffline_order = #{isOnfiilineOrder}
|
|
|
+ </if>
|
|
|
+ <if test="orderSn != null and orderSn.trim() != ''">
|
|
|
+ AND o.order_sn LIKE concat('%',#{orderSn},'%')
|
|
|
+ </if>
|
|
|
+ <if test="payName != null and payName.trim() != ''">
|
|
|
+ AND o.pay_name = LIKE concat('%',#{payName},'%')
|
|
|
+ </if>
|
|
|
+ <if test="payMobile != null and payMobile.trim() != ''">
|
|
|
+ AND o.pay_mobile LIKE concat('%',#{pay_mobile},'%')
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null and startTime.trim() != ''">
|
|
|
+ AND o.add_time >= #{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null and endTime.trim() != ''">
|
|
|
+ AND o.add_time < #{endTime}
|
|
|
+ </if>
|
|
|
+ order by o.id desc
|
|
|
+ </select>
|
|
|
|
|
|
<update id="updateOrderInfo" parameterType="map">
|
|
|
UPDATE mall_order a
|