This commit is contained in:
laodaming
2023-06-13 14:13:40 +08:00
parent 311ad581cc
commit 147af8ae29
6 changed files with 23 additions and 4 deletions

View File

@@ -86,3 +86,6 @@ func (c *FsCartModel) Create(ctx context.Context, data FsCart) error {
func (c *FsCartModel) Update(ctx context.Context, id int64, data FsCart) error {
return c.db.WithContext(ctx).Model(&FsCart{}).Where("`id` = ?", id).Updates(data).Error
}
func (c *FsCartModel) UpdateByIdUserId(ctx context.Context, id int64, userId int64, data FsCart) error {
return c.db.WithContext(ctx).Model(&FsCart{}).Where("`id` = ? and `user_id` = ?", id, userId).Updates(data).Error
}