aa
This commit is contained in:
@@ -385,10 +385,12 @@ func Init() {
|
|||||||
|
|
||||||
func syncStoreSku() {
|
func syncStoreSku() {
|
||||||
syncFlag := 0
|
syncFlag := 0
|
||||||
// syncFlag := model.SyncFlagPriceMask
|
if beego.BConfig.RunMode == "jxgy" {
|
||||||
// if (time.Now().Unix()/24*3600)%10 == 0 {
|
syncFlag = model.SyncFlagPriceMask
|
||||||
// syncFlag |= model.SyncFlagSaleMask
|
if true {
|
||||||
// }
|
syncFlag |= model.SyncFlagSaleMask
|
||||||
|
}
|
||||||
|
}
|
||||||
task := tasksch.NewParallelTask("同步京西与平台数据", nil, jxcontext.AdminCtx,
|
task := tasksch.NewParallelTask("同步京西与平台数据", nil, jxcontext.AdminCtx,
|
||||||
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) {
|
||||||
step := batchItemList[0].(int)
|
step := batchItemList[0].(int)
|
||||||
@@ -435,7 +437,9 @@ func syncStoreSku() {
|
|||||||
|
|
||||||
func doDailyWork2() {
|
func doDailyWork2() {
|
||||||
globals.SugarLogger.Debug("doDailyWork2")
|
globals.SugarLogger.Debug("doDailyWork2")
|
||||||
|
if beego.BConfig.RunMode == "jxgy" {
|
||||||
|
syncStoreSku()
|
||||||
|
}
|
||||||
//同步京东商城门店的商品
|
//同步京东商城门店的商品
|
||||||
// cms.CurVendorSync.SyncJdsStoresSkus(jxcontext.AdminCtx, nil, true, true)
|
// cms.CurVendorSync.SyncJdsStoresSkus(jxcontext.AdminCtx, nil, true, true)
|
||||||
//刷新京东商城的门店库存
|
//刷新京东商城的门店库存
|
||||||
@@ -455,7 +459,9 @@ func doDailyWork() {
|
|||||||
dao.SetStoresMapSyncStatus(dao.GetDB(), nil, nil, model.SyncFlagStoreStatus)
|
dao.SetStoresMapSyncStatus(dao.GetDB(), nil, nil, model.SyncFlagStoreStatus)
|
||||||
cms.CurVendorSync.SyncStore2(jxcontext.AdminCtx, dao.GetDB(), nil, nil, true, true)
|
cms.CurVendorSync.SyncStore2(jxcontext.AdminCtx, dao.GetDB(), nil, nil, true, true)
|
||||||
|
|
||||||
|
if beego.BConfig.RunMode == "prod" {
|
||||||
syncStoreSku()
|
syncStoreSku()
|
||||||
|
}
|
||||||
InitEx()
|
InitEx()
|
||||||
cms.SyncStoresCourierInfo(jxcontext.AdminCtx, nil, false, true)
|
cms.SyncStoresCourierInfo(jxcontext.AdminCtx, nil, false, true)
|
||||||
netprinter.RebindAllPrinters(jxcontext.AdminCtx, false, true)
|
netprinter.RebindAllPrinters(jxcontext.AdminCtx, false, true)
|
||||||
|
|||||||
@@ -93,8 +93,10 @@ func (p *PurchaseHandler) CreateCategory2(ctx *jxcontext.Context, cat *dao.SkuSt
|
|||||||
func (p *PurchaseHandler) UpdateCategory2(ctx *jxcontext.Context, cat *dao.SkuStoreCatInfo) (err error) {
|
func (p *PurchaseHandler) UpdateCategory2(ctx *jxcontext.Context, cat *dao.SkuStoreCatInfo) (err error) {
|
||||||
globals.SugarLogger.Debugf("UpdateCategory2 cat:%s", utils.Format4Output(cat, true))
|
globals.SugarLogger.Debugf("UpdateCategory2 cat:%s", utils.Format4Output(cat, true))
|
||||||
if globals.EnableJdStoreWrite {
|
if globals.EnableJdStoreWrite {
|
||||||
|
if cat.VendorCatID != "" {
|
||||||
err = getAPI(cat.VendorOrgCode).UpdateShopCategory(utils.Str2Int64(cat.VendorCatID), cat.Name)
|
err = getAPI(cat.VendorOrgCode).UpdateShopCategory(utils.Str2Int64(cat.VendorCatID), cat.Name)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user