feat 优化到达阈值后推送内容
All checks were successful
Build image / build (push) Successful in 5m41s

This commit is contained in:
timerzz 2024-12-03 09:40:43 +08:00
parent 72606b30fc
commit 684cac5eb9

View File

@ -159,7 +159,7 @@ func (c *Controller) doTrace(tracer *Tracer) (available bool) {
if value := tracer.lastAts - article.Ats; value >= c.threshold {
_, _ = pusher.Push(c.ctx, &push.PushReq{
Title: "coach 商品库存减少",
Content: fmt.Sprintf("coach 商品 %s %s 减少了 %d \n链接%s", tracer.pArticle.SkuID, time.Now().Sub(tracer.lastTraceTime).String(), value, tracer.pArticle.Link),
Content: fmt.Sprintf("coach 商品 %s %s 减少了 %d,当前库存:%d \n链接%s", tracer.pArticle.SkuID, time.Now().Sub(tracer.lastTraceTime).String(), value, article.Ats, tracer.pArticle.Link),
})
}
c.storage.DB().Create(&v2.ProviderAts{