京西折扣修改

This commit is contained in:
苏尹岚
2020-08-18 14:37:23 +08:00
parent 26fa06ace4
commit cfd14e4990
2 changed files with 17 additions and 11 deletions

View File

@@ -1529,7 +1529,15 @@ func ChangeJxPriceByDiscountAct(ctx *jxcontext.Context) {
if len(actStoreSkus) == 0 { if len(actStoreSkus) == 0 {
continue continue
} }
for _, actStoreSku := range actStoreSkus { for _, actStoreSku2 := range actStoreSkus {
actStoreSku := &model.ActStoreSku{
ActID: actStoreSku2.ActID,
OriginalPrice: actStoreSku2.OriginalPrice,
StoreID: actStoreSku2.StoreID,
SkuID: actStoreSku2.SkuID,
TrendPrcie: actStoreSku2.TrendPrcie,
TrendType: actStoreSku2.TrendType,
}
storeSkus, _ := dao.GetStoresSkusInfo(db, []int{actStoreSku.StoreID}, []int{actStoreSku.SkuID}) storeSkus, _ := dao.GetStoresSkusInfo(db, []int{actStoreSku.StoreID}, []int{actStoreSku.SkuID})
if len(storeSkus) == 0 { if len(storeSkus) == 0 {
continue continue

View File

@@ -259,20 +259,18 @@ func Init() {
} }
cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, partner.GetMultiStoreVendorIDs(), storeList, false, nil, []int{27379}, syncFlag, true, true) cms.CurVendorSync.SyncStoresSkus2(jxcontext.AdminCtx, nil, 0, db, partner.GetMultiStoreVendorIDs(), storeList, false, nil, []int{27379}, syncFlag, true, true)
}, exSyncList) }, exSyncList)
}
ScheduleTimerFunc("AutoSaleStoreSku", func() {
cms.AutoSaleStoreSku(jxcontext.AdminCtx, nil, false)
}, autoSaleStoreSkuTimeList)
ScheduleTimerFunc("ChangeJxPriceByDiscountAct", func() {
act.ChangeJxPriceByDiscountAct(jxcontext.AdminCtx)
}, discountActJxList)
ScheduleTimerFunc("CreateOrderByPriceDefend", func() { ScheduleTimerFunc("CreateOrderByPriceDefend", func() {
localjx.CreateOrderByPriceDefend(jxcontext.AdminCtx) localjx.CreateOrderByPriceDefend(jxcontext.AdminCtx)
}, []string{ }, []string{
"22:00:00", "22:00:00",
}) })
ScheduleTimerFunc("ChangeJxPriceByDiscountAct", func() {
act.ChangeJxPriceByDiscountAct(jxcontext.AdminCtx)
}, discountActJxList)
}
ScheduleTimerFunc("AutoSaleStoreSku", func() {
cms.AutoSaleStoreSku(jxcontext.AdminCtx, nil, false)
}, autoSaleStoreSkuTimeList)
if beego.BConfig.RunMode == "jxgy" { if beego.BConfig.RunMode == "jxgy" {
ScheduleTimerFunc("SyncMatterC4ToGy", func() { ScheduleTimerFunc("SyncMatterC4ToGy", func() {