This commit is contained in:
laodaming 2023-09-26 16:40:13 +08:00
commit e2508cc347
2 changed files with 6 additions and 3 deletions

View File

@ -844,11 +844,14 @@ func (d *defaultOrder) Create(ctx context.Context, in *CreateReq) (res *CreateRe
var stepPriceJson gmodel.StepPriceJsonStruct var stepPriceJson gmodel.StepPriceJsonStruct
if shoppingCartProductModel3d.StepPrice != nil && len(*shoppingCartProductModel3d.StepPrice) != 0 { if shoppingCartProductModel3d.StepPrice != nil && len(*shoppingCartProductModel3d.StepPrice) != 0 {
json.Unmarshal(*shoppingCartProductModel3d.StepPrice, &shoppingCartProductModel3d.StepPrice) err = json.Unmarshal(*shoppingCartProductModel3d.StepPrice, &shoppingCartProductModel3d.StepPrice)
if err != nil {
return err
}
} else { } else {
errorCode = *basic.CodeErrOrderCreatProductPriceAbsent errorCode = *basic.CodeErrOrderCreatProductPriceAbsent
errorCode.Message = "create order failed, step price of product '" + shoppingCartSnapshot.ProductInfo.ProductName + "'is failed" errorCode.Message = "create order failed, step price of product '" + shoppingCartSnapshot.ProductInfo.ProductName + "'is failed"
return err return errors.New("shoppingCartProductModel3d.StepPrice nil")
} }
/* 计算价格 */ /* 计算价格 */

View File

@ -107,7 +107,7 @@ var (
CodeErrOrderCreatProductPriceAbsent = &StatusResponse{5304, "create order failed, price of product is absent"} // 订单创建失败,商品价格不存在 CodeErrOrderCreatProductPriceAbsent = &StatusResponse{5304, "create order failed, price of product is absent"} // 订单创建失败,商品价格不存在
CodeErrOrderCreatProductAccessoryAbsent = &StatusResponse{5305, "create order failed, accessory of product is absent"} // 订单创建失败,商品配件不存在 CodeErrOrderCreatProductAccessoryAbsent = &StatusResponse{5305, "create order failed, accessory of product is absent"} // 订单创建失败,商品配件不存在
CodeErrOrderCreatePrePaymentParam = &StatusResponse{5306, "create payment failed, the shipping address is illegal"} // 订单创建失败,商品配件不存在 CodeErrOrderCreatePrePaymentParam = &StatusResponse{5306, "create payment failed, the shipping address is illegal"} // 订单创建失败,商品配件不存在
CodeErrOrderCreatePrePaymentInfoNoFound = &StatusResponse{5307, "create payment failed, order info not found"} CodeErrOrderCreatePrePaymentInfoNoFound = &StatusResponse{5307, "order info not found"}
CodeErrOrderCreatePrePaymentNoUnPaid = &StatusResponse{5308, "create payment failed, order is not unpaid"} CodeErrOrderCreatePrePaymentNoUnPaid = &StatusResponse{5308, "create payment failed, order is not unpaid"}
CodeErrOrderCreatePrePaymentPaid = &StatusResponse{5309, "create payment failed, order is paid"} CodeErrOrderCreatePrePaymentPaid = &StatusResponse{5309, "create payment failed, order is paid"}
CodeErrOrderCreatePrePaymentTimeout = &StatusResponse{5310, "create payment failed, timeout"} CodeErrOrderCreatePrePaymentTimeout = &StatusResponse{5310, "create payment failed, timeout"}