From 916e1cece0d60ad9f70d2975c9bf8a0c20c67972 Mon Sep 17 00:00:00 2001 From: suguer <1980841508@qq.com> Date: Thu, 24 Nov 2022 09:15:49 +0800 Subject: [PATCH] fix(error): json: cannot unmarshal number 2040.000000 into Go struct field CalculateTotalPriceResult.result.totalPrice of type int --- services/billing/apis/CalculateTotalPrice.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/billing/apis/CalculateTotalPrice.go b/services/billing/apis/CalculateTotalPrice.go index 6e1758b0..fa5841fe 100644 --- a/services/billing/apis/CalculateTotalPrice.go +++ b/services/billing/apis/CalculateTotalPrice.go @@ -214,7 +214,7 @@ type CalculateTotalPriceResponse struct { } type CalculateTotalPriceResult struct { - TotalPrice int `json:"totalPrice"` + TotalPrice float32 `json:"totalPrice"` TotalPriceScale4 int `json:"totalPriceScale4"` DiscountedTotalPrice int `json:"discountedTotalPrice"` TotalDiscount int `json:"totalDiscount"`