From b28fefdb0ee62e4de56e099db0134e90323a7af8 Mon Sep 17 00:00:00 2001 From: laodaming <11058467+laudamine@user.noreply.gitee.com> Date: Mon, 24 Jul 2023 18:39:27 +0800 Subject: [PATCH] fix --- .../internal/logic/getorderdetaillogic.go | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/server/orders/internal/logic/getorderdetaillogic.go b/server/orders/internal/logic/getorderdetaillogic.go index 966decc3..fc6e72f7 100644 --- a/server/orders/internal/logic/getorderdetaillogic.go +++ b/server/orders/internal/logic/getorderdetaillogic.go @@ -204,16 +204,22 @@ func (l *GetOrderDetailLogic) GetOrderDetail(req *types.GetOrderDetailReq, useri } //首款 if payIndex, ok := mapPay[1]; ok { - data.PayInfo.Deposit = types.Deposit{ - Method: *payList[payIndex].Brand, - TransNo: *payList[payIndex].TradeNo, + data.PayInfo = &types.PayInfo{ + Deposit: types.Deposit{ + Method: *payList[payIndex].Brand, + TransNo: *payList[payIndex].TradeNo, + }, + Final: types.Deposit{}, } } //尾款 if payIndex, ok := mapPay[2]; ok { - data.PayInfo.Final = types.Deposit{ - Method: *payList[payIndex].Brand, - TransNo: *payList[payIndex].TradeNo, + data.PayInfo = &types.PayInfo{ + Deposit: types.Deposit{}, + Final: types.Deposit{ + Method: *payList[payIndex].Brand, + TransNo: *payList[payIndex].TradeNo, + }, } } return resp.SetStatusWithMessage(basic.CodeOK, "success", data)