This commit is contained in:
ziming 2025-07-02 15:05:49 +08:00
parent 7b8ae707bf
commit 9959fb0977
1 changed files with 0 additions and 8 deletions

View File

@ -98,16 +98,8 @@ func (this *VoucherBiz) cronWarningBudget(ctx context.Context) error {
return this.ProductRepo.FindWarningBudget(ctx, func(ctx context.Context, rows []*bo.ProductBo) error { return this.ProductRepo.FindWarningBudget(ctx, func(ctx context.Context, rows []*bo.ProductBo) error {
exist := make(map[string]bool)
for _, row := range rows { for _, row := range rows {
_, ok := exist[row.BatchNo]
if ok {
log.Warnf("预警查询,微信批次号%s忽略处理", row.BatchNo)
continue
}
exist[row.ProductNo] = true
if err := this.WarningBudget(ctx, row); err != nil { if err := this.WarningBudget(ctx, row); err != nil {
log.Context(ctx).Errorf("预警查询,处理失败: %s", err) log.Context(ctx).Errorf("预警查询,处理失败: %s", err)
} }