From 6d143beefc33beff16e9b99db4d171349f2ff056 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Tue, 18 Aug 2020 15:52:11 +0800 Subject: [PATCH] =?UTF-8?q?22=EF=BC=9A00=E6=81=A2=E5=A4=8D=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E4=B8=BA100?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/act/act.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/business/jxstore/act/act.go b/business/jxstore/act/act.go index d6d6bca33..02a67ca94 100644 --- a/business/jxstore/act/act.go +++ b/business/jxstore/act/act.go @@ -1632,6 +1632,13 @@ func ChangeJxPriceByDiscountAct(ctx *jxcontext.Context) { if _, err = dao.UpdateEntity(db, storeSku, "JxPrice"); err != nil { dao.Rollback(db) } + //22:00 恢复库存为100 + if time.Now().Hour() == 22 && time.Now().Minute() < 1 { + storeSku.Stock = 100 + if _, err = dao.UpdateEntity(db, storeSku, "Stock"); err != nil { + dao.Rollback(db) + } + } } dao.Commit(db) }