This commit is contained in:
laodaming 2023-08-22 17:18:06 +08:00
parent 425ad8be2c
commit bc04dbe43e

View File

@ -103,7 +103,6 @@ func (s *FsProductSizeModel) GetAllByStatus(ctx context.Context, status int64, s
// 获取第一个尺寸
func (s *FsProductSizeModel) GetProductFirstSize(ctx context.Context, productId int64) (resp *FsProductTemplateV2, err error) {
err = s.db.WithContext(ctx).Model(&FsProductSize{}).
Select("product_id,count(*) as num").
Where("`product_id` = ? and `status` = ?", productId, 1).
Order("sort ASC").
Take(&resp).Error