From 8f6b9207d240414bd0ca94f5f132f41422dbcae9 Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Fri, 17 Nov 2023 18:21:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/gmodel/fs_product_model3d_logic.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/model/gmodel/fs_product_model3d_logic.go b/model/gmodel/fs_product_model3d_logic.go index ced105c5..cc7a6959 100755 --- a/model/gmodel/fs_product_model3d_logic.go +++ b/model/gmodel/fs_product_model3d_logic.go @@ -3,7 +3,6 @@ package gmodel import ( "context" "encoding/json" - "errors" "fmt" "fusenapi/constants" "sort" @@ -185,7 +184,7 @@ func (d *FsProductModel3dModel) GetProductMinPrice(modelList []FsProductModel3d, } var stepPrice StepPriceJsonStruct if err := json.Unmarshal(*modelInfo.StepPrice, &stepPrice); err != nil { - return errors.New(fmt.Sprintf("failed to parse model step price:%d", modelInfo.Id)) + return fmt.Errorf("failed to parse model step price:%d", modelInfo.Id) } lenRange := len(stepPrice.PriceRange) if lenRange == 0 {