From c07a82018b20a1e3119fd30b2f619ad4748b8575 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Tue, 1 Sep 2020 16:53:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E5=90=88=E5=B9=B6=E5=89=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxcallback/orderman/order.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 5e1d6bd6c..a143656b7 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -1387,9 +1387,28 @@ func MergeJdsOrders(ctx *jxcontext.Context, vendorOrderIDs []string) (vendorOrde return "", fmt.Errorf("该门店未绑定京狗平台,请先绑定后再转移!门店:[%v]", storeID) } stores, _ := dao.GetStoreList(db, []int{storeID}, nil, nil, nil, "") + var ( + newEarningPrice int64 + actualPrice int64 + shopPrice int64 + salePrice int64 + totalShop int64 + ) + for _, v := range orders { + newEarningPrice += v.NewEarningPrice + actualPrice += v.ActualPayPrice + shopPrice += v.ShopPrice + salePrice += v.SalePrice + totalShop += v.TotalShopMoney + } store := stores[0] order := orders[0] order.ID = 0 + order.NewEarningPrice = newEarningPrice + order.ActualPayPrice = actualPrice + order.SalePrice = salePrice + order.ShopPrice = shopPrice + order.TotalShopMoney = totalShop order.VendorOrderID = utils.Int64ToStr(utils.Str2Int64(orders[0].VendorOrderID2)*10000) + utils.Int2Str(99) order.VendorOrderID2 = strings.Join(orderIDs, ",") order.Status = model.OrderStatusNew