预警37
This commit is contained in:
parent
7b8ae707bf
commit
9959fb0977
|
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue