1
This commit is contained in:
@@ -534,6 +534,10 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag
|
||||
skus, err = dao.GetStoreSkus(db, vendorID, storeID, skuIDs)
|
||||
}
|
||||
|
||||
if storeID == 20002 {
|
||||
globals.SugarLogger.Debugf("-----sku := %s", utils.Format4Output(skus, false))
|
||||
}
|
||||
|
||||
if err != nil || len(skus) == 0 {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -280,13 +280,6 @@ func Init() {
|
||||
orderman.UpdateJdsOrdersStatus(jxcontext.AdminCtx, time.Now().AddDate(0, 0, -1), time.Now())
|
||||
}, 5*time.Second, 5*time.Minute)
|
||||
|
||||
if beego.BConfig.RunMode == model.ServerTypeFruits /*|| beego.BConfig.RunMode == model.ServerTypePet*/ {
|
||||
ScheduleTimerFuncByInterval(func() {
|
||||
fromData := utils.Time2Date(time.Now())
|
||||
toData := time.Now()
|
||||
orderman.FixedOrderManager.AmendMissingOrders(jxcontext.AdminCtx, []int{model.VendorIDJD, model.VendorIDMTWM, model.VendorIDEBAI, model.VendorIDDD}, 0, fromData, toData, true, true)
|
||||
}, 5*time.Second, 5*time.Minute)
|
||||
}
|
||||
// 抖音更新门店商品 ,接口收费暂不使用
|
||||
//if beego.BConfig.RunMode != "jxgy" {
|
||||
// ScheduleTimerFunc("RefreshSyncSkuList", func() {
|
||||
@@ -456,6 +449,14 @@ func Init() {
|
||||
cms.DisabledStoreWithoutVendor(jxcontext.AdminCtx, true, true)
|
||||
}, dailyWorkTimeList)
|
||||
//}
|
||||
if beego.BConfig.RunMode == model.ServerTypeFruits /*|| beego.BConfig.RunMode == model.ServerTypePet*/ {
|
||||
ScheduleTimerFuncByInterval(func() {
|
||||
fromData := utils.Time2Date(time.Now())
|
||||
toData := time.Now()
|
||||
orderman.FixedOrderManager.AmendMissingOrders(jxcontext.AdminCtx, []int{model.VendorIDJD, model.VendorIDMTWM, model.VendorIDEBAI, model.VendorIDDD}, 0, fromData, toData, true, true)
|
||||
}, 5*time.Second, 5*time.Minute)
|
||||
}
|
||||
|
||||
ScheduleTimerFunc("doDailyWork5", func() {
|
||||
//刷新物料订单状态
|
||||
localjx.RefreshAllMatterOrderStatus(jxcontext.AdminCtx)
|
||||
|
||||
@@ -454,7 +454,10 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if storeID == 20002 {
|
||||
globals.SugarLogger.Debugf("-----foodDataList := %s", utils.Format4Output(foodDataList, false))
|
||||
globals.SugarLogger.Debugf("-----storeSku := %s", utils.Format4Output(storeSkuList, false))
|
||||
}
|
||||
if globals.EnableMtwmStoreWrite {
|
||||
if len(foodDataList) == 1 {
|
||||
foodDataList[0]["skus"] = string(utils.MustMarshal(foodDataList[0]["skus"]))
|
||||
|
||||
@@ -2,11 +2,14 @@ package controllers
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/auth2/authprovider/dingding"
|
||||
"git.rosy.net.cn/jx-callback/business/jxcallback/orderman"
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/configindb"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/datares"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
"git.rosy.net.cn/jx-callback/business/msghub"
|
||||
"git.rosy.net.cn/jx-callback/globals/api"
|
||||
"git.rosy.net.cn/jx-callback/globals/api/apimanager"
|
||||
@@ -310,6 +313,15 @@ func (c *CmsController) UpdateConfig() {
|
||||
// @router /QueryConfigs [get]
|
||||
func (c *CmsController) QueryConfigs() {
|
||||
c.callQueryConfigs(func(params *tCmsQueryConfigsParams) (retVal interface{}, errCode string, err error) {
|
||||
if params.Key == "FZR" {
|
||||
userBind, err := dao.GetUserBindAuthInfo(dao.GetDB(), params.Ctx.GetUserID(), 0, []string{dingding.AuthTypeStaff}, "", "", nil)
|
||||
if err != nil {
|
||||
return retVal, "", err
|
||||
}
|
||||
if len(userBind) == model.NO {
|
||||
return retVal, "", nil
|
||||
}
|
||||
}
|
||||
retVal, err = cms.QueryConfigs(params.Key, params.Type, params.Keyword)
|
||||
return retVal, "", err
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user