fix
This commit is contained in:
@@ -242,17 +242,18 @@ func (l *AddToCartLogic) AddToCart(req *types.AddToCartReq, userinfo *auth.UserI
|
||||
snapshotJsonStr := string(snapshotJsonBytes)
|
||||
now := time.Now().UTC()
|
||||
err = l.svcCtx.AllModels.FsShoppingCart.Create(l.ctx, &gmodel.FsShoppingCart{
|
||||
UserId: &userinfo.UserId,
|
||||
ProductId: &req.ProductId,
|
||||
TemplateId: &req.TemplateId,
|
||||
ModelId: &modelInfo.Id,
|
||||
LightId: modelInfo.Light,
|
||||
SizeId: &req.SizeId,
|
||||
FittingId: &req.FittingId,
|
||||
PurchaseQuantity: &req.PurchaseQuantity,
|
||||
Snapshot: &snapshotJsonStr,
|
||||
Ctime: &now,
|
||||
Utime: &now,
|
||||
UserId: &userinfo.UserId,
|
||||
ProductId: &req.ProductId,
|
||||
TemplateId: &req.TemplateId,
|
||||
ModelId: &modelInfo.Id,
|
||||
IsHighlyCustomized: &req.IsHighlyCustomized,
|
||||
LightId: modelInfo.Light,
|
||||
SizeId: &req.SizeId,
|
||||
FittingId: &req.FittingId,
|
||||
PurchaseQuantity: &req.PurchaseQuantity,
|
||||
Snapshot: &snapshotJsonStr,
|
||||
Ctime: &now,
|
||||
Utime: &now,
|
||||
})
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
|
||||
@@ -197,7 +197,7 @@ func (l *GetCartsLogic) GetCarts(req *types.GetCartsReq, userinfo *auth.UserInfo
|
||||
PurchaseQuantity: *cart.PurchaseQuantity,
|
||||
MinPurchaseQuantity: stepPrice.MinBuyUnitsNum,
|
||||
StepPurchaseQuantity: stepPurchaseQuantity,
|
||||
IsHighlyCustomized: *cart.IsHighlyCustomized > 0,
|
||||
IsHighlyCustomized: *cart.IsHighlyCustomized,
|
||||
IsSelected: cartIsSelected,
|
||||
TemplateTag: templateTag,
|
||||
Logo: snapShot.Logo,
|
||||
|
||||
Reference in New Issue
Block a user