diff --git a/business/jxstore/cms/sync_store_sku.go b/business/jxstore/cms/sync_store_sku.go index 63abf55d6..622edb56a 100644 --- a/business/jxstore/cms/sync_store_sku.go +++ b/business/jxstore/cms/sync_store_sku.go @@ -117,6 +117,7 @@ func SyncStoreCategories(ctx *jxcontext.Context, parentTask tasksch.ITask, vendo } } else if model.IsSyncStatusNew(catInfo.CatSyncStatus) { // 新增 2 err = handler.CreateStoreCategory(ctx, storeID, vendorStoreID, catInfo) + globals.SugarLogger.Debugf("CreateStoreCategory err ========= %v", err) if err != nil && handler.IsErrCategoryExist(err) { if cat, err2 := handler.GetStoreCategory(ctx, storeID, vendorStoreID, catInfo.Name); err2 == nil { catInfo.VendorCatID = cat.VendorCatID diff --git a/globals/api/apimanager/apimanager.go b/globals/api/apimanager/apimanager.go index 890d171eb..54587e201 100644 --- a/globals/api/apimanager/apimanager.go +++ b/globals/api/apimanager/apimanager.go @@ -6,7 +6,6 @@ import ( "git.rosy.net.cn/baseapi/platformapi/jdapi" "git.rosy.net.cn/baseapi/platformapi/tao_vegetable" "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api" - "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/jxutils" "git.rosy.net.cn/jx-callback/business/jxutils/ddmsg" "git.rosy.net.cn/jx-callback/business/jxutils/jxcontext" @@ -70,35 +69,27 @@ func (a *APIManager) GetAPI(vendorID int, appOrgCode string) (pfAPI interface{}) } case model.VendorIDTaoVegetable: api := api.TaoVegetableApi - globals.SugarLogger.Debugf("api :======= %s,%s", utils.Format4Output(api.GetToken(), false), api.GetAppSecret()) if beego.BConfig.RunMode == "dev" { api.SetToken("50002C00414zMSClqLiSDjBr2N19748391yiazjtFmsgTOdbBftik0XDfkUQywSmcjfC") } else if api == nil || api.GetToken() == "" { codes, _ := dao.GetVendorOrgCode(db, vendorID, appOrgCode, "platform") - globals.SugarLogger.Debugf("api :======= %s", utils.Format4Output(codes, false)) if len(codes) == 0 { return nil } code := codes[0] api = tao_vegetable.NewTaoVegetable(code.AppKey, code.AppSecret, beego.AppConfig.DefaultString("taoVegetableServerUrl", "")) if code.Token != "" { - globals.SugarLogger.Debugf("code token :======= %s", utils.Format4Output(code.Token, false)) var tokenInfo *tao_vegetable.StoreTokenInfo if err := json.Unmarshal([]byte(code.Token), &tokenInfo); err != nil { - globals.SugarLogger.Debugf("get token err :======= %s", utils.Format4Output(err, false)) return nil } - globals.SugarLogger.Debugf("get token :======= %s", utils.Format4Output(tokenInfo, false)) if tokenInfo.AccessToken != "" && tokenInfo.ExpireTime > time.Now().UnixNano()/1e6 { api.SetToken(tokenInfo.AccessToken) - globals.SugarLogger.Debugf("get token :======= %s", utils.Format4Output(api.GetToken(), false)) } else { - globals.SugarLogger.Debugf("msg================") ddmsg.SendUserMessage(dingdingapi.MsgTyeText, "DDC5657B43EE11E9A9FF525400E86DC0", "淘鲜达token过期", ",请重新授权") } } } - globals.SugarLogger.Debugf("api 2:======= %s", utils.Format4Output(api.GetToken(), false)) pfAPI = api case model.VendorIDEBAI: