From 97127bde161da62e32121431d97899ed04096a4e Mon Sep 17 00:00:00 2001 From: xhxu Date: Fri, 24 Sep 2021 14:53:57 +0800 Subject: [PATCH 1/4] wx_order add ShopingStatus --- .../java/com/iformall/domain/po/WxOrder.java | 1 + .../resources/mapper/WxCouponOrderMapper.xml | 42 ++++++++++++++++-- .../main/resources/mapper/WxOrderMapper.xml | 43 +++++++++++++------ 3 files changed, 70 insertions(+), 16 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxOrder.java b/mallinkService/src/main/java/com/iformall/domain/po/WxOrder.java index efbeb162f..8ae6b5681 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxOrder.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxOrder.java @@ -159,4 +159,5 @@ public class WxOrder extends TenantEntity { @io.swagger.annotations.ApiModelProperty(value="配送类型 0:默认(无) 1:自提 2:配送",name="shippingType") private Integer shippingType; + } diff --git a/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml index 6e9623073..b6c6c7332 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml @@ -24,11 +24,18 @@ + + + + + + `id`,`tenant_id`,`parent_tenant_id`,`coupon_id`,`coupon_type`,`c_user_id`,`owner_id`,`b_user_id`,`order_id`,`expired_time`,`coupon_order_status`,`create_date`,`update_date`,`coupon_price`, `auto_refund`, - `verify_type`,`verify_remark`,`pay_vendor`,`send_merchant_id`,`send_merchant_user_id`,`compose_order_type`,`compose_order_id` + `verify_type`,`verify_remark`,`pay_vendor`,`send_merchant_id`,`send_merchant_user_id`,`compose_order_type`,`compose_order_id`, + `freight_price`,`shipping_type`,`shipping_address`,`shipping_status`,`delivery_info` @@ -113,6 +120,14 @@ and `compose_order_id` = #{composeOrderId} + + and `shipping_type` = #{shippingType} + + + + and `shipping_status` = #{shippingStatus} + + and id in @@ -726,6 +741,12 @@ + + + + + + @@ -772,6 +793,12 @@ + + + + + + @@ -814,7 +841,9 @@ --> co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.expired_time,co.coupon_order_status,co.order_id, - co.create_date,co.update_date,co.coupon_price, co.verify_type, co.verify_remark,co.pay_vendor,c.title,c.sale_price,c.use_price,c.price, + co.create_date,co.update_date,co.coupon_price, co.verify_type, co.verify_remark,co.pay_vendor, + co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info`, + c.title,c.sale_price,c.use_price,c.price, co.send_merchant_id,c.unit,c.auto_refund,c.business,c.subsidy_type,c.source_type,ms.subsidy subsidy_num, (CASE WHEN couc.mc = 1 THEN m1.name ELSE '[多商户通用]' END) AS merchant_name, (CASE WHEN couc.mc = 1 THEN m1.id ELSE 0 END) AS merchant_id, @@ -824,6 +853,7 @@ co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id, co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark, co.pay_vendor, + co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info`, c.type,c.title,c.sale_price,c.use_price,c.price,c.unit,c.auto_refund,c.business,c.subsidy_type,ms.subsidy subsidy_num, bu.name, bu.phone as bphone, cu.phone, @@ -847,7 +877,7 @@ RIGHT JOIN ( SELECT co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.c_user_id,co.b_user_id,co.order_id,co.coupon_type, co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.auto_refund,co.verify_type,co.verify_remark,co.pay_vendor - ,co.send_merchant_id + ,co.send_merchant_id,co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info` FROM wx_coupon_order co WHERE 1=1 and co.`tenant_id` = #{tenantId} @@ -976,6 +1006,7 @@ co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark,co.pay_vendor, + co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info`, c.type,c.title,c.sale_price,c.use_price,c.price,c.unit, bu.name, cu.phone @@ -983,6 +1014,7 @@ co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark,co.pay_vendor, + co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info`, c.type,c.title,c.sale_price,c.use_price,c.price,c.unit, cu.phone @@ -1033,7 +1065,9 @@ - co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark,co.pay_vendor + co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id, + co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark,co.pay_vendor, + co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info` @@ -453,6 +464,7 @@ + @@ -469,7 +481,7 @@ o.`id`,o.`order_number`,o.`tenant_id`,o.`parent_tenant_id`,o.`c_user_id`,o.`coupon_channel_id`,o.`product_id`,o.`type`, - o.`payment_type`,o.`payment`,o.`payment_time`,o.`order_status`,o.`create_date`,o.`update_date`,o.`detail`, + o.`payment_type`,o.`payment`,o.`payment_time`,o.`freight_price`,o.`order_status`,o.`create_date`,o.`update_date`,o.`detail`, m.name as merchant_name, bu.name, bu.phone as bphone, cubi.phone, cubi.nick_name, cubi.name c_user_name @@ -514,6 +526,7 @@ + @@ -532,7 +545,7 @@ o.`id`,o.`order_number`,o.`tenant_id`,o.`c_user_id`,o.`coupon_channel_id`,o.`product_id`,o.`type`, - o.`payment_type`,o.`payment`,o.`payment_time`,o.`order_status`,o.`create_date`,o.`update_date`,o.`detail`, + o.`payment_type`,o.`payment`,o.`payment_time`,o.`freight_price`,o.`order_status`,o.`create_date`,o.`update_date`,o.`detail`, m.name as merchant_name, bu.name, bu.phone as bphone, cubi.phone, cubi.nick_name, cubi.name c_user_name, po.id as pay_order_id, po.transaction_id @@ -691,6 +704,7 @@ + @@ -876,6 +890,7 @@ + @@ -899,6 +914,9 @@ + + + @@ -914,6 +932,7 @@ + @@ -944,14 +963,14 @@ - o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.c_user_id,o.coupon_channel_id,o.product_id,o.payment_type,o.payment,o.payment_time,o.order_status, + o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.c_user_id,o.coupon_channel_id,o.product_id,o.payment_type,o.payment,o.payment_time,o.`freight_price`,o.order_status, o.create_date,o.update_date,o.press_end_date,o.press_current_num,o.press_current_value, c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.unit,c.press_limit_num, - o.compose_order_type + o.compose_order_type,o.`shipping_type`,o.`shipping_address` - o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.c_user_id,o.coupon_channel_id,o.product_id,o.payment_type,o.payment,o.payment_time,o.order_status, + o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.c_user_id,o.coupon_channel_id,o.product_id,o.payment_type,o.payment,o.payment_time,o.`freight_price`,o.order_status, o.create_date,o.update_date,o.press_end_date,o.press_current_num,o.press_current_value, c.type as coupon_type,c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.unit,c.detail,c.remark,c.press_limit_num, co.id as coupon_order_id,co.coupon_order_status From 8f5291bc4e59a083ebd1db09256f34c29482dc13 Mon Sep 17 00:00:00 2001 From: xhxu Date: Fri, 24 Sep 2021 15:03:57 +0800 Subject: [PATCH 2/4] wx_coupon_order add --- .../resources/mapper/WxCouponOrderMapper.xml | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml index e637eb31f..77b277cb9 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml @@ -1115,11 +1115,13 @@ co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark,co.pay_vendor, + co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info`, c.type,c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.tail_price,c.orig_price,c.unit,c.detail,c.remark,c.valid_type,c.valid_start_date,c.valid_end_date,c.pick_start_date,c.pick_end_date,c.auto_refund - co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark,co.pay_vendor + co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id,co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark,co.pay_vendor, + co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info` @@ -1140,7 +1142,12 @@ - + + + + + + @@ -1192,6 +1199,12 @@ + + + + + + @@ -1245,6 +1258,7 @@ --> co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark,co.pay_vendor, + co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info` c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.unit,c.valid_type,c.valid_start_date,c.valid_end_date,c.auto_refund From a9ff3a0c68de0dd14dd68b88c5b4ac5f77c0b542 Mon Sep 17 00:00:00 2001 From: xhxu Date: Fri, 24 Sep 2021 15:37:20 +0800 Subject: [PATCH 3/4] wx_coupon_order add --- .../src/main/resources/mapper/WxCouponOrderMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml index 77b277cb9..d83f94de1 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml @@ -1258,7 +1258,7 @@ --> co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark,co.pay_vendor, - co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info` + co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info`, c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.unit,c.valid_type,c.valid_start_date,c.valid_end_date,c.auto_refund From 91fa95119c5a62230fd67fe1c5948af78b478429 Mon Sep 17 00:00:00 2001 From: xhxu Date: Fri, 24 Sep 2021 16:49:55 +0800 Subject: [PATCH 4/4] wx_coupon_order add --- .../iformall/domain/vo/WxOrderCouponVo.java | 23 +++++++++++++++++++ .../resources/mapper/WxCouponOrderMapper.xml | 16 ++++++++++--- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/domain/vo/WxOrderCouponVo.java b/mallinkService/src/main/java/com/iformall/domain/vo/WxOrderCouponVo.java index c3df7e84e..38f191bc3 100644 --- a/mallinkService/src/main/java/com/iformall/domain/vo/WxOrderCouponVo.java +++ b/mallinkService/src/main/java/com/iformall/domain/vo/WxOrderCouponVo.java @@ -2,10 +2,12 @@ package com.iformall.domain.vo; import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.iformall.common.SortColumn; import com.iformall.domain.po.base.TenantEntity; import lombok.Data; import lombok.EqualsAndHashCode; +import java.math.BigDecimal; import java.util.Date; import java.util.List; @@ -109,4 +111,25 @@ public class WxOrderCouponVo extends TenantEntity { @io.swagger.annotations.ApiModelProperty(value="组合订单编号",name="composeOrderId") private Long composeOrderId; + + @io.swagger.annotations.ApiModelProperty(value="运费",name="freightPrice") + private Integer freightPrice; + + @TableField(exist = false) + @SortColumn(column = "freight_price") + private String freightPriceStr; + + public String getFreightPriceStr() { + if(freightPrice!=null) { + freightPriceStr = new BigDecimal(freightPrice).divide(new BigDecimal(100)).toString(); + } + return freightPriceStr; + } + + @io.swagger.annotations.ApiModelProperty(value="收货地址",name="shippingAddress") + private String shippingAddress; + + @io.swagger.annotations.ApiModelProperty(value="配送类型 0:默认(无) 1:自提 2:配送",name="shippingType") + private Integer shippingType; + } diff --git a/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml index d83f94de1..c79bc0199 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponOrderMapper.xml @@ -1268,9 +1268,19 @@ where 1=1 and co.coupon_id = c.id - and co.coupon_type != 5 - and co.coupon_type != 51 - and co.coupon_type < 100 + + + and co.coupon_type = #{couponType} + + + and co.coupon_type != 5 + and co.coupon_type != 11 + and co.coupon_type != 12 + and co.coupon_type != 51 + and co.coupon_type < 100 + + + and co.c_user_id = #{cUserId}