fix: 添加状态条件过滤

This commit is contained in:
renzhiyuan 2026-01-15 18:38:54 +08:00
parent 3b8af9ada9
commit b3c807f0ac
2 changed files with 2 additions and 0 deletions

View File

@ -61,6 +61,7 @@ func (m *Macro) NegativeProfitClear(ctx context.Context, content string, groupCo
cond := builder.NewCond() cond := builder.NewCond()
cond = cond.And(builder.Eq{"cache_index": bbxt.IndexLossSumDetail}) cond = cond.And(builder.Eq{"cache_index": bbxt.IndexLossSumDetail})
cond = cond.And(builder.Eq{"cache_key": dayDate}) cond = cond.And(builder.Eq{"cache_key": dayDate})
cond = cond.And(builder.Eq{"status": 1})
err = m.reportDailyCacheImpl.UpdateByCond(&cond, &model.AiReportDailyCache{ err = m.reportDailyCacheImpl.UpdateByCond(&cond, &model.AiReportDailyCache{
Status: 2, Status: 2,
}) })

View File

@ -421,6 +421,7 @@ func (g *GroupConfigBiz) GetReportCache(ctx context.Context, day time.Time, tota
cond := builder.NewCond() cond := builder.NewCond()
cond = cond.And(builder.Eq{"cache_index": bbxt.IndexLossSumDetail}) cond = cond.And(builder.Eq{"cache_index": bbxt.IndexLossSumDetail})
cond = cond.And(builder.Eq{"cache_key": dayDate}) cond = cond.And(builder.Eq{"cache_key": dayDate})
cond = cond.And(builder.Eq{"status": 1})
var cache model.AiReportDailyCache var cache model.AiReportDailyCache
err := g.reportDailyCacheImpl.GetOneBySearchToStrut(&cond, &cache) err := g.reportDailyCacheImpl.GetOneBySearchToStrut(&cond, &cache)
if err != nil { if err != nil {