diff --git a/business/jxstore/act/act.go b/business/jxstore/act/act.go index 86c26e4e9..68cf61571 100644 --- a/business/jxstore/act/act.go +++ b/business/jxstore/act/act.go @@ -1628,15 +1628,16 @@ func ChangeJxPriceByDiscountAct(ctx *jxcontext.Context) { if actStoreSkuMap.ActualActPrice <= minJxPrice { actStoreSkuMap.ActualActPrice = minJxPrice } - if _, err = dao.UpdateEntity(db, actStoreSkuMap, "ActualActPrice", "TrendType", "TrendPrice"); err != nil { - dao.Rollback(db) - } - //22:00 恢复库存为100 + //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) } + actStoreSkuMap.ActualActPrice = actStoreSkuMap.VendorPrice + } + if _, err = dao.UpdateEntity(db, actStoreSkuMap, "ActualActPrice", "TrendType", "TrendPrice"); err != nil { + dao.Rollback(db) } } dao.Commit(db)