From f68032c8ea57f61bfe3f0524c1036bbfe949cfcc Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Wed, 27 Sep 2023 17:40:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/repositories/order.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/service/repositories/order.go b/service/repositories/order.go index d9f948e1..5f3aed5f 100644 --- a/service/repositories/order.go +++ b/service/repositories/order.go @@ -287,7 +287,6 @@ func (d *defaultOrder) PaymentSuccessful(ctx context.Context, in *PaymentSuccess StatusTitle: constants.PayStatusMessage[constants.PAY_STATUS_PAID], } payInfo.StatusLink = append(ress.OrderDetailOriginal.OrderAmount.Deposit.StatusLink, payInfo.Status) - payStatusLink = payInfo.StatusLink orderAmount["deposit"] = payInfo } if payStage == "remaining_balance" { @@ -329,10 +328,11 @@ func (d *defaultOrder) PaymentSuccessful(ctx context.Context, in *PaymentSuccess } payInfo.StatusLink = append(ress.OrderDetailOriginal.OrderAmount.RemainingBalance.StatusLink, payInfo.Status) - payStatusLink = payInfo.StatusLink orderAmount["remaining_balance"] = payInfo } + payStatusLink = append(ress.OrderDetailOriginal.PayStatusLink, payInfo.Status) + orderAmountByte, err := json.Marshal(orderAmount) if err != nil { logc.Errorf(ctx, "PaymentSuccessful failed Marshal orderAmount,eventId:%s, err: %v", in.EventId, err) @@ -1173,10 +1173,10 @@ func (d *defaultOrder) OrderDetailHandler(ctx context.Context, orderInfo *gmodel if original == 1 { orderDetail.DeliveryAddress = orderAddress orderDetail.OrderAmount = orderAmount - orderDetail.OrderAmount.Deposit.PayAmount = order.GetAmountInfoFormat(&orderDetail.OrderAmount.Deposit.PayAmount) - orderDetail.OrderAmount.RemainingBalance.PayAmount = order.GetAmountInfoFormat(&orderDetail.OrderAmount.RemainingBalance.PayAmount) - orderDetail.OrderAmount.Subtotal = order.GetAmountInfoFormat(&orderDetail.OrderAmount.Subtotal) - orderDetail.OrderAmount.Total = order.GetAmountInfoFormat(&orderDetail.OrderAmount.Total) + orderDetail.OrderAmount.Deposit.PayAmount = order.GetAmountInfoFormat(&orderAmount.Deposit.PayAmount) + orderDetail.OrderAmount.RemainingBalance.PayAmount = order.GetAmountInfoFormat(&orderAmount.RemainingBalance.PayAmount) + orderDetail.OrderAmount.Subtotal = order.GetAmountInfoFormat(&orderAmount.Subtotal) + orderDetail.OrderAmount.Total = order.GetAmountInfoFormat(&orderAmount.Total) orderDetail.PayStatus = constants.OrderPayStatusCode(*orderInfo.PayStatus) orderDetail.PayTimeout = time.Duration(orderInfo.Ctime.Add(30*time.Minute).UTC().Unix() - time.Now().UTC().Unix()) orderDetail.OrderInfo = gmodel.OrderInfo{ @@ -1186,7 +1186,7 @@ func (d *defaultOrder) OrderDetailHandler(ctx context.Context, orderInfo *gmodel Ctime: orderInfo.Ctime, Utime: orderInfo.Utime, Status: status, - StatusLink: order.GetOrderStatusLinkUser(orderDetail.OrderInfo.DeliveryMethod, statusLink), + StatusLink: order.GetOrderStatusLinkUser(*orderInfo.DeliveryMethod, statusLink), Metadata: orderMetadata, }