This commit is contained in:
ziming 2025-07-02 14:43:56 +08:00
parent 2067410617
commit 7cfaee0413
1 changed files with 1 additions and 1 deletions

View File

@ -32,12 +32,12 @@ func NewProductRepoImpl(db *data.Db, rdb *data.Rdb) repo.ProductRepo {
}
func (r *ProductRepoImpl) FindWarningBudget(ctx context.Context, fun func(ctx context.Context, rows []*bo.ProductBo) error) error {
var results = make([]*model.Product, 0)
nowTime := time.Now().Format(time.DateTime)
result := r.db.DB(ctx).
Select("DISTINCT batch_no, product.*").
Where("start_time < ?", nowTime).
Where("end_time > ?", nowTime).
Where("warning_budget > 0").