From 20674106170ed16ff5cfb78b9ff6496883df8b4a Mon Sep 17 00:00:00 2001 From: ziming Date: Wed, 2 Jul 2025 14:15:10 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=84=E8=AD=A632?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/data/repoimpl/product.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/data/repoimpl/product.go b/internal/data/repoimpl/product.go index 5f92646..220b49c 100644 --- a/internal/data/repoimpl/product.go +++ b/internal/data/repoimpl/product.go @@ -42,6 +42,7 @@ func (r *ProductRepoImpl) FindWarningBudget(ctx context.Context, fun func(ctx co Where("end_time > ?", nowTime). Where("warning_budget > 0"). Where("warning_person IS NOT NULL"). + Group("batch_no"). FindInBatches(&results, 5, func(tx *gorm.DB, batch int) error { return fun(ctx, r.ToBos(results)) })