fix:合图调整
This commit is contained in:
parent
c2f61fc61a
commit
8d987c4c54
|
@ -1016,8 +1016,13 @@ func (d *defaultOrder) Create(ctx context.Context, in *CreateReq) (res *CreateRe
|
|||
return errors.New("shoppingCartProductModel3d.StepPrice nil")
|
||||
}
|
||||
|
||||
var fittingPrice int64
|
||||
if shoppingCart.ShoppingCartProductModel3dFitting != nil {
|
||||
fittingPrice = *shoppingCart.ShoppingCartProductModel3dFitting.Price
|
||||
}
|
||||
|
||||
/* 计算价格 */
|
||||
productTotalPrice, productPrice, err := NewShoppingCart(tx, nil, nil).CaculateStepPrice(*shoppingCart.PurchaseQuantity, stepPriceJson, *shoppingCart.ShoppingCartProductModel3dFitting.Price)
|
||||
productTotalPrice, productPrice, err := NewShoppingCart(tx, nil, nil).CaculateStepPrice(*shoppingCart.PurchaseQuantity, stepPriceJson, fittingPrice)
|
||||
if err != nil {
|
||||
errorCode = *basic.CodeErrOrderCreatProductPriceAbsent
|
||||
errorCode.Message = "create order failed, step price of product '" + shoppingCartSnapshot.ProductInfo.ProductName + "'is failed"
|
||||
|
|
|
@ -5,9 +5,10 @@ import (
|
|||
"errors"
|
||||
"fusenapi/model/gmodel"
|
||||
"fusenapi/utils/hash"
|
||||
"strings"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws/session"
|
||||
"gorm.io/gorm"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func NewShoppingCart(gormDB *gorm.DB, bLMServiceUrl *string, awsSession *session.Session) ShoppingCart {
|
||||
|
|
Loading…
Reference in New Issue
Block a user