fix
This commit is contained in:
@@ -123,7 +123,7 @@ func (l *CalculateCartPriceLogic) CalculateCartPrice(req *types.CalculateCartPri
|
||||
}
|
||||
}
|
||||
//计算价格
|
||||
itemPrice, totalPrice, _, _, err := shopping_cart.CaculateCartPrice(reqPurchaseQuantity, &sizePrice, fittingPrice)
|
||||
itemPrice, totalPrice, _, _, err := l.svcCtx.Repositories.NewShoppingCart.CaculateCartPrice(reqPurchaseQuantity, &sizePrice, fittingPrice)
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
return err
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"fusenapi/model/gmodel"
|
||||
"fusenapi/server/shopping-cart/internal/svc"
|
||||
"fusenapi/server/shopping-cart/internal/types"
|
||||
"fusenapi/service/repositories"
|
||||
"fusenapi/utils/auth"
|
||||
"fusenapi/utils/basic"
|
||||
"fusenapi/utils/format"
|
||||
@@ -90,9 +91,9 @@ func (l *GetCartsLogic) GetCarts(req *types.GetCartsReq, userinfo *auth.UserInfo
|
||||
}
|
||||
//定义map收集变更信息
|
||||
mapCartChange := make(map[int64]string)
|
||||
mapSnapshot := make(map[int64]shopping_cart.CartSnapshot)
|
||||
mapSnapshot := make(map[int64]gmodel.CartSnapshot)
|
||||
//校验购物车数据是否变更
|
||||
err = shopping_cart.VerifyShoppingCartSnapshotDataChange(shopping_cart.VerifyShoppingCartSnapshotDataChangeReq{
|
||||
err = l.svcCtx.Repositories.NewShoppingCart.VerifyShoppingCartSnapshotDataChange(repositories.VerifyShoppingCartSnapshotDataChangeReq{
|
||||
Carts: carts,
|
||||
MapSize: mapSize,
|
||||
MapModel: mapModel,
|
||||
@@ -123,7 +124,7 @@ func (l *GetCartsLogic) GetCarts(req *types.GetCartsReq, userinfo *auth.UserInfo
|
||||
}
|
||||
}
|
||||
//计算价格
|
||||
itemPrice, totalPrice, stepNum, _, err := shopping_cart.CaculateCartPrice(*cart.PurchaseQuantity, &sizePrice, fittingPrice)
|
||||
itemPrice, totalPrice, stepNum, _, err := l.svcCtx.Repositories.NewShoppingCart.CaculateCartPrice(*cart.PurchaseQuantity, &sizePrice, fittingPrice)
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
return resp.SetStatusWithMessage(basic.CodeServiceErr, err.Error())
|
||||
|
||||
Reference in New Issue
Block a user