From c5efe709a692e15348624925a1db7380f8288070 Mon Sep 17 00:00:00 2001 From: richboo111 Date: Mon, 24 Oct 2022 14:33:39 +0800 Subject: [PATCH] 1 --- .../auth2/authprovider/dingding/qrcode.go | 1 - business/auth2/authprovider/dingding/staff.go | 2 - business/auth2/authprovider/mobile/mobile.go | 1 - .../auth2/authprovider/password/password.go | 2 - business/auth2/authprovider/weixin/weixin.go | 2 - .../auth2/authprovider/weixin/weixin_mini.go | 2 - business/authz/casbinauth/adapter.go | 2 - business/jxstore/cms/authz.go | 1 - business/jxstore/cms/sku.go | 2 +- business/jxstore/cms/store.go | 1 - business/jxstore/cms/sync.go | 8 ---- business/jxstore/cms/sync2.go | 4 -- business/jxstore/cms/sync_store_sku.go | 40 +------------------ business/jxstore/misc/misc.go | 1 - business/jxutils/tasks/configrefresh.go | 1 - controllers/tiktok_order.go | 3 -- 16 files changed, 3 insertions(+), 70 deletions(-) diff --git a/business/auth2/authprovider/dingding/qrcode.go b/business/auth2/authprovider/dingding/qrcode.go index 2e3caead7..44592f6f3 100644 --- a/business/auth2/authprovider/dingding/qrcode.go +++ b/business/auth2/authprovider/dingding/qrcode.go @@ -22,7 +22,6 @@ func init() { } func (a *QRCodeAuther) VerifySecret(dummy, code string) (*auth2.AuthBindEx, error) { - globals.SugarLogger.Debugf("dingding qrcode VerifySecret code:%s", code) userQRInfo, err := api.DingDingQRCodeAPI.GetUserInfoByCode(code) if err != nil { return nil, err diff --git a/business/auth2/authprovider/dingding/staff.go b/business/auth2/authprovider/dingding/staff.go index c1630497b..2fcdfd467 100644 --- a/business/auth2/authprovider/dingding/staff.go +++ b/business/auth2/authprovider/dingding/staff.go @@ -5,7 +5,6 @@ import ( "git.rosy.net.cn/jx-callback/business/auth2" "git.rosy.net.cn/jx-callback/business/auth2/authprovider" "git.rosy.net.cn/jx-callback/business/model" - "git.rosy.net.cn/jx-callback/globals" "git.rosy.net.cn/jx-callback/globals/api" ) @@ -23,7 +22,6 @@ func init() { } func (a *StaffAuther) VerifySecret(dummy, code string) (authBindEx *auth2.AuthBindEx, err error) { - globals.SugarLogger.Debugf("dingding staff VerifySecret code:%s", code) userID, err := api.DingDingAPI.GetUserID(code) if err == nil { diff --git a/business/auth2/authprovider/mobile/mobile.go b/business/auth2/authprovider/mobile/mobile.go index ca2d0dc23..889bb68a9 100644 --- a/business/auth2/authprovider/mobile/mobile.go +++ b/business/auth2/authprovider/mobile/mobile.go @@ -68,7 +68,6 @@ func (a *Auther) SendVerifyCode(mobileNumber string) (verifyCode string, err err } func (a *Auther) VerifySecret(mobileNumber, code string) (authBindEx *auth2.AuthBindEx, err error) { - globals.SugarLogger.Debugf("VerifySecret mobileNumber:%s, code:%s", mobileNumber, code) err = ErrVerifyCodeIsWrong if (code == auth2.InternalAuthSecret || diff --git a/business/auth2/authprovider/password/password.go b/business/auth2/authprovider/password/password.go index 5c5f97d17..9b276f6f0 100644 --- a/business/auth2/authprovider/password/password.go +++ b/business/auth2/authprovider/password/password.go @@ -10,7 +10,6 @@ import ( "git.rosy.net.cn/jx-callback/business/auth2/authprovider" "git.rosy.net.cn/jx-callback/business/model" "git.rosy.net.cn/jx-callback/business/model/dao" - "git.rosy.net.cn/jx-callback/globals" ) const ( @@ -35,7 +34,6 @@ func init() { } func (a *Auther) VerifySecret(userID, passMD5 string) (authBindEx *auth2.AuthBindEx, err error) { - globals.SugarLogger.Debugf("localpass VerifySecret userID:%s", userID) var authBind *model.AuthBind if authBind, err = dao.GetAuthBind(dao.GetDB(), model.AuthBindTypeAuth, AuthType, userID); err == nil { if err = a.checkPassword(authBind, passMD5); err == nil { diff --git a/business/auth2/authprovider/weixin/weixin.go b/business/auth2/authprovider/weixin/weixin.go index 10947f044..fbbf15173 100644 --- a/business/auth2/authprovider/weixin/weixin.go +++ b/business/auth2/authprovider/weixin/weixin.go @@ -7,7 +7,6 @@ import ( "git.rosy.net.cn/jx-callback/business/auth2" "git.rosy.net.cn/jx-callback/business/auth2/authprovider" "git.rosy.net.cn/jx-callback/business/model" - "git.rosy.net.cn/jx-callback/globals" "git.rosy.net.cn/jx-callback/globals/api" ) @@ -57,7 +56,6 @@ func init() { } func (a *Auther) VerifySecret(id, secret string) (authBindEx *auth2.AuthBindEx, err error) { - globals.SugarLogger.Debugf("weixin VerifySecret id:%s secret:%s", id, secret) var openID, accessToken string _, jsCode := SplitJsCode(secret) if a.authType != AuthTypeWXNative { diff --git a/business/auth2/authprovider/weixin/weixin_mini.go b/business/auth2/authprovider/weixin/weixin_mini.go index bdec85f39..fd6735108 100644 --- a/business/auth2/authprovider/weixin/weixin_mini.go +++ b/business/auth2/authprovider/weixin/weixin_mini.go @@ -34,7 +34,6 @@ func init() { } func (a *MiniAuther) VerifySecret(dummy, jsCode string) (authBindEx *auth2.AuthBindEx, err error) { - globals.SugarLogger.Debugf("weixin mini VerifySecret jsCode:%s", jsCode) appID, jsCode := SplitJsCode(jsCode) sessionInfo, err := getWxApp(appID).SNSCode2Session(jsCode) @@ -50,7 +49,6 @@ func (a *MiniAuther) VerifySecret(dummy, jsCode string) (authBindEx *auth2.AuthB // 特殊接口 func (a *MiniAuther) DecryptData(authInfo *auth2.AuthInfo, jsCode, encryptedData, iv string) (decryptedDataBase64 string, err error) { - globals.SugarLogger.Debugf("weixin mini DecryptData jsCode:%s, encryptedData:%s, iv:%s", jsCode, encryptedData, iv) var sessionKey string appID, jsCode := SplitJsCode(jsCode) if jsCode != "" { diff --git a/business/authz/casbinauth/adapter.go b/business/authz/casbinauth/adapter.go index 60207b267..7ac5e5712 100644 --- a/business/authz/casbinauth/adapter.go +++ b/business/authz/casbinauth/adapter.go @@ -2,7 +2,6 @@ package casbinauth import ( jxmodel "git.rosy.net.cn/jx-callback/business/model" - "git.rosy.net.cn/jx-callback/globals" "github.com/astaxie/beego/client/orm" "github.com/casbin/casbin/model" "github.com/casbin/casbin/persist" @@ -93,7 +92,6 @@ func (a *Adapter) clearAll(o orm.Ormer) (err error) { // SavePolicy saves policy to database. func (a *Adapter) SavePolicy(model model.Model) error { - globals.SugarLogger.Debugf("SavePolicy") o := orm.NewOrm() a.clearAll(o) diff --git a/business/jxstore/cms/authz.go b/business/jxstore/cms/authz.go index 09b1643f5..f4fe198c7 100644 --- a/business/jxstore/cms/authz.go +++ b/business/jxstore/cms/authz.go @@ -14,7 +14,6 @@ import ( // todo 是否需要将Store.MarketManPhone与OperatorPhone成角色? func TransferLegacyWeixins(mobile string) (err error) { - globals.SugarLogger.Debugf("TransferLegacyWeixins mobile:%s", mobile) if !globals.EnableWXAuth2 || globals.DisableWXAuth1 { return nil } diff --git a/business/jxstore/cms/sku.go b/business/jxstore/cms/sku.go index 73a7da23c..8de99a546 100644 --- a/business/jxstore/cms/sku.go +++ b/business/jxstore/cms/sku.go @@ -1846,7 +1846,7 @@ func SumExianDaDepot(ctx *jxcontext.Context, isAsync, isContinueWhenError bool) v := batchItemList[0].(*ebaiapi.ExianDaSkus) skus, err := api.EbaiAPI.GetExianDaSku(utils.Str2Int64(v.ElemeGoodsID)) if err != nil || skus == nil { - globals.SugarLogger.Debugf("GetExianDaSku,[%v]", v.ElemeGoodsID) + //globals.SugarLogger.Debugf("GetExianDaSku,[%v]", v.ElemeGoodsID) return result, err } // sku := &model.Sku{} diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index ae1f88e9e..89c51d056 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -738,7 +738,6 @@ func filterStoreByOrderInfo(db *dao.DaoDB, inStores []*StoreExt, orderTimeFrom, } func getMapCenter(storeList []*StoreExt) (lng, lat float64) { - globals.SugarLogger.Debugf("getMapCenter len(storeList):%d", len(storeList)) if len(storeList) == 0 { return 0, 0 } diff --git a/business/jxstore/cms/sync.go b/business/jxstore/cms/sync.go index eaec64f93..fcdd1c3cc 100644 --- a/business/jxstore/cms/sync.go +++ b/business/jxstore/cms/sync.go @@ -554,12 +554,9 @@ func (v *VendorSync) SyncStoresSkus(ctx *jxcontext.Context, parentTask tasksch.I //执行比较店铺与运营商的sku差异 func (c *ComparePlatform) CompareStoreWithOperator(ctx *jxcontext.Context, db *dao.DaoDB, vendorIDs []int, storeIDs []int, syncDisabled bool, excludeSkuIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) { - globals.SugarLogger.Debug("开始执行CompareStoreWithOperator") return hint, makeSyncError(err) } - func (v *VendorSync) FullSyncStoresSkus(ctx *jxcontext.Context, db *dao.DaoDB, vendorIDs []int, storeIDs []int, syncDisabled bool, excludeSkuIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) { - globals.SugarLogger.Debug("FullSyncStoresSkus") hint, err = v.LoopStoresMap(ctx, db, fmt.Sprintf("初始化门店商品信息:%v", storeIDs), isAsync, true, vendorIDs, storeIDs, func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (interface{}, error) { loopMapInfo := batchItemList[0].(*LoopStoreMapInfo) @@ -588,7 +585,6 @@ func (v *VendorSync) FullSyncStoresSkus(ctx *jxcontext.Context, db *dao.DaoDB, v } func (v *VendorSync) DeleteRemoteStoreSkus(ctx *jxcontext.Context, db *dao.DaoDB, vendorIDs []int, storeIDs []int, isAsync, isContinueWhenError bool) (hint string, err error) { - globals.SugarLogger.Debug("DeleteRemoteStoreSkus") hint, err = v.LoopStoresMap(ctx, db, fmt.Sprintf("删除远程门店商品信息:%v", storeIDs), isAsync, true, vendorIDs, storeIDs, func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (interface{}, error) { loopMapInfo := batchItemList[0].(*LoopStoreMapInfo) @@ -688,7 +684,6 @@ func (v *VendorSync) LoopStoresMap2(ctx *jxcontext.Context, parentTask tasksch.I if storeMapList, err = dao.GetStoresMapList2(db, vendorIDs, storeIDs, nil, model.StoreStatusAll, model.StoreIsSyncYes, "", "", "", mustDirty); err != nil { return nil, "", err } - globals.SugarLogger.Debug("===============len(storeMapList)", len(storeMapList)) if len(storeMapList) == 0 { return nil, "", nil } @@ -705,13 +700,10 @@ func (v *VendorSync) LoopStoresMap2(ctx *jxcontext.Context, parentTask tasksch.I } index++ } - globals.SugarLogger.Debug("===============len(storeMapList)1111111111", vendorStoreMap) if len(loopInfoList) == 1 { - globals.SugarLogger.Debug("===============len(storeMapList)22222") taskName = fmt.Sprintf("%s,处理平台%s", taskName, model.VendorChineseNames[loopInfoList[0].VendorID]) } - globals.SugarLogger.Debug("===============len(storeMapList)3333") task = tasksch.NewParallelTask(taskName, tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx, handler, loopInfoList) if isAsync { diff --git a/business/jxstore/cms/sync2.go b/business/jxstore/cms/sync2.go index 596375bd5..6819f2952 100644 --- a/business/jxstore/cms/sync2.go +++ b/business/jxstore/cms/sync2.go @@ -95,7 +95,6 @@ func SyncCategories(ctx *jxcontext.Context, parentTask tasksch.ITask, vendorIDs globals.SugarLogger.Debugf("SyncCategories vendorIDs:%v, appOrgCodes:%v, catIDs:%v", vendorIDs, appOrgCodes, catIDs) db := dao.GetDB() catList, err := dao.GetSkuCategoryWithVendor(db, vendorIDs, appOrgCodes, -1, catIDs, true) - globals.SugarLogger.Debugf("SyncCategories catListLenght:%v", len(catList)) if err == nil && len(catList) > 0 { //TODO 同一平台不同账号会有影响needSyncParentIDs,暂不处理 var needSyncParentIDs []int @@ -112,7 +111,6 @@ func SyncCategories(ctx *jxcontext.Context, parentTask tasksch.ITask, vendorIDs switch step { case 0: catList2, err := dao.GetSkuCategoryWithVendor(db, vendorIDs, appOrgCodes, -1, needSyncParentIDs, true) - globals.SugarLogger.Debugf("GetSkuCategoryWithVendor catList2:%v", catList2) if err == nil { _, err = syncCategories(ctx, db, task, catList2, false) } @@ -228,7 +226,6 @@ func SyncSkus(ctx *jxcontext.Context, parentTask tasksch.ITask, vendorIDs []int, } func SyncReorderCategories(ctx *jxcontext.Context, parentCatID int, isAsync bool) (hint string, err error) { - globals.SugarLogger.Debugf("SyncReorderCategories parentCatID:%d", parentCatID) db := dao.GetDB() hint, err = CurVendorSync.LoopMultiStoresVendors(ctx, db, fmt.Sprintf("分类重排序:%d", parentCatID), isAsync, false, func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { @@ -273,7 +270,6 @@ func SyncReorderCategories(ctx *jxcontext.Context, parentCatID int, isAsync bool } func SyncReorderCategories2(ctx *jxcontext.Context, parentCatID, vendorID int, vendorOrgCode string) (err error) { - globals.SugarLogger.Debugf("SyncReorderCategories parentCatID:%d", parentCatID) db := dao.GetDB() multiStoresHandler := CurVendorSync.GetMultiStoreHandler(vendorID) if multiStoresHandler != nil { diff --git a/business/jxstore/cms/sync_store_sku.go b/business/jxstore/cms/sync_store_sku.go index 17d41ee95..98bb44fed 100644 --- a/business/jxstore/cms/sync_store_sku.go +++ b/business/jxstore/cms/sync_store_sku.go @@ -77,7 +77,6 @@ func SyncStoreCategories(ctx *jxcontext.Context, parentTask tasksch.ITask, vendo rootTask := tasksch.NewSeqTask(fmt.Sprintf("%s SyncStoreCategory step1", model.VendorChineseNames[vendorID]), ctx, func(rootTask *tasksch.SeqTask, step int, params ...interface{}) (result interface{}, err error) { level := step + 1 - //todo 这里好像有点问题 catList, err := dao.GetDirtyStoreCategories(db, vendorID, storeID, level, skuIDs) if len(catList) > 0 { num += len(catList) @@ -188,6 +187,7 @@ func SyncStoreSkuNew2(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFla case 0: if singleStoreHandler != nil { _, err = SyncStoreCategories(ctx, task, vendorID, storeID, vendorStoreID, nameIDs, skuIDs, false, isContinueWhenError) + globals.SugarLogger.Debug("SyncStoreCategories in SyncStoreSkuNew2 err on:%v", err) } case 1: err = syncStoreSkuNew(ctx, task, causeFlag, false, vendorID, storeID, vendorOrgCode, nameIDs, skuIDs, excludeSkuIDs, useVendorPriceDirectly, isContinueWhenError) @@ -504,7 +504,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag var bareSku *partner.StoreSkuInfo isNeedReorder := false if isStoreSkuSyncNeedDelete(sku) { - globals.SugarLogger.Debug("1.进入isStoreSkuSyncNeedDelete") if !dao.IsVendorThingIDEmpty(sku.VendorSkuID) { bareSku = storeSkuSyncInfo2Bare(sku) if singleStoreHandler == nil { @@ -513,16 +512,12 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag } else { deleteList = append(deleteList, bareSku) } - globals.SugarLogger.Debug("2.stockList,deleteList==============", stockList, deleteList) } else { updateItems = append(updateItems, sku2Update(vendorID, sku, model.SyncFlagDeletedMask)) - globals.SugarLogger.Debug("3.updateItems==============", updateItems) } } else if model.IsSyncStatusNew(sku.SkuSyncStatus) { - globals.SugarLogger.Debug("4.进入model.IsSyncStatusNew(sku.SkuSyncStatus)") calVendorPrice4StoreSku(sku, storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage)) if singleStoreHandler == nil { - globals.SugarLogger.Debug("5.进入singleStoreHandler == nil") if dao.IsVendorThingIDEmpty(sku.VendorSkuID) { // todo 多平台商品库没有正常创建,直接跳过 } else { @@ -535,11 +530,9 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag } else { offlineList = append(offlineList, bareSku) } - globals.SugarLogger.Debug("6.stockList,priceList,onlineList||offlineList ==============", stockList, priceList, onlineList, offlineList) } } else { if sku.MergedStatus == model.SkuStatusNormal { - globals.SugarLogger.Debug("7.进入sku.MergedStatus == model.SkuStatusNormal") if vendorID == model.VendorIDDD { createList = append(createList, sku) } else if dao.IsVendorThingIDEmpty(sku.VendorCatID) && !strings.Contains(sku.StoreName, model.ExdStoreName) && vendorID != model.VendorIDYB && vendorID != model.VendorIDJDShop { @@ -550,13 +543,10 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag createList = append(createList, sku) } } - globals.SugarLogger.Debug("8.createList=======", createList) } isNeedReorder = true } else { - globals.SugarLogger.Debug("9.进入not isStoreSkuSyncNeedDelete IsSyncStatusNew") if dao.IsVendorThingIDEmpty(sku.VendorSkuID) && vendorID != model.VendorIDJDShop { - globals.SugarLogger.Debug("10.进入vendorID != model.VendorIDJDShop") // err = fmt.Errorf("门店:%d,修改没有创建的商品:%d", storeID, sku.SkuID) if vendorID != model.VendorIDJDShop || (vendorID == model.VendorIDJDShop && storeID == model.JdShopMainStoreID && sku.StoreSkuStatus != model.SkuStatusDontSale) { err = utils.NewErrorCode(fmt.Sprintf("门店:%d,修改没有创建的商品:%d", storeID, sku.SkuID), "-1", 0) @@ -567,9 +557,7 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag parentTask.AddBatchErr(err) parentTask.AddFailedList(failedList) } - globals.SugarLogger.Debug("11.failedList======", failedList) } else { - globals.SugarLogger.Debug("12.进入vendorID == model.VendorIDJDShop") isAdded2Update := false // 修改商品信息时不改价(以免活动引起的失败),而用单独的改价来改 if (model.IsSyncStatusUpdate(sku.SkuSyncStatus) || (model.IsSyncStatusSeq(sku.SkuSyncStatus) && reorderHandler == nil)) && singleStoreHandler != nil { @@ -579,15 +567,12 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag isAdded2Update = true updateList = append(updateList, calVendorPrice4StoreSku(sku, storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage))) } - globals.SugarLogger.Debug("13.updateList================", updateList) } if model.IsSyncStatusPrice(sku.SkuSyncStatus) { bareSku = storeSkuSyncInfo2Bare(calVendorPrice4StoreSku(sku, storeDetail.PricePercentagePackObj, int(storeDetail.PricePercentage))) priceList = append(priceList, bareSku) - globals.SugarLogger.Debug("14. priceList=====================", priceList) } if !isAdded2Update { - globals.SugarLogger.Debug("15.进入!isAdded2Update") if model.IsSyncStatusUpdate(sku.SkuSyncStatus) && singleStoreHandler == nil { // 正常就不应该进到这里 // if bareSku == nil { // bareSku = storeSkuSyncInfo2Bare(sku) @@ -608,7 +593,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag // stockList = append(stockList, bareSku) // } } - globals.SugarLogger.Debug("16.onlineList,stockList,offlineList===========", onlineList, stockList, offlineList) } //if model.IsSyncStatusStock(sku.SkuSyncStatus) { // if bareSku == nil { @@ -696,7 +680,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag task := tasksch.NewParallelTask("syncStoreSkuNew", tasksch.NewParallelConfig().SetParallelCount(1).SetIsContinueWhenError(isContinueWhenError2), ctx, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { step := batchItemList[0].(int) - globals.SugarLogger.Debugf("17.deleteList,createList,updateList,stockList===============", deleteList, createList, updateList, stockList) switch step { case 0: if len(deleteList) > 0 { @@ -728,7 +711,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag var failedList []*partner.StoreSkuInfoWithErr if failedList, err = singleStoreHandler.CreateStoreSkus(ctx, storeID, vendorStoreID, batchedStoreSkuList); singleStoreHandler.IsErrSkuExist(err) { if err != nil { - globals.SugarLogger.Debug("30.sth wrong on singleStoreHandler.CreateStoreSkus: %v", err) } if skuNameList, err2 := singleStoreHandler.GetStoreSkusFullInfo(ctx, task, storeID, vendorStoreID, []*partner.StoreSkuInfo{ &partner.StoreSkuInfo{ @@ -744,13 +726,10 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag err = nil failedList = nil // 因为batchSize为1,可以这样处理 } else if err2 != nil { - globals.SugarLogger.Debug("31.sth wrong on err2: %v", err2) failedList = append(failedList, putils.GetErrMsg2FailedSingleList(batchedStoreSkuList, err2, storeID, model.VendorChineseNames[vendorID], "查询是否有该商品")...) } - globals.SugarLogger.Debug("33.updateList|| failedList=============", updateList, failedList) } failedList, err = buildFailedListAndErr(failedList, err, nil, batchedStoreSkuList, storeID, vendorID, "创建门店商品") - globals.SugarLogger.Debug("18.updateList,failedList=========================", updateList, failedList) if len(failedList) > 0 { task.AddFailedList(failedList) } @@ -766,7 +745,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag } successList := putils.UnselectStoreSkuSyncListByVendorSkuIDs(batchedStoreSkuList, GetVendorSkuIDList(failedList)) if len(successList) > 0 { - globals.SugarLogger.Debug("19.len(successList) > 0 ,successList=========", successList) _, err := updateStoreSku(dao.GetDB(), vendorID, successList, model.SyncFlagNewMask) if err != nil { globals.SugarLogger.Debugf("20.sth wrong on updateStoreSku: %v", err) @@ -784,24 +762,13 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag _, err = putils.FreeBatchStoreSkuSyncInfo("更新门店商品基础信息", func(task tasksch.ITask, batchedStoreSkuList []*dao.StoreSkuSyncInfo) (result interface{}, successCount int, err error) { var failedList []*partner.StoreSkuInfoWithErr failedList, err = singleStoreHandler.UpdateStoreSkus(ctx, storeID, vendorStoreID, batchedStoreSkuList) - if err != nil { - globals.SugarLogger.Debugf("21.sth wrong on singleStoreHandler.UpdateStoreSkus: %v", err) - } failedList, err = buildFailedListAndErr(failedList, err, nil, batchedStoreSkuList, storeID, vendorID, "更新门店商品基础信息") - if err != nil { - globals.SugarLogger.Debugf("22.sth wrong on buildFailedListAndErr: %v", err) - } if len(failedList) > 0 { task.AddFailedList(failedList) } successList := putils.UnselectStoreSkuSyncListByVendorSkuIDs(batchedStoreSkuList, GetVendorSkuIDList(failedList)) - globals.SugarLogger.Debug("23.failedList,successList============", failedList, successList) if len(successList) > 0 { - _, err := updateStoreSku(dao.GetDB(), vendorID, successList, model.SyncFlagModifiedMask) - if err != nil { - globals.SugarLogger.Debugf("24.sth wrong on updateStoreSku: %v", err) - //return nil, 0, err - } + _, err = updateStoreSku(dao.GetDB(), vendorID, successList, model.SyncFlagModifiedMask) } return nil, len(successList), err }, ctx, task, updateList, singleStoreHandler.GetStoreSkusBatchSize(partner.FuncUpdateStoreSkus), isContinueWhenError2) @@ -812,7 +779,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag _, err = putils.FreeBatchStoreSkuInfo("更新门店商品库存", func(task tasksch.ITask, batchedStoreSkuList []*partner.StoreSkuInfo) (result interface{}, successCount int, err error) { var failedList []*partner.StoreSkuInfoWithErr failedList, err = storeSkuHandler.UpdateStoreSkusStock(ctx, storeDetail.VendorOrgCode, storeID, vendorStoreID, batchedStoreSkuList) - globals.SugarLogger.Debugf("failedList===========%s", utils.Format4Output(failedList, true)) failedList, err = buildFailedListAndErr(failedList, err, batchedStoreSkuList, nil, storeID, vendorID, "更新门店商品库存") if len(failedList) > 0 { task.AddFailedList(failedList) @@ -851,7 +817,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag } case 6: if len(priceList) > 0 { - globals.SugarLogger.Debugf("================更新门店商品价格%s", utils.Format4Output(priceList, true)) _, err = putils.FreeBatchStoreSkuInfo("更新门店商品价格", func(task tasksch.ITask, batchedStoreSkuList []*partner.StoreSkuInfo) (result interface{}, successCount int, err error) { if isNeedHandleAct(causeFlag) { cancelStoreSkuActs(ctx, task, vendorID, storeDetail.VendorOrgCode, storeID, vendorStoreID, batchedStoreSkuList, true) @@ -878,7 +843,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag for vendorCatID := range reorderSkuMap { vendorCatIDs = append(vendorCatIDs, vendorCatID) } - globals.SugarLogger.Debugf("================门店商品排序%s", utils.Format4Output(reorderSkuMap, true)) reorderTask := tasksch.NewParallelTask("门店商品排序", tasksch.NewParallelConfig().SetIsContinueWhenError(isContinueWhenError2), ctx, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { vendorCatID := batchItemList[0].(string) diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index 1accba870..6a9cf459a 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -684,7 +684,6 @@ func ScheduleTimerFuncOnce(name string, handler func(interface{}), timeStr strin duration := nextTime.Sub(now) + 1*time.Second globals.SugarLogger.Debugf("ScheduleTimerFuncOnce, func:%s, duration:%v", name, duration) utils.AfterFuncWithRecover(duration, func() { - globals.SugarLogger.Debugf("ScheduleTimerFuncOnce func:%s", name) handler(param) }) } diff --git a/business/jxutils/tasks/configrefresh.go b/business/jxutils/tasks/configrefresh.go index b26e1c8d5..327debc34 100644 --- a/business/jxutils/tasks/configrefresh.go +++ b/business/jxutils/tasks/configrefresh.go @@ -191,7 +191,6 @@ func RefreshQywxToken() (err error) { } return token, expireTimeStr, "" }, func(value, v2 string) { - globals.SugarLogger.Debugf("RefreshQywxToken setter value:%s", value) api.QywxAPI.SetToken(value) }) } diff --git a/controllers/tiktok_order.go b/controllers/tiktok_order.go index 946a89b9e..2a1eecdcb 100644 --- a/controllers/tiktok_order.go +++ b/controllers/tiktok_order.go @@ -3,7 +3,6 @@ package controllers import ( "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api" "git.rosy.net.cn/jx-callback/business/partner/purchase/tiktok_store" - "git.rosy.net.cn/jx-callback/globals" "git.rosy.net.cn/jx-callback/globals/api" "github.com/astaxie/beego/server/web" "strings" @@ -29,9 +28,7 @@ func (t *TiktokController) CallbackTiktokOrderMsg() { } // 2.参数解析 - globals.SugarLogger.Debug("抖音订单回调数据参数打印===========", string(byteList)) orderStatus, resp := api.TiktokStore.CreateOrderCallback(byteList) - globals.SugarLogger.Debug("抖音订单回调数据打印测试===========", orderStatus) if resp.Code != 0 { t.Data["json"] = resp t.ServeJSON()