diff --git a/server/orders/internal/logic/getorderdetaillogic.go b/server/orders/internal/logic/getorderdetaillogic.go index fc6e72f7..72153f67 100644 --- a/server/orders/internal/logic/getorderdetaillogic.go +++ b/server/orders/internal/logic/getorderdetaillogic.go @@ -202,24 +202,19 @@ func (l *GetOrderDetailLogic) GetOrderDetail(req *types.GetOrderDetailReq, useri IsDefault: *addressInfo.IsDefault, } } + data.PayInfo = &types.PayInfo{} //首款 if payIndex, ok := mapPay[1]; ok { - data.PayInfo = &types.PayInfo{ - Deposit: types.Deposit{ - Method: *payList[payIndex].Brand, - TransNo: *payList[payIndex].TradeNo, - }, - Final: types.Deposit{}, + data.PayInfo.Deposit = types.Deposit{ + Method: *payList[payIndex].Brand, + TransNo: *payList[payIndex].TradeNo, } } //尾款 if payIndex, ok := mapPay[2]; ok { - data.PayInfo = &types.PayInfo{ - Deposit: types.Deposit{}, - Final: types.Deposit{ - Method: *payList[payIndex].Brand, - TransNo: *payList[payIndex].TradeNo, - }, + data.PayInfo.Final = types.Deposit{ + Method: *payList[payIndex].Brand, + TransNo: *payList[payIndex].TradeNo, } } return resp.SetStatusWithMessage(basic.CodeOK, "success", data)