Browse Source

Merge remote-tracking branch 'origin/developer' into developerA

# Conflicts:
#	src/main/resources/mapper/SubmitMapper.xml
chao 3 years ago
parent
commit
bb9852727d

+ 4 - 0
src/main/java/com/caimei365/order/model/po/OrderShopPo.java

@@ -53,6 +53,10 @@ public class OrderShopPo implements Serializable {
      * 协销Id
      * 协销Id
      */
      */
     private Integer spId;
     private Integer spId;
+    /**
+     * 订单类型 协销订单 0, 普通订单 1
+     */
+    private Integer orderType;
     /**
     /**
      * 订单促销id(店铺促销)
      * 订单促销id(店铺促销)
      */
      */

+ 12 - 1
src/main/java/com/caimei365/order/service/impl/SubmitServiceImpl.java

@@ -789,7 +789,13 @@ public class SubmitServiceImpl implements SubmitService {
             shopOrder.setPayedShopAmount(0d);
             shopOrder.setPayedShopAmount(0d);
             // (付款供应商)付款状态:1待付款、2部分付款、3已付款
             // (付款供应商)付款状态:1待付款、2部分付款、3已付款
             shopOrder.setPayStatus(1);
             shopOrder.setPayStatus(1);
-
+            if (3 == orderParamBo.getCartType()) {
+                // 协销订单
+                shopOrder.setOrderType(0);
+            } else {
+                // 普通订单
+                shopOrder.setOrderType(1);
+            }
             // 添加到子订单列表
             // 添加到子订单列表
             shopOrderList.add(shopOrder);
             shopOrderList.add(shopOrder);
             // 统计商品总金额
             // 统计商品总金额
@@ -1125,6 +1131,10 @@ public class SubmitServiceImpl implements SubmitService {
             if (3 == orderParamBo.getCartType()) {
             if (3 == orderParamBo.getCartType()) {
                 // 协销订单
                 // 协销订单
                 postageOrder.setSpId(orderParamBo.getBuyUserId());
                 postageOrder.setSpId(orderParamBo.getBuyUserId());
+                postageOrder.setOrderType(0);
+            } else {
+                // 普通订单
+                postageOrder.setOrderType(1);
             }
             }
             // 订单默认可拆分
             // 订单默认可拆分
             postageOrder.setSplitFlag(1);
             postageOrder.setSplitFlag(1);
@@ -1501,6 +1511,7 @@ public class SubmitServiceImpl implements SubmitService {
         rechargeShopOrder.setOrderTime(mainOrder.getOrderTime());
         rechargeShopOrder.setOrderTime(mainOrder.getOrderTime());
         rechargeShopOrder.setCanRefundAmount(0d);
         rechargeShopOrder.setCanRefundAmount(0d);
         rechargeShopOrder.setSplitFlag(0);
         rechargeShopOrder.setSplitFlag(0);
+        rechargeShopOrder.setOrderType(0);
         /*
         /*
          * 保存子订单
          * 保存子订单
          */
          */

+ 2 - 2
src/main/resources/mapper/SubmitMapper.xml

@@ -18,11 +18,11 @@
                 #{clauseId},#{clauseName})
                 #{clauseId},#{clauseName})
     </insert>
     </insert>
     <insert id="insertShopOrder" keyColumn="shopOrderID" keyProperty="shopOrderId" parameterType="com.caimei365.order.model.po.OrderShopPo" useGeneratedKeys="true">
     <insert id="insertShopOrder" keyColumn="shopOrderID" keyProperty="shopOrderId" parameterType="com.caimei365.order.model.po.OrderShopPo" useGeneratedKeys="true">
-        INSERT INTO cm_shop_order (shopOrderNo, orderID, orderNo, shopID, note, userID, clubID,
+        INSERT INTO cm_shop_order (shopOrderNo, orderID, orderNo, shopID, note, userID, clubID, orderType,
                                    spID, orderPromotionsId, promotionFullReduction, svipShopReduction, brokerage, canRefundAmount, itemCount,
                                    spID, orderPromotionsId, promotionFullReduction, svipShopReduction, brokerage, canRefundAmount, itemCount,
                                    totalAmount, productAmount, needPayAmount, shopProductAmount, shopPostFee, shopTaxFee,
                                    totalAmount, productAmount, needPayAmount, shopProductAmount, shopPostFee, shopTaxFee,
                                    shouldPayShopAmount, orderTime, orderSubmitType, splitFlag, payStatus, payedShopAmount)
                                    shouldPayShopAmount, orderTime, orderSubmitType, splitFlag, payStatus, payedShopAmount)
-        VALUES (#{shopOrderNo},#{orderId},#{orderNo},#{shopId}, #{note},#{userId},#{clubId},
+        VALUES (#{shopOrderNo},#{orderId},#{orderNo},#{shopId}, #{note},#{userId},#{clubId},#{orderType},
                 #{spId},#{orderPromotionsId},#{promotionFullReduction},#{svipShopReduction},#{brokerage},#{canRefundAmount},#{itemCount},
                 #{spId},#{orderPromotionsId},#{promotionFullReduction},#{svipShopReduction},#{brokerage},#{canRefundAmount},#{itemCount},
                 #{totalAmount},#{productAmount},#{needPayAmount},#{shopProductAmount},#{shopPostFee},#{shopTaxFee},
                 #{totalAmount},#{productAmount},#{needPayAmount},#{shopProductAmount},#{shopPostFee},#{shopTaxFee},
                 #{shouldPayShopAmount},#{orderTime},#{orderSubmitType},#{splitFlag},#{payStatus},#{payedShopAmount})
                 #{shouldPayShopAmount},#{orderTime},#{orderSubmitType},#{splitFlag},#{payStatus},#{payedShopAmount})