feat 优化到达阈值后推送内容
Some checks failed
Build image / build (push) Has been cancelled

This commit is contained in:
timerzz 2024-12-03 09:37:58 +08:00
parent 1e799ae1c2
commit 72606b30fc

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, c.interval, value, tracer.pArticle.Link),
Content: fmt.Sprintf("coach 商品 %s %s 减少了 %d \n链接%s", tracer.pArticle.SkuID, time.Now().Sub(tracer.lastTraceTime).String(), value, tracer.pArticle.Link),
})
}
c.storage.DB().Create(&v2.ProviderAts{