预警33
This commit is contained in:
parent
2067410617
commit
7cfaee0413
|
|
@ -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").
|
||||
|
|
|
|||
Loading…
Reference in New Issue