fix
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
)
|
||||
|
||||
func (s *FsProductSizeModel) FindOne(ctx context.Context, id int64) (resp *FsProductSize, err error) {
|
||||
err = s.db.WithContext(ctx).Model(&FsProductSize{}).Where("`id` = ? ", id).First(&resp).Error
|
||||
err = s.db.WithContext(ctx).Model(&FsProductSize{}).Where("`id` = ? ", id).Take(&resp).Error
|
||||
return resp, err
|
||||
}
|
||||
func (s *FsProductSizeModel) GetAllByIds(ctx context.Context, ids []int64, sort string) (resp []FsProductSize, err error) {
|
||||
@@ -108,3 +108,7 @@ func (s *FsProductSizeModel) GetProductFirstSize(ctx context.Context, productId
|
||||
Take(&resp).Error
|
||||
return resp, err
|
||||
}
|
||||
func (s *FsProductSizeModel) FindOneByIdProductId(ctx context.Context, id int64, productId int64) (resp *FsProductSize, err error) {
|
||||
err = s.db.WithContext(ctx).Model(&FsProductSize{}).Where("`id` = ? and product_id = ?", id, productId).Take(&resp).Error
|
||||
return resp, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user