diff --git a/model/gmodel/fs_product_price_logic.go b/model/gmodel/fs_product_price_logic.go index a4bee9cd..be67f0de 100755 --- a/model/gmodel/fs_product_price_logic.go +++ b/model/gmodel/fs_product_price_logic.go @@ -24,6 +24,7 @@ func (p *FsProductPriceModel) GetSimplePriceListByProductIds(ctx context.Context return } func (p *FsProductPriceModel) GetPriceListByProductIdsSizeIds(ctx context.Context, productIds, sizeIds []int64) (resp []FsProductPrice, err error) { + if len(sizeIds) == 0 || len(productIds) == 0 { return } diff --git a/model/gmodel/fs_shopping_cart_logic.go b/model/gmodel/fs_shopping_cart_logic.go index 83a9b1d4..2e6da87d 100644 --- a/model/gmodel/fs_shopping_cart_logic.go +++ b/model/gmodel/fs_shopping_cart_logic.go @@ -85,7 +85,7 @@ func (s *FsShoppingCartModel) Create(ctx context.Context, data *FsShoppingCart) } // 删除 -func (s *FsShoppingCartModel) Delete(ctx context.Context, id, userId int64) error { +func (s *FsShoppingCartModel) Delete(ctx context.Context, userId, id int64) error { return s.db.WithContext(ctx).Model(&FsShoppingCart{}).Where("user_id = ? and id = ?", userId, id).Delete(&FsShoppingCart{}).Error }