From 529ab2f0fad4130a033a71b4ecdafdc2d6092ea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Wed, 13 Jul 2022 16:47:40 +0800 Subject: [PATCH] 1 --- business/jxcallback/orderman/order.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 66071c8d9..423316ac0 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -491,8 +491,16 @@ func resetCreateWaybillFee(db *dao.DaoDB, order *model.GoodsOrder) (err error) { // 将支出记录修改为退款记录,支付类型为收入,且类型为三方配送时:退费 orderBill[0].BillType = model.BrandBillTypeIncome - newBill := orderBill[0] - _, err = dao.UpdateEntity(dao.GetDB(), newBill) + newBill := &model.BrandBill{ + BrandID: store.BrandID, + Price: orderBill[0].Price, + BillType: model.BrandBillTypeIncome, + FeeType: model.BrandBillFeeTypeDelivery, + VendorOrderID: orderBill[0].VendorOrderID, + OrderID: orderBill[0].OrderID, + } + dao.WrapAddIDCULEntity(newBill, "") + err = dao.CreateEntity(dao.GetDB(), newBill) } return err }