fix
This commit is contained in:
@@ -27,6 +27,11 @@ func (s *FsShoppingCartModel) Create(ctx context.Context, data *FsShoppingCart)
|
||||
return s.db.WithContext(ctx).Create(&data).Error
|
||||
}
|
||||
|
||||
// 删除
|
||||
func (s *FsShoppingCartModel) Delete(ctx context.Context, id, userId int64) error {
|
||||
return s.db.WithContext(ctx).Where("user_id = ? and id = ?", userId, id).Delete(&FsShoppingCart{}).Error
|
||||
}
|
||||
|
||||
// 更新
|
||||
func (s *FsShoppingCartModel) Update(ctx context.Context, id, userId int64, data *FsShoppingCart) error {
|
||||
return s.db.WithContext(ctx).Where("user_id = ? and id = ?", userId, id).Updates(&data).Error
|
||||
|
||||
Reference in New Issue
Block a user