diff --git a/business/auth2/auth2.go b/business/auth2/auth2.go index 949f35afd..19000baa2 100644 --- a/business/auth2/auth2.go +++ b/business/auth2/auth2.go @@ -12,7 +12,6 @@ import ( "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/model" "git.rosy.net.cn/jx-callback/business/model/dao" - "git.rosy.net.cn/jx-callback/globals" "git.rosy.net.cn/jx-callback/globals/api" "github.com/dchest/captcha" ) @@ -171,11 +170,9 @@ func createAuthInfo(user IUser, authBindInfo *AuthBindEx) (authInfo *AuthInfo) { } if user != nil { authInfo.UpdateByIUser(user) - globals.SugarLogger.Debugf("createAuthInfo id:%s, id2:%s, mobile:%s, authInfo:%s", authInfo.GetID(), authInfo.GetID2(), authInfo.GetMobile(), utils.Format4Output(authInfo, true)) } else { expireDuration = TmpTokenDuration authInfo.ExpiresAt = time.Now().Add(expireDuration).Unix() - globals.SugarLogger.Debugf("createAuthInfo authInfo:%s", utils.Format4Output(authInfo, true)) } SetUserInfo(token, authInfo, expireDuration) return authInfo @@ -249,7 +246,6 @@ func LoginInternal(ctx *Context, authType, authID, authIDType, authSecret string realAuthID = user.GetID() } if authBindEx, err = handler.VerifySecret(realAuthID, authSecret); err == nil { - globals.SugarLogger.Debugf("Login authBindEx", utils.Format4Output(authBindEx, false)) if authBindEx == nil { // mobile, email会返回nil(表示不会新建AuthBind实体) user = userProvider.GetUser(authID, authIDType) authBindEx = &AuthBindEx{ @@ -366,7 +362,6 @@ func BindUser(inauthInfo *AuthInfo, user IUser) (outauthInfo *AuthInfo, err erro // 添加新绑定 func AddAuthBind(user IUser, newAuthInfo *AuthInfo) (err error) { - globals.SugarLogger.Debugf("AddAuthBind user:%s, newAuthInfo:%s", utils.Format4Output(user, true), utils.Format4Output(newAuthInfo, true)) if user == nil || newAuthInfo == nil { return ErrInternalErrror } @@ -406,7 +401,6 @@ func AddAuthBindWithMobile(authInfo *AuthInfo, mobile string) (err error) { } func UnbindAuth(userID, authType, authTypeID, userName string) (err error) { - globals.SugarLogger.Debugf("UnbindAuth userID:%s, authType:%s, authTypeID:%s, userName:%s", userID, authType, authTypeID, userName) if handler := authers[authType]; handler != nil { err = handler.UnbindAuth(userID, authType, authTypeID, userName) } else { @@ -416,7 +410,6 @@ func UnbindAuth(userID, authType, authTypeID, userName string) (err error) { } func Logout(authInfo *AuthInfo) (err error) { - globals.SugarLogger.Debugf("Logout authInfo:%s", utils.Format4Output(authInfo, true)) if handler := authers[authInfo.AuthBindInfo.Type]; handler != nil { err = handler.Logout(authInfo) } diff --git a/business/auth2/auth_ctx.go b/business/auth2/auth_ctx.go index 02a441919..fc7aff118 100644 --- a/business/auth2/auth_ctx.go +++ b/business/auth2/auth_ctx.go @@ -5,7 +5,6 @@ import ( "strings" "git.rosy.net.cn/baseapi/utils" - "git.rosy.net.cn/jx-callback/globals" ) type Context struct { @@ -21,7 +20,6 @@ func NewContext(w http.ResponseWriter, r *http.Request) (ctx *Context) { r: r, accessUUID: utils.GetUUID(), } - globals.SugarLogger.Debugf("NewContext ip:%s", ctx.GetRealRemoteIP()) return ctx } diff --git a/business/auth2/authprovider/defauther.go b/business/auth2/authprovider/defauther.go index d4836f048..17a25cda2 100644 --- a/business/auth2/authprovider/defauther.go +++ b/business/auth2/authprovider/defauther.go @@ -36,7 +36,7 @@ func (a *DefAuther) AddAuthBind(authBindEx *auth2.AuthBindEx, userName string) ( } func (a *DefAuther) UnbindAuth(userID, authType, authTypeID, userName string) (err error) { - globals.SugarLogger.Debugf("DefAuther.UnbindAuth userID:%s, authType:%s, GetAuthTypeID:%s, userName:%s", userID, authType, authTypeID, userName) + //globals.SugarLogger.Debugf("DefAuther.UnbindAuth userID:%s, authType:%s, GetAuthTypeID:%s, userName:%s", userID, authType, authTypeID, userName) condition := map[string]interface{}{ "UserID": userID, "Type": authType, diff --git a/business/auth2/authprovider/douyin/tiktop_mini.go b/business/auth2/authprovider/douyin/tiktop_mini.go index 4de2ea799..8922383fe 100644 --- a/business/auth2/authprovider/douyin/tiktop_mini.go +++ b/business/auth2/authprovider/douyin/tiktop_mini.go @@ -32,8 +32,6 @@ func init() { func (a *TiktopMiniAuther) VerifySecret(dummy, code string) (authBindEx *auth2.AuthBindEx, err error) { globals.SugarLogger.Debugf("toktok mini VerifySecret jsCode:%s", code) appID, realCode := splitCode(code) - globals.SugarLogger.Debug("appID============", appID) - globals.SugarLogger.Debug("realCode============", realCode) sessionInfo, err := getTikTokApp(appID).GetTiktokOauth(realCode) if err != nil { return nil, err diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 0d1e4116d..615ff6ab9 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -445,7 +445,6 @@ func filterOrderInfo(order *model.GoodsOrder) { } func ResetCreateWaybillFee(db *dao.DaoDB, order *model.GoodsOrder) (err error) { - globals.SugarLogger.Debugf("=================取消本地运费") if db == nil { db = dao.GetDB() } diff --git a/business/jxstore/cms/cms.go b/business/jxstore/cms/cms.go index 346ec7d10..5c4560a9b 100644 --- a/business/jxstore/cms/cms.go +++ b/business/jxstore/cms/cms.go @@ -190,7 +190,6 @@ func GetPlaces(ctx *jxcontext.Context, keyword string, includeDisabled bool, par sqlParams = append(sqlParams, params["level"]) } sql += " ORDER BY t1.level, t1.name" - // globals.SugarLogger.Debug(sql) places := []*model.Place{} return places, dao.GetRows(nil, &places, sql, sqlParams) } @@ -495,7 +494,7 @@ func UpdateConfig(ctx *jxcontext.Context, key, configType, value string) (hint s hint = "1" db := dao.GetDB() - txDB , _ := dao.Begin(db) + txDB, _ := dao.Begin(db) defer func() { if r := recover(); r != nil { dao.Rollback(db, txDB) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index e047677b8..ae1f88e9e 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -1672,10 +1672,6 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor return 0, err } - globals.SugarLogger.Debug("==============payload", utils.Format4Output(payload, false)) - globals.SugarLogger.Debug("==============storeMap", utils.Format4Output(storeMap, false)) - globals.SugarLogger.Debug("==============userName", utils.Format4Output(userName, false)) - var beforeStoreMap = *storeMap syncStatus := model.SyncFlagModifiedMask valid := dao.StrictMakeMapByStructObject(payload, storeMap, userName) @@ -1724,7 +1720,6 @@ func UpdateStoreVendorMap(ctx *jxcontext.Context, db *dao.DaoDB, storeID, vendor } if err == nil { - globals.SugarLogger.Debug("==============2525", utils.Format4Output(valid, false)) if len(valid) > 0 { txDB, _ := dao.Begin(db) defer func() { diff --git a/business/jxstore/cms/store_sku.go b/business/jxstore/cms/store_sku.go index 2931c6bfd..158b7b5ca 100644 --- a/business/jxstore/cms/store_sku.go +++ b/business/jxstore/cms/store_sku.go @@ -1153,8 +1153,6 @@ func GetStoresSkusNew(ctx *jxcontext.Context, storeIDs, skuIDs []int, upcs []str if isHighPrice || priceType != 0 { sql += " , t4.unit_price DESC LIMIT 99" } - globals.SugarLogger.Debug("==============sqlDD", sql) - globals.SugarLogger.Debug("==============param", sqlParams) var tmpList []*tGetStoresSkusInfo beginTime := time.Now() if err = dao.GetRowsTx(txDB, &tmpList, sql, sqlParams...); err != nil { diff --git a/business/jxstore/cms/sync.go b/business/jxstore/cms/sync.go index ab0210330..eaec64f93 100644 --- a/business/jxstore/cms/sync.go +++ b/business/jxstore/cms/sync.go @@ -231,7 +231,6 @@ func (v *VendorSync) SyncReorderCategories(ctx *jxcontext.Context, db *dao.DaoDB // } func (v *VendorSync) SyncStore2(ctx *jxcontext.Context, db *dao.DaoDB, vendorIDs, storeIDs []int, mustDirty, isAsync bool) (hint string, err error) { - globals.SugarLogger.Debugf("SyncStore2, storeIDs:%d", storeIDs) userName := ctx.GetUserName() isManageIt := len(storeIDs) == 0 || len(storeIDs) > 5 _, hint, err = v.LoopStoresMap2(ctx, nil, db, fmt.Sprintf("同步门店信息:%v", storeIDs), isAsync, isManageIt, vendorIDs, storeIDs, mustDirty, func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (resultList interface{}, err error) { @@ -461,7 +460,6 @@ func (v *VendorSync) SyncStoresCategory(ctx *jxcontext.Context, db *dao.DaoDB, v hint, err = v.LoopStoresMap(ctx, db, fmt.Sprintf("同步门店分类信息:%v", storeIDs), isAsync, isManageIt, vendorIDs, storeIDs, func(t *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (interface{}, error) { loopMapInfo := batchItemList[0].(*LoopStoreMapInfo) - globals.SugarLogger.Debug("?????????????????????", v.GetSingleStoreHandler(loopMapInfo.VendorID)) if handler := v.GetSingleStoreHandler(loopMapInfo.VendorID); handler != nil { if isForce { dao.SetStoreCategorySyncStatus(db, loopMapInfo.VendorID, storeIDs, nil, model.SyncFlagModifiedMask) diff --git a/business/jxstore/cms/sync_store_sku.go b/business/jxstore/cms/sync_store_sku.go index 6d9ceda59..6fdb2d472 100644 --- a/business/jxstore/cms/sync_store_sku.go +++ b/business/jxstore/cms/sync_store_sku.go @@ -415,7 +415,6 @@ func updateStoreSku(db *dao.DaoDB, vendorID int, storeSkuList []*dao.StoreSkuSyn for k, v := range storeSkuList { updateItemList[k] = sku2Update(vendorID, v, syncStatus) } - globals.SugarLogger.Debugf("updateItemList==========%s", updateItemList) num, err = dao.BatchUpdateEntityByKV(db, updateItemList) if vendorID == model.VendorIDYB { err = updateYbOhterSku(db, storeSkuList) @@ -451,11 +450,9 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag var skus []*dao.StoreSkuSyncInfo if isFull { skus, err = dao.GetFullStoreSkus(db, vendorID, storeID) - globals.SugarLogger.Debugf("================isFull%s", utils.Format4Output(skus, true)) } else { skus, err = dao.GetStoreSkus(db, vendorID, storeID, skuIDs) - globals.SugarLogger.Debugf("================isFull2%s", utils.Format4Output(skus, true)) } if err != nil || len(skus) == 0 { return err @@ -493,7 +490,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag now := jxutils.OperationTime2HourMinuteFormat(time.Now()) var failedList []*partner.StoreSkuInfoWithErr for _, sku := range skus { - globals.SugarLogger.Debugf("================isFull2%s", utils.Format4Output(sku, true)) if !useVendorPriceDirectly && !isSkuLockTimeValid(sku) { sku.VendorPrice = 0 @@ -692,14 +688,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag // api.JdShop2API.SetCookieWithStr(configs[0].Value) // } } - globals.SugarLogger.Debugf("================createList%s", utils.Format4Output(createList, true)) - globals.SugarLogger.Debugf("================deleteList%s", utils.Format4Output(deleteList, true)) - globals.SugarLogger.Debugf("================updateList%s", utils.Format4Output(updateList, true)) - globals.SugarLogger.Debugf("================stockList%s", utils.Format4Output(stockList, true)) - globals.SugarLogger.Debugf("================onlineList%s", utils.Format4Output(onlineList, true)) - globals.SugarLogger.Debugf("================offlineList%s", utils.Format4Output(offlineList, true)) - globals.SugarLogger.Debugf("================priceList%s", utils.Format4Output(priceList, true)) - 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) @@ -707,7 +695,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag switch step { case 0: if len(deleteList) > 0 { - globals.SugarLogger.Debugf("================deleteList%s", utils.Format4Output(deleteList, true)) _, err = putils.FreeBatchStoreSkuInfo("删除门店商品", func(task tasksch.ITask, batchedStoreSkuList []*partner.StoreSkuInfo) (result interface{}, successCount int, err error) { var failedList []*partner.StoreSkuInfoWithErr if failedList, err = singleStoreHandler.DeleteStoreSkus(ctx, storeID, vendorStoreID, batchedStoreSkuList); err != nil { @@ -733,7 +720,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag case 1: if len(createList) > 0 { _, err = putils.FreeBatchStoreSkuSyncInfo("创建门店商品", func(task tasksch.ITask, batchedStoreSkuList []*dao.StoreSkuSyncInfo) (result interface{}, successCount int, err error) { - globals.SugarLogger.Debugf("================createList%s", utils.Format4Output(createList, true)) var failedList []*partner.StoreSkuInfoWithErr if failedList, err = singleStoreHandler.CreateStoreSkus(ctx, storeID, vendorStoreID, batchedStoreSkuList); singleStoreHandler.IsErrSkuExist(err) { if skuNameList, err2 := singleStoreHandler.GetStoreSkusFullInfo(ctx, task, storeID, vendorStoreID, []*partner.StoreSkuInfo{ @@ -768,7 +754,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag } } successList := putils.UnselectStoreSkuSyncListByVendorSkuIDs(batchedStoreSkuList, GetVendorSkuIDList(failedList)) - globals.SugarLogger.Debugf("successList================%s", utils.Format4Output(successList, false)) if len(successList) > 0 { updateStoreSku(dao.GetDB(), vendorID, successList, model.SyncFlagNewMask) } @@ -780,7 +765,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag } case 2: if len(updateList) > 0 { - globals.SugarLogger.Debugf("================updateList%s", utils.Format4Output(updateList, true)) _, 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) @@ -798,7 +782,6 @@ func syncStoreSkuNew(ctx *jxcontext.Context, parentTask tasksch.ITask, causeFlag case 3: // for k, list := range [][]*partner.StoreSkuInfo{stockList /*, onlineList*/} { if len(stockList) > 0 { - globals.SugarLogger.Debugf("================更新门店商品库存%s", utils.Format4Output(stockList, true)) _, 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) diff --git a/business/jxstore/cms/user2.go b/business/jxstore/cms/user2.go index 5fc23a87b..f7a5ea526 100644 --- a/business/jxstore/cms/user2.go +++ b/business/jxstore/cms/user2.go @@ -83,7 +83,6 @@ type UserProvider struct { } func (*UserProvider) GetUser(authID, authIDType string) (user auth2.IUser) { - globals.SugarLogger.Debugf("GetUser, authID:%s, authIDType:%s", authID, authIDType) fieldName := authTypeFieldMap[authIDType] if fieldName != "" { user2, err := dao.GetUserByID(dao.GetDB(), fieldName, authID) @@ -160,7 +159,7 @@ func RegisterUserWithMobile(ctx *jxcontext.Context, user *model.User, mobileVeri var mobileAuth *auth2.AuthInfo fakeMobile := false //user.Type = model.UserTypeConsumer | model.UserTypeStoreBoss // 先不区分商户与消息者 - user.Type = model.UserTypeConsumer // 先不区分商户与消息者 + user.Type = model.UserTypeConsumer // 先不区分商户与消息者 createName := ctx.GetRealRemoteIP() authType := auth2.AuthTypeMobile if manTokenInfo != nil && mobileVerifyCode == "" { @@ -296,7 +295,6 @@ func HandleOrder4Consignee(order *model.GoodsOrder) (err error) { authType := dao.GetAuthType4Vendor(order.VendorID) if authType == "" { msg := fmt.Sprintf("平台ID:%d当前不被支持,请联系开发", order.VendorID) - globals.SugarLogger.Warn(msg) return fmt.Errorf(msg) } @@ -402,7 +400,6 @@ func GetUserBindAuthInfo(ctx *jxcontext.Context) (authList []*model.AuthBind, er } func CreateUser(user *model.User, creatorName string) (err error) { - globals.SugarLogger.Debugf("CreateUser user:%s, creatorName:%s", utils.Format4Output(user, true), creatorName) if user == nil || user.UserID2 == "" || user.Name == "" { return ErrUserIDAndNameMustGiven @@ -461,15 +458,10 @@ func OnDingDingMsg(msg map[string]interface{}) (callbackResponse *dingdingapi.Ca db := dao.GetDB() for _, userID := range msg[dingdingapi.KeyUserID].([]interface{}) { userIDStr := utils.Interface2String(userID) - globals.SugarLogger.Debugf("OnDingDingMsg dingding user:%s left company", userIDStr) if authBind, err = dao.GetAuthBind(db, model.AuthBindTypeAuth, dingding.AuthTypeStaff, userIDStr); err == nil { // 直接找到了 - globals.SugarLogger.Debugf("OnDingDingMsg dingding user:%s, userID:%s left company", userIDStr, authBind.UserID) if err = DeleteUserInfo(jxcontext.AdminCtx, authBind.UserID); err != nil { globals.SugarLogger.Errorf("OnDingDingMsg failed with error:%v", err) } - //if err = DisableUser(jxcontext.AdminCtx, authBind.UserID); err != nil { - // globals.SugarLogger.Errorf("OnDingDingMsg failed with error:%v", err) - //} } } } else if eventType == dingdingapi.CBTagCheckURL { @@ -674,7 +666,6 @@ func getAddressInfoFromCoord(db *dao.DaoDB, lng, lat float64) (formattedAddress } func AddUserDeliveryAddress(ctx *jxcontext.Context, address *model.UserDeliveryAddress) (outAddress *model.UserDeliveryAddress, err error) { - globals.SugarLogger.Debugf("AddUserDeliveryAddress1 address:%s", utils.Format4Output(address, true)) if address.UserID == "" { return nil, fmt.Errorf("操作用户配送地址时必须指定UserID") } @@ -683,7 +674,6 @@ func AddUserDeliveryAddress(ctx *jxcontext.Context, address *model.UserDeliveryA lat := address.Lat address.AutoAddress, address.DistrictCode, address.CityCode, err = getAddressInfoFromCoord(db, lng, lat) if err == nil { - globals.SugarLogger.Debugf("AddUserDeliveryAddress2 address:%s", utils.Format4Output(address, true)) txDB, _ := dao.Begin(db) defer func() { if r := recover(); r != nil { @@ -705,15 +695,12 @@ func AddUserDeliveryAddress(ctx *jxcontext.Context, address *model.UserDeliveryA dao.Rollback(db, txDB) } } - globals.SugarLogger.Debugf("AddUserDeliveryAddress3 address:%s", utils.Format4Output(address, true)) return outAddress, err } func AddMyDeliveryAddress(ctx *jxcontext.Context, address *model.UserDeliveryAddress) (outAddress *model.UserDeliveryAddress, err error) { - globals.SugarLogger.Debugf("AddMyDeliveryAddress address:%s", utils.Format4Output(address, true)) _, address.UserID = ctx.GetMobileAndUserID() outAddress, err = AddUserDeliveryAddress(ctx, address) - globals.SugarLogger.Debugf("AddMyDeliveryAddress2 address:%s, err:%v", utils.Format4Output(address, true), err) return outAddress, err } diff --git a/business/jxstore/common/common.go b/business/jxstore/common/common.go index 8a8110240..e11d5cebc 100644 --- a/business/jxstore/common/common.go +++ b/business/jxstore/common/common.go @@ -123,7 +123,6 @@ func GetStoreListByLocation(ctx *jxcontext.Context, lng, lat float64, maxRadius _, lat2 := jxutils.ConvertDistanceToLogLat(lng, lat, float64(maxRadius), 0) lng1 := lng - (lng2 - lng) lat1 := lat - (lat2 - lat) - // globals.SugarLogger.Debugf("%f,%f,%f,%f\n", lng1, lng2, lat1, lat2) if !isJds { sql = ` SELECT t1.*, diff --git a/business/jxstore/event/event.go b/business/jxstore/event/event.go index 78c3a3c7d..d6e78b09b 100644 --- a/business/jxstore/event/event.go +++ b/business/jxstore/event/event.go @@ -166,7 +166,6 @@ func GetCheckVendorCookie(ctx *jxcontext.Context, vendorIDs []int, isAuto bool) errMsg += fmt.Sprintf(" 美团账号:[%v]的Cookie无效了!") flag = true } - globals.SugarLogger.Debugf("cookieCheck", err) } case model.VendorIDJD: result, err := api.JdAPI.GetJdUpcCodeByName("", jdUpcCode, 1, 5) @@ -183,7 +182,6 @@ func GetCheckVendorCookie(ctx *jxcontext.Context, vendorIDs []int, isAuto bool) errMsg += fmt.Sprintf("京东商城:[%v]的Cookie无效了!") flag = true } - globals.SugarLogger.Debugf("cookieCheck", err) } } cc.VendorID = v diff --git a/business/jxstore/misc/misc.go b/business/jxstore/misc/misc.go index c70f4e577..1accba870 100644 --- a/business/jxstore/misc/misc.go +++ b/business/jxstore/misc/misc.go @@ -526,7 +526,6 @@ func syncStoreSku() { } func doDailyWork2() { - globals.SugarLogger.Debug("doDailyWork2") if beego.BConfig.RunMode == "jxgy" { syncStoreSku() refreshPointOrderNewEarningPrice() @@ -538,8 +537,6 @@ func doDailyWork2() { } func doDailyWork() { - globals.SugarLogger.Debug("doDailyWork") - //同步商品额外前缀和水印图(打标记) cms.SyncSkuExperfixAndWatermark(jxcontext.AdminCtx) @@ -622,8 +619,6 @@ func RefreshAfsOrderStatusAccess(ctx *jxcontext.Context) { } func RefreshRealMobile(ctx *jxcontext.Context, vendorID int, fromTime, toTime time.Time, isAsync, isContinueWhenError bool) (hint string, err error) { - globals.SugarLogger.Debug("RefreshRealMobile") - handler := partner.GetPurchasePlatformFromVendorID(vendorID) if handler == nil { return "", fmt.Errorf("不合法的vendorID:%d", vendorID) @@ -676,9 +671,7 @@ func ScheduleTimerFunc(name string, handler func(), timeList []string) { now := time.Now() nextTime := jxutils.GetNextTimeFromList(now, timeList) duration := nextTime.Sub(now) + 1*time.Second - globals.SugarLogger.Debugf("ScheduleTimerFunc, func:%s, duration:%v", name, duration) utils.AfterFuncWithRecover(duration, func() { - globals.SugarLogger.Debugf("ScheduleTimerFunc func:%s", name) handler() ScheduleTimerFunc(name, handler, timeList) }) diff --git a/business/jxutils/datares/datares.go b/business/jxutils/datares/datares.go index 0e6fca441..571359072 100644 --- a/business/jxutils/datares/datares.go +++ b/business/jxutils/datares/datares.go @@ -74,7 +74,6 @@ func GetQiniuUploadToken(ctx *jxcontext.Context, suffix, hashCode string) (upTok // 此函数要求resBinary不能空,mimeType与hashCode必须是正确的 func RegisterDataResource(ctx *jxcontext.Context, name, resourceURL, mimeType, hashCode string, resBinary []byte, imgType int, isAsyncUpload2Vendor bool) (dataRes *model.DataResource, err error) { - globals.SugarLogger.Debugf("RegisterDataResource, name:%s, resourceURL:%s, mimeType:%s, hashCode:%s, imgType:%d, isAsyncUpload2Vendor;%t", name, resourceURL, mimeType, hashCode, imgType, isAsyncUpload2Vendor) if model.ValidMimeTypes[mimeType] == 0 { return nil, fmt.Errorf("MIME type:%s非法,当前只支持:%s", mimeType, model.GetValidMimeTypeDesc()) } @@ -120,7 +119,6 @@ func RegisterDataResource(ctx *jxcontext.Context, name, resourceURL, mimeType, h } func TryRegisterDataResource(ctx *jxcontext.Context, name, resourceURL string, imgType int, isAsyncUpload2Vendor bool) (dataRes *model.DataResource, err error) { - globals.SugarLogger.Debugf("TryRegisterDataResource, name:%s, resourceURL:%s, imgType:%d, isAsyncUpload2Vendor;%t", name, resourceURL, imgType, isAsyncUpload2Vendor) dataRes = &model.DataResource{ MainURL: resourceURL, } diff --git a/business/jxutils/ditu/ditu.go b/business/jxutils/ditu/ditu.go index 2e8695649..4e16783ce 100644 --- a/business/jxutils/ditu/ditu.go +++ b/business/jxutils/ditu/ditu.go @@ -32,7 +32,6 @@ func (c *Coordinate) GetMapKey() int64 { func GetRound4Radius(lng, lat float64, gridWith int) (roundLng, roundLat int) { lng2, _ := jxutils.ConvertDistanceToLogLat(lng, lat, float64(gridWith), 90) _, lat2 := jxutils.ConvertDistanceToLogLat(lng, lat, float64(gridWith), 0) - // globals.SugarLogger.Debugf("GetRound4Radius gridWith:%d, lng:%f, lat:%f, lng2:%f, lat2:%f", gridWith, lng, lat, lng2, lat2) return jxutils.StandardCoordinate2Int(math.Abs(lng2 - lng)), jxutils.StandardCoordinate2Int(math.Abs(lat2 - lat)) } diff --git a/business/jxutils/dtask/dtask_test.go b/business/jxutils/dtask/dtask_test.go index 494a7bdef..95e2d785b 100644 --- a/business/jxutils/dtask/dtask_test.go +++ b/business/jxutils/dtask/dtask_test.go @@ -6,11 +6,9 @@ import ( "testing" "time" - "git.rosy.net.cn/baseapi/utils" _ "git.rosy.net.cn/jx-callback/business/jxcallback/scheduler/defsch" "git.rosy.net.cn/jx-callback/business/model" _ "git.rosy.net.cn/jx-callback/business/partner/purchase/jd" - "git.rosy.net.cn/jx-callback/globals" "git.rosy.net.cn/jx-callback/globals/testinit" ) @@ -82,8 +80,6 @@ type tTest struct { } func (p *tTest) DurableTaskTestFunc(intParam int, strParam string, mapParam map[string]interface{}, sliceParam []interface{}, tt []*model.Store) error { - globals.SugarLogger.Debug(intParam, strParam, mapParam, sliceParam) - globals.SugarLogger.Debug(utils.Format4Output(tt, false)) time.Sleep(1 * time.Second) return nil // errors.New("hello") } diff --git a/business/jxutils/eventhub/eventhub.go b/business/jxutils/eventhub/eventhub.go index 3a4ca25f7..fbbed6c95 100644 --- a/business/jxutils/eventhub/eventhub.go +++ b/business/jxutils/eventhub/eventhub.go @@ -223,7 +223,6 @@ func (e *EventHub) GetEvent(eventCategory string, eventTypeList []string, criter } } } - globals.SugarLogger.Debugf("GetEvent pollingDuration:%d seconds", pollingDuration/time.Second) timer := time.NewTimer(pollingDuration) select { case tmpEvent, ok := <-notifyChan: diff --git a/business/jxutils/eventhub/syseventhub/syseventhub.go b/business/jxutils/eventhub/syseventhub/syseventhub.go index 1c2f75635..3a465e5ec 100644 --- a/business/jxutils/eventhub/syseventhub/syseventhub.go +++ b/business/jxutils/eventhub/syseventhub/syseventhub.go @@ -4,8 +4,6 @@ import ( "time" "git.rosy.net.cn/baseapi/utils" - "git.rosy.net.cn/jx-callback/globals" - "git.rosy.net.cn/jx-callback/business/jxutils/eventhub" "git.rosy.net.cn/jx-callback/globals/api" ) @@ -126,7 +124,6 @@ func (h *Hub) GetToken(tokenType, oldToken string, waitTime time.Duration) (toke } } } - globals.SugarLogger.Debugf("GetToken tokenType:%s tokenInfo:%s", tokenType, utils.Format4Output(tokenInfo, true)) return tokenInfo } diff --git a/business/jxutils/excel/excel.go b/business/jxutils/excel/excel.go index 23d3d45e0..eb8a9f803 100644 --- a/business/jxutils/excel/excel.go +++ b/business/jxutils/excel/excel.go @@ -17,7 +17,6 @@ type Obj2ExcelSheetConfig struct { } func Obj2Excel(sheetList []*Obj2ExcelSheetConfig) []byte { - globals.SugarLogger.Debug("Obj2Excel") excelFile := excelize.NewFile() //for sheetIndex, sheetConfig := range sheetList { for _, sheetConfig := range sheetList { @@ -114,7 +113,6 @@ func Obj2Excel(sheetList []*Obj2ExcelSheetConfig) []byte { } func Excel2Slice(reader io.Reader) (contents map[string][][]string) { - globals.SugarLogger.Debug("Excel2Slice") if excelFile, err := excelize.OpenReader(reader); err == nil { contents = make(map[string][][]string) for _, v := range excelFile.GetSheetMap() { diff --git a/business/jxutils/jxcontext/jxcontext.go b/business/jxutils/jxcontext/jxcontext.go index 69ad6985a..fa2c8e0dc 100644 --- a/business/jxutils/jxcontext/jxcontext.go +++ b/business/jxutils/jxcontext/jxcontext.go @@ -4,7 +4,6 @@ import ( "errors" "net/http" - "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/auth2" "git.rosy.net.cn/jx-callback/business/model" "git.rosy.net.cn/jx-callback/business/model/dao" @@ -52,12 +51,10 @@ func New(notUsed interface{}, token string, w http.ResponseWriter, r *http.Reque token: token, Context: auth2.NewContext(w, r), } - globals.SugarLogger.Debugf("jxcontext New, token:%s", token) if auth2.IsV2Token(token) { authInfo, err2 := auth2.GetTokenInfo(token) if err = err2; err == nil { ctx.userInfo = authInfo - globals.SugarLogger.Debugf("jxcontext New, V2 authInfo:%s", utils.Format4Output(authInfo, true)) if authInfo.TokenType != auth2.TokenTypeNormal { err = errors.New("需要正式TOKEN") } diff --git a/business/jxutils/jxutils.go b/business/jxutils/jxutils.go index f8e639347..f59a7aaef 100644 --- a/business/jxutils/jxutils.go +++ b/business/jxutils/jxutils.go @@ -125,7 +125,6 @@ func SplitUniversalOrderID(universalOrderID string) (orderID string, vendorID in vendorID = int(utils.Str2Int64(universalOrderID[index+1:])) } else { if vendorID = GetPossibleVendorIDFromVendorOrderID(universalOrderID); vendorID == model.VendorIDUnknown { - // globals.SugarLogger.Errorf("unkown order type:%v", universalOrderID) panic(fmt.Sprintf("unkown order type, orderID:%s", universalOrderID)) } orderID = universalOrderID @@ -168,9 +167,6 @@ func GetPossibleVendorIDFromVendorOrderID(vendorOrderID string) (vendorID int) { } else if orderIDLen == len("18100216009800000001") || orderIDLen == len("191075245758000000039") { vendorID = model.VendorIDJDShop } - //} else { - // globals.SugarLogger.Debugf("GetPossibleVendorIDFromVendorOrderID, 2: %v", vendorOrderID) - //} return vendorID } diff --git a/business/jxutils/msg/msg.go b/business/jxutils/msg/msg.go index ceff07d1a..6b961680d 100644 --- a/business/jxutils/msg/msg.go +++ b/business/jxutils/msg/msg.go @@ -17,7 +17,6 @@ import ( // todo msgType不依赖于钉钉 func SendUserMessage(msgType string, user *model.User, title, content string) (err error) { userID := user.GetID() - globals.SugarLogger.Debugf("SendUserMessage userID:%s, title:%s", userID, title) authList, err := auth2.GetUserBindAuthInfo(userID) findOneMethod := false if err == nil { diff --git a/business/jxutils/smsmsg/smsmsg.go b/business/jxutils/smsmsg/smsmsg.go index dc77a5246..44382bf04 100644 --- a/business/jxutils/smsmsg/smsmsg.go +++ b/business/jxutils/smsmsg/smsmsg.go @@ -33,10 +33,8 @@ func SendSMSMsg(mobileList []string, signName, templateCode string, templatePara mobileList = jxutils.StringMap2List(jxutils.StringList2Map(mobileList)) for _, mobileNum := range mobileList { if mobileNum != "" { - globals.SugarLogger.Debugf("SendSMSMsg mobileNum:%s, templateCode:%s", mobileNum, templateCode) if true { if response, err := api.SMSClient.Execute(globals.AliKey, globals.AliSecret, mobileNum, signName, templateCode, string(utils.MustMarshal(templateParam))); err != nil { - globals.SugarLogger.Warnf("SendSMSMsg mobileNum:%s failed with error:%v", mobileNum, err) errList.AddErr(err) } else if response.Code != aliyunsmsclient.ResponseCodeOk { errMsg := fmt.Sprintf("SendSMSMsg mobileNum:%s failed with response:%s", mobileNum, utils.Format4Output(response, true)) @@ -132,7 +130,7 @@ func NotifyPickOrder(order *model.GoodsOrder) (err error) { order.NotifyType = int(store.SMSNotify) err = partner.CurOrderManager.UpdateOrderFields(order, []string{"NotifyType"}) //品牌余额, 一条5分 - err = partner.CurStoreAcctManager.InsertBrandBill(jxcontext.AdminCtx, store.BrandID, 5, model.BrandBillTypeExpend, feeType, order.VendorOrderID,"") + err = partner.CurStoreAcctManager.InsertBrandBill(jxcontext.AdminCtx, store.BrandID, 5, model.BrandBillTypeExpend, feeType, order.VendorOrderID, "") return err } balance, _ := partner.CurStoreAcctManager.GetBrandBalance(store.BrandID) @@ -345,7 +343,7 @@ func NotifyBrandBalance(brandID int) (err error) { err = api.Cacher.Set("brandID"+utils.Int2Str(brandID), 1, utils.Str2Time(time.Now().AddDate(0, 0, 1).Format("2006-01-02")+"00:00:00").Sub(time.Now())) } if count > 0 { - partner.CurStoreAcctManager.InsertBrandBill(jxcontext.AdminCtx, brandID, 5*count, model.BrandBillTypeExpend, model.BrandBillFeeTypeSys, "","") + partner.CurStoreAcctManager.InsertBrandBill(jxcontext.AdminCtx, brandID, 5*count, model.BrandBillTypeExpend, model.BrandBillFeeTypeSys, "", "") } } return err diff --git a/business/jxutils/tasks/configrefresh.go b/business/jxutils/tasks/configrefresh.go index 59d6472e1..b26e1c8d5 100644 --- a/business/jxutils/tasks/configrefresh.go +++ b/business/jxutils/tasks/configrefresh.go @@ -60,7 +60,6 @@ func RefreshConfig(configKey string, expiresTime time.Duration, configGetter fun handleType := 0 if err := db.Read(curConfig, "Thirdparty"); err != nil { if err != orm.ErrNoRows { - globals.SugarLogger.Errorf("db error:%v, curConfig:%v", err, curConfig) return errRefreshGap } handleType = 2 @@ -117,10 +116,8 @@ func RefreshConfig(configKey string, expiresTime time.Duration, configGetter fun func RefreshWeixinToken() (err error) { if api.WeixinAPI != nil { err = RefreshConfig("wechat", weixinTokenExpires, func() (token string, expireTimeStr string, invalidParameter string) { - globals.SugarLogger.Debugf("RefreshWeixinToken RunMode:%s", beego.BConfig.RunMode) if globals.IsMainProductEnv() { if tokenInfo, err := api.WeixinAPI.CBRetrieveToken(); err == nil { - globals.SugarLogger.Debugf("RefreshWeixinToken tokenInfo:%s", utils.Format4Output(tokenInfo, true)) token = tokenInfo.AccessToken } else { globals.SugarLogger.Errorf("RefreshWeixinToken RefreshToken failed with error:%v", err) @@ -133,7 +130,6 @@ func RefreshWeixinToken() (err error) { } return token, expireTimeStr, "" }, func(value, v2 string) { - globals.SugarLogger.Debugf("RefreshWeixinToken setter value:%s", value) syseventhub.SysEventHub.OnNewWXToken(value) api.WeixinAPI.CBSetToken(value) }) @@ -155,7 +151,6 @@ func RefreshFnToken() (err error) { api.FnAPI.SetToken(curConfig.Token) api.FnAPI.SetRefreshToken(curConfig.RefreshToken) if tokenInfo, err := api.FnAPI.GetAccessToken(); err == nil { - globals.SugarLogger.Debugf("RefreshFnToken tokenInfo:%s", utils.Format4Output(tokenInfo, true)) token = tokenInfo.BusinessDataObj.AccessToken refreshToken = tokenInfo.BusinessDataObj.RefreshToken } else { @@ -176,7 +171,6 @@ func RefreshFnToken() (err error) { } return token, expireTimeStr, refreshToken }, func(value, v2 string) { - globals.SugarLogger.Debugf("RefreshFnToken setter value:[%s],[%s]", value, v2) api.FnAPI.SetToken(value) api.FnAPI.SetRefreshToken(v2) }) @@ -190,7 +184,6 @@ func RefreshQywxToken() (err error) { globals.SugarLogger.Debugf("RefreshQywxToken RunMode:%s", beego.BConfig.RunMode) if globals.IsMainProductEnv() { if tokenInfo, err := api.QywxAPI.GetToken(); err == nil { - globals.SugarLogger.Debugf("RefreshQywxToken tokenInfo:%s", utils.Format4Output(tokenInfo, true)) token = tokenInfo } else { globals.SugarLogger.Errorf("RefreshQywxToken RefreshToken failed with error:%v", err) diff --git a/business/jxutils/tasksch/parallel_task.go b/business/jxutils/tasksch/parallel_task.go index a396b84cc..0afd4a951 100644 --- a/business/jxutils/tasksch/parallel_task.go +++ b/business/jxutils/tasksch/parallel_task.go @@ -6,7 +6,6 @@ import ( "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/jxutils" "git.rosy.net.cn/jx-callback/business/jxutils/jxcontext" - "git.rosy.net.cn/jx-callback/globals" ) const ( @@ -107,7 +106,6 @@ func NewParallelTask(taskName string, config *ParallelConfig, ctx *jxcontext.Con func (task *ParallelTask) Run() { task.run(func() { - globals.SugarLogger.Debugf("ParallelTask.Run %s", task.Name) for i := 0; i < task.ParallelCount; i++ { utils.CallFuncAsync(func() { var chanRetVal interface{} diff --git a/business/jxutils/tasksch/sequence_task.go b/business/jxutils/tasksch/sequence_task.go index bd25d425c..8bd60754c 100644 --- a/business/jxutils/tasksch/sequence_task.go +++ b/business/jxutils/tasksch/sequence_task.go @@ -3,7 +3,6 @@ package tasksch import ( "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/jxutils/jxcontext" - "git.rosy.net.cn/jx-callback/globals" ) const ( @@ -32,7 +31,6 @@ func NewSeqTask2(taskName string, ctx *jxcontext.Context, isContinueWhenError bo func (task *SeqTask) Run() { task.run(func() { - globals.SugarLogger.Debugf("SeqTask.Run %s", task.Name) var taskErr error var taskResult []interface{} for i := 0; i < task.TotalItemCount; i++ { diff --git a/business/jxutils/tasksch/task.go b/business/jxutils/tasksch/task.go index 89f407e4a..87a1cf3bd 100644 --- a/business/jxutils/tasksch/task.go +++ b/business/jxutils/tasksch/task.go @@ -459,7 +459,6 @@ func (t *BaseTask) run(taskHandler func()) { task.TerminatedAt = time.Now() task.locker.Unlock() task.Error() - globals.SugarLogger.Debugf("Task:%s, mainErr:%v, batchErrList:%v", task.Name, task.mainErr, task.batchErrList) select { case <-t.quitChan: @@ -484,7 +483,6 @@ func (t *BaseTask) run(taskHandler func()) { func SendMessage(t *BaseTask) { time.Sleep(10 * time.Millisecond) // 等待GetResult中的isGetResultCalled赋值 - globals.SugarLogger.Debugf("BaseTask task ID:%s, name:%s finished, isGetResultCalled:%t", t.ID, t.Name, t.isGetResultCalled) if !t.isGetResultCalled && t.parent == nil && len(GetTasks(t.ID, TaskStatusBegin, TaskStatusEnd, 24, "")) > 0 { if authInfo, err := t.ctx.GetV2AuthInfo(); err == nil { // 这里应该是不管登录类型,直接以可能的方式发消息 var content string @@ -540,7 +538,6 @@ func (t *BaseTask) setStatus(status int) { func (task *BaseTask) callWorker(worker func() (retVal interface{}, err error)) (retVal interface{}, err error) { defer func() { if r := recover(); r != nil { - globals.SugarLogger.Errorf("callWorker panic:%v", r) err = fmt.Errorf("panic, r:%v", r) } }() @@ -550,7 +547,6 @@ func (task *BaseTask) callWorker(worker func() (retVal interface{}, err error)) func (task *BaseTask) callWorker2(worker func() (retVal interface{}, successCount int, err error)) (retVal interface{}, successCount int, err error) { defer func() { if r := recover(); r != nil { - globals.SugarLogger.Errorf("callWorker panic:%v", r) err = fmt.Errorf("panic, r:%v", r) } }() diff --git a/business/model/api.go b/business/model/api.go index ddc1fc928..057a1ea6c 100644 --- a/business/model/api.go +++ b/business/model/api.go @@ -59,9 +59,9 @@ type GoodsOrderExt struct { MarketManPhone string `json:"marketManPhone"` //市場負責人電話 MarketManName string `json:"marketManName"` - - OperatorPhone string `orm:"size(16)" json:"operatorPhone"` // 京东运营人电话 - OperatorName string `orm:"size(32)" json:"operatorName"` // 京东运营人组(角色) + Comment string `json:"comment"` // 门店备注 + OperatorPhone string `orm:"size(16)" json:"operatorPhone"` // 京东运营人电话 + OperatorName string `orm:"size(32)" json:"operatorName"` // 京东运营人组(角色) OperatorPhone2 string `orm:"size(16)" json:"operatorPhone2"` // 美团运营人电话 OperatorName2 string `orm:"size(32)" json:"operatorName2"` // 美团运营人组(角色) diff --git a/business/model/dao/common.go b/business/model/dao/common.go index e8fc45a13..e3cb5941f 100644 --- a/business/model/dao/common.go +++ b/business/model/dao/common.go @@ -3,7 +3,6 @@ package dao import ( "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/model" - "git.rosy.net.cn/jx-callback/globals" ) func GetDataResource(db *DaoDB, hashCode, fullURL string) (dataRes *model.DataResource, err error) { @@ -54,7 +53,6 @@ func GetVendorOrgCode(db *DaoDB, vendorID int, vendorOrgCode, vendorType string) } sql += " ORDER BY comment" err = GetRows(db, &vendorOrgs, sql, sqlParams) - globals.SugarLogger.Debug("===========sql= ", sql) return vendorOrgs, err } diff --git a/business/model/dao/dao_order.go b/business/model/dao/dao_order.go index 2bbb05eb8..dc9a61f27 100644 --- a/business/model/dao/dao_order.go +++ b/business/model/dao/dao_order.go @@ -822,7 +822,7 @@ func GetOrders(db *DaoDB, ids []int64, isIncludeSku, isIncludeFake bool, fromDat -- CAST(IF(t1.earning_price <> 0, t1.earning_price, IF(t1.shop_price <> 0 && t1.shop_price < t1.sale_price, t1.shop_price, t1.sale_price) * IF(t1.order_pay_percentage > 0, t1.order_pay_percentage, %d) / 100) AS SIGNED) earning_price, t2.status waybill_status, t2.courier_name, t2.courier_mobile, t2.actual_fee, t2.desired_fee, t2.waybill_created_at, t2.waybill_finished_at, t2.vendor_waybill_id2 vendor_waybill_id2_waybill, - t5.pay_percentage, t5.old_pay_percentage, t5.market_man_phone, tu.name market_man_name, + t5.pay_percentage, t5.comment ,t5.old_pay_percentage, t5.market_man_phone, tu.name market_man_name, t5.operator_phone, t5.operator_phone2, t5.operator_phone3, tu1.name operator_name, tu2.name operator_name2, tu3.name operator_name3, t6.vendor_pay_percentage, city.name city_name, district.name district_name, diff --git a/business/partner/purchase/doudian/store_test.go b/business/partner/purchase/doudian/store_test.go index 6f898f0fc..73a39137f 100644 --- a/business/partner/purchase/doudian/store_test.go +++ b/business/partner/purchase/doudian/store_test.go @@ -1,7 +1,6 @@ package doudian import ( - freightTemplate_create_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/freightTemplate_create/request" shop_batchCreateStore_request "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/sdk-golang/api/shop_batchCreateStore/request" "git.rosy.net.cn/baseapi/platformapi/tiktok_shop/tiktok_api" "git.rosy.net.cn/jx-callback/business/partner/purchase/tiktok_store" @@ -49,51 +48,51 @@ func TestCreateStore(t *testing.T) { //} //// func TestCreateFreightTemplate(t *testing.T) { - accesstoken := `{"access_token":"a1746210-a8a3-4497-a87b-09d1f10dbb95","expires_in":1665652252,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对 接专用店","refresh_token":"c1cf8d88-0983-4f2a-b969-3746fae6b0cd","authorit y_id":""}` - a := tiktok_api.New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", accesstoken) - t1 := &freightTemplate_create_request.FreightTemplateCreateParam{ - Columns: []freightTemplate_create_request.ColumnsItem{ - { - AddWeight: 20, - MinSkuAmount: -1, - FirstWeight: 20, - ProvinceInfos: []freightTemplate_create_request.ProvinceInfosItem{ - { - Id: 51, - Children: []freightTemplate_create_request.ChildrenItem_4{ - { - Id: 510101, - Children: []freightTemplate_create_request.ChildrenItem_5{ - { - Id: 510107, - Children: []freightTemplate_create_request.ChildrenItem{ - { - Id: 610041, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - Template: &freightTemplate_create_request.Template{ - TemplateName: "运费模板创建测试0929", - ProductProvince: 51, - ProductCity: 510104, - CalculateType: 1, - TransferType: 1, - RuleType: 0, - }, - } - //t2 := []freightTemplate_create_request.FreightTemplateCreateParam{} - //t2 = append(t2, t1) - freightID, err := a.FreightTemplateCreate(t1) - //fmt.Println("freightID==", fmt.Sprintf("%v", freightID)) - t.Fatal("err===========", err) - t.Fatalf("resp===========:%v", freightID) + //accesstoken := `{"access_token":"a1746210-a8a3-4497-a87b-09d1f10dbb95","expires_in":1665652252,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对 接专用店","refresh_token":"c1cf8d88-0983-4f2a-b969-3746fae6b0cd","authorit y_id":""}` + //a := tiktok_api.New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", accesstoken) + //t1 := &freightTemplate_create_request.FreightTemplateCreateParam{ + // Columns: []freightTemplate_create_request.ColumnsItem{ + // { + // AddWeight: 20, + // MinSkuAmount: -1, + // FirstWeight: 20, + // ProvinceInfos: []freightTemplate_create_request.ProvinceInfosItem{ + // { + // Id: 51, + // Children: []freightTemplate_create_request.ChildrenItem_4{ + // { + // Id: 510101, + // Children: []freightTemplate_create_request.ChildrenItem_5{ + // { + // Id: 510107, + // Children: []freightTemplate_create_request.ChildrenItem{ + // { + // Id: 610041, + // }, + // }, + // }, + // }, + // }, + // }, + // }, + // }, + // }, + // }, + // Template: &freightTemplate_create_request.Template{ + // TemplateName: "运费模板创建测试0929", + // ProductProvince: 51, + // ProductCity: 510104, + // CalculateType: 1, + // TransferType: 1, + // RuleType: 0, + // }, + //} + ////t2 := []freightTemplate_create_request.FreightTemplateCreateParam{} + ////t2 = append(t2, t1) + //freightID, err := a.FreightTemplateCreate(t1) + ////fmt.Println("freightID==", fmt.Sprintf("%v", freightID)) + //t.Fatal("err===========", err) + //t.Fatalf("resp===========:%v", freightID) } // @@ -110,9 +109,9 @@ func TestCreateFreightTemplate(t *testing.T) { func TestCreateFences(t *testing.T) { //accesstoken := `{"access_token":"a1746210-a8a3-4497-a87b-09d1f10dbb95","expires_in":1665652252,"scope":"SCOPE","shop_id":"","shop_name":"小时达开放平台对 接专用店","refresh_token":"c1cf8d88-0983-4f2a-b969-3746fae6b0cd","authorit y_id":""}` //a := tiktok_api.New("7136048270014416392", "c397aa9f-3927-47c4-8cfe-4d84e02602e0", accesstoken) - resp, err := tiktok_store.CreateFenceByStore(668472) - t.Fatal("err===========", err) - t.Fatalf("resp===========:%v", resp) + //resp, err := tiktok_store.CreateFenceByStore(668472) + //t.Fatal("err===========", err) + //t.Fatalf("resp===========:%v", resp) } func TestSplice(t *testing.T) { resp := tiktok_store.SplicingTimeToDoudian(100, 1100, 1200, 2100) diff --git a/business/partner/purchase/jx/localjx/tonglianpay.go b/business/partner/purchase/jx/localjx/tonglianpay.go index e29568787..d63413eac 100644 --- a/business/partner/purchase/jx/localjx/tonglianpay.go +++ b/business/partner/purchase/jx/localjx/tonglianpay.go @@ -45,8 +45,6 @@ func pay4OrderByTL(ctx *jxcontext.Context, order *model.GoodsOrder, payType int, if err == nil && authInfo.GetAuthType() == weixin.AuthTypeMini && authInfo.GetAuthTypeID() == subAppID { param.Acct = authInfo.GetAuthID() } - globals.SugarLogger.Debug("authInfo=======================", authInfo) - globals.SugarLogger.Debug("param.Acc=======================", param.Acct) } if vendorPayType == tonglianpayapi.PayTypeZfbJS || vendorPayType == tonglianpayapi.PayTypeZfbApp { if authInfo, err := ctx.GetV2AuthInfo(); err == nil { diff --git a/business/partner/purchase/tiktok_store/order.go b/business/partner/purchase/tiktok_store/order.go index 8b648a016..09137fe51 100644 --- a/business/partner/purchase/tiktok_store/order.go +++ b/business/partner/purchase/tiktok_store/order.go @@ -104,6 +104,7 @@ func (p *PurchaseHandler) getOrder(vendorOrgCode, vendorOrderID, vendorStoreID s InvoiceTaxerID: "", InvoiceEmail: "", VendorOrgCode: vendorOrgCode, + TotalShopMoney: utils.Float64TwoInt64(float64(result.PayAmount) * 0.95), // 抖音平台扣点金额0.05 } // 本地获取订单记录 orderSeq, _ := dao.GetVendorOrderNumber(dao.GetDB(), model.VendorIDDD, order.VendorStoreID) diff --git a/business/partner/purchase/tiktok_store/order_afs.go b/business/partner/purchase/tiktok_store/order_afs.go index abc938b80..07640260c 100644 --- a/business/partner/purchase/tiktok_store/order_afs.go +++ b/business/partner/purchase/tiktok_store/order_afs.go @@ -3,13 +3,10 @@ package tiktok_store import ( "fmt" tiktokShop "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/jxcontext" "git.rosy.net.cn/jx-callback/business/model" "git.rosy.net.cn/jx-callback/business/partner" "git.rosy.net.cn/jx-callback/globals" - "git.rosy.net.cn/jx-callback/globals/api" ) var ( @@ -140,17 +137,19 @@ func (c *PurchaseHandler) PartRefundOrder(ctx *jxcontext.Context, order *model.G } func (c *PurchaseHandler) GetOrderAfsInfo(ctx *jxcontext.Context, vendorOrderID, afsOrderID string) (orderAfsInfo *partner.OrderAfsInfo, err error) { + order, err := partner.CurOrderManager.LoadOrder(vendorOrderID, model.VendorIDDD) + if err != nil { + return nil, err + } + + list, err := getAPI(order.VendorOrgCode, 0, "").QueryAfsOrderDetail(afsOrderID, false) + if err != nil { + return nil, err + } + orderAfsInfo = &partner.OrderAfsInfo{} - var afsTotalShopMoney int64 - if list, err := api.MtwmAPI.GetOrderRefundDetail(utils.Str2Int64(vendorOrderID), 0); err == nil { - for _, v := range list { - if v.RefundPartialEstimateCharge.SettleAmount != "" { - afsTotalShopMoney += jxutils.StandardPrice2Int(utils.Str2Float64(v.RefundPartialEstimateCharge.SettleAmount)) - } - } - } - if order, err := partner.CurOrderManager.LoadOrder(vendorOrderID, model.VendorIDMTWM); err == nil { - orderAfsInfo.AfsTotalShopMoney = order.TotalShopMoney + afsTotalShopMoney - } + orderAfsInfo.VendorOrderID = order.VendorOrderID + orderAfsInfo.AfsOrderID = afsOrderID + orderAfsInfo.AfsTotalShopMoney = order.TotalShopMoney - list.Data.ProcessInfo.AfterSaleInfo.RealRefundAmount return orderAfsInfo, err } diff --git a/business/partner/purchase/tiktok_store/store.go b/business/partner/purchase/tiktok_store/store.go index 2bbdfdf74..30231139f 100644 --- a/business/partner/purchase/tiktok_store/store.go +++ b/business/partner/purchase/tiktok_store/store.go @@ -191,7 +191,6 @@ func (P *PurchaseHandler) CreateStore2(db *dao.DaoDB, storeID int, userName stri } } } - globals.SugarLogger.Debug("CreateStore2 return storeIDs, storeDetail.Store.ID==========", storeIDs, storeDetail.Store.ID) FreightTemplate.StoreID = storeDetail.Store.ID FreightTemplate.VendorStoreID = storeIDs FreightTemplate.DeletedAt = utils.DefaultTimeValue @@ -261,8 +260,6 @@ func (P *PurchaseHandler) UpdateStore(db *dao.DaoDB, storeID int, userName strin } //修改店铺状态 if storeInfo.SyncStatus&(model.SyncFlagNewMask|model.SyncFlagStoreStatus) != 0 { - globals.SugarLogger.Debug("================1", 1) - globals.SugarLogger.Debug("================mergedStoreStatus", mergedStoreStatus) errList.AddErr(P.UpdateStoreStatus(jxcontext.AdminCtx, storeInfo.VendorOrgCode, storeID, storeInfo.VendorStoreID, mergedStoreStatus)) } _, err3 := api.EditStore(params) diff --git a/business/partner/purchase/tiktok_store/store_sku2.go b/business/partner/purchase/tiktok_store/store_sku2.go index b14aeb1ce..bb42e2dca 100644 --- a/business/partner/purchase/tiktok_store/store_sku2.go +++ b/business/partner/purchase/tiktok_store/store_sku2.go @@ -249,8 +249,6 @@ func (p *PurchaseHandler) CreateStoreSkus(ctx *jxcontext.Context, storeID int, v // p.createOrUpdateStoreSkus(ctx, storeID, vendorStoreID, duplicateStoreSkuList(storeSkuList, i+1), true) // } //} - globals.SugarLogger.Debugf("============CreateStoreSkus===============%s", utils.Format4Output(failedList, false)) - globals.SugarLogger.Debugf("============CreateStoreSkus===============%s", err) return failedList, err } @@ -317,13 +315,10 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI param.SpecPrices = GetSpecPrices(param.Specs, vendorStoreID, 0, storeSku) // ProductFormatNew 获取商品属性 productFormatNew, err := GetProductFormatNew(param.CategoryLeafId, storeDetail.VendorOrgCode) - globals.SugarLogger.Debug("创建=============productFormatNew", productFormatNew) - globals.SugarLogger.Debug("创建=============productFormatNew err", err) if err != nil { return nil, err } param.ProductFormatNew = productFormatNew - globals.SugarLogger.Debug("创建=============param", utils.Format4Output(param, false)) // 获取品牌 param.StandardBrandId, err = api.GetSkuBrand(param.CategoryLeafId) @@ -428,13 +423,10 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI param.SpecPrices = GetSpecPrices(param.Specs, vendorStoreID, utils.Str2Int64(storeSku.VendorSkuID), storeSku) // ProductFormatNew 获取商品属性 productFormatNew, err := GetProductFormatNew(param.CategoryLeafId, storeDetail.VendorOrgCode) - globals.SugarLogger.Debug("更新=============productFormatNew", productFormatNew) - globals.SugarLogger.Debug("更新=============productFormatNew err", err) if err != nil { return nil, err } param.ProductFormatNew = productFormatNew - globals.SugarLogger.Debug("更新=============param", utils.Format4Output(param, false)) // 获取品牌 //brandID, err := api.GetSkuBrand(param.CategoryLeafId) @@ -485,7 +477,6 @@ func (p *PurchaseHandler) createOrUpdateStoreSkus(ctx *jxcontext.Context, storeI func CreateSaleTemp(storeId int64, api *tiktokShop.API) (int64, error) { // 获取限售模板 saleLimitId, _ := api.StoreQuerySaleLimitTemp(storeId) - globals.SugarLogger.Debug("==========saleLimitId1", saleLimitId) if saleLimitId != 0 { return saleLimitId, nil } @@ -510,8 +501,6 @@ func CreateSaleTemp(storeId int64, api *tiktokShop.API) (int64, error) { } tradeLimitRuleRequestList = append(tradeLimitRuleRequestList, tradeLimitRuleRequest) result, err := api.CreateTradeLimitTemplate(param) - globals.SugarLogger.Debug("==========err2222", err) - globals.SugarLogger.Debug("==========result222", utils.Format4Output(result, false)) if err != nil { return 0, err } diff --git a/business/partner/purchase/tiktok_store/store_sku2_utils.go b/business/partner/purchase/tiktok_store/store_sku2_utils.go index 079bc4fa5..a926ec98c 100644 --- a/business/partner/purchase/tiktok_store/store_sku2_utils.go +++ b/business/partner/purchase/tiktok_store/store_sku2_utils.go @@ -10,7 +10,6 @@ import ( "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/model" "git.rosy.net.cn/jx-callback/business/model/dao" - "git.rosy.net.cn/jx-callback/globals" "math/rand" "strings" ) @@ -55,7 +54,6 @@ func GetDeliveryTemp(api *tiktokShop.API, vendorStoreID string, storeDetail *dao // GetProductFormatNew 获取物品属性 func GetProductFormatNew(categoryLeftId int64, vendorOrgCode string) (string, error) { category, err := getAPI(vendorOrgCode, 0, "").GetCatePropertyV2(categoryLeftId) - globals.SugarLogger.Debug("========productFormatNewDATA==============", utils.Format4Output(category, false)) if err != nil { return "", err } @@ -84,7 +82,6 @@ func GetProductFormatNew(categoryLeftId int64, vendorOrgCode string) (string, er if err != nil { return "", err } - globals.SugarLogger.Debug("========productFormatNew==============", string(productFormatNew)) return string(productFormatNew), nil } diff --git a/controllers/aliapi_callback.go b/controllers/aliapi_callback.go index 6e8cfb924..3bc599054 100644 --- a/controllers/aliapi_callback.go +++ b/controllers/aliapi_callback.go @@ -4,7 +4,6 @@ import ( "encoding/json" "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/jxstore/secretNumber" - "git.rosy.net.cn/jx-callback/globals" "github.com/astaxie/beego/server/web" "io/ioutil" ) @@ -26,7 +25,6 @@ func (c *AliApiController) SecretNumberMsg() { var res *secretNumber.SecretNumberMsgRes for k, _ := range mapData { if err := json.Unmarshal([]byte(k), &res); err == nil { - globals.SugarLogger.Debugf("SecretNumberMsg msg: %v", utils.Format4Output(res, true)) secretNumber.CallbackBrandBill(res) } } diff --git a/controllers/auth2.go b/controllers/auth2.go index dcf855b97..69a6a79f9 100644 --- a/controllers/auth2.go +++ b/controllers/auth2.go @@ -116,7 +116,6 @@ func (c *Auth2Controller) TiktokDecrypt() { // @router /Login [post] func (c *Auth2Controller) Login() { c.callLogin(func(params *tAuth2LoginParams) (retVal interface{}, errCode string, err error) { - globals.SugarLogger.Debug("params.AuthType==============", params.AuthType) if params.AuthType == auth2.AuthTypeMobile { params.AuthIDType = auth2.UserIDMobile } else if params.AuthType == auth2.AuthTypeEmail { @@ -136,7 +135,6 @@ func (c *Auth2Controller) Login() { ctx := auth2.NewContext(c.Ctx.ResponseWriter, c.Ctx.Request) globals.SugarLogger.Debug("params.AuthType, params.AuthID, params.AuthIDType, params.AuthSecret==============", params.AuthType, params.AuthID, params.AuthIDType, params.AuthSecret) authInfo, err := auth2.Login(ctx, params.AuthType, params.AuthID, params.AuthIDType, params.AuthSecret) - globals.SugarLogger.Debug("authInfo==============", authInfo) // TODO 兼容没有取到authid2的错误 if err == nil && authInfo.AuthBindInfo != nil { if authInfo.AuthBindInfo.AuthID2 == "" { @@ -348,7 +346,6 @@ func (c *Auth2Controller) AddAuthBindWithMobile() { if err != nil { return retVal, "", err } - globals.SugarLogger.Debug("打印newAuthInfo==============", newAuthInfo) err = auth2.AddAuthBindWithMobile(newAuthInfo, params.Mobile) return retVal, "", err }) diff --git a/controllers/dingding_api.go b/controllers/dingding_api.go index 29581f86a..3e4e9e0cf 100644 --- a/controllers/dingding_api.go +++ b/controllers/dingding_api.go @@ -9,8 +9,6 @@ import ( "git.rosy.net.cn/jx-callback/business/model/dao" "time" - "git.rosy.net.cn/jx-callback/globals" - "git.rosy.net.cn/jx-callback/globals/api" "github.com/astaxie/beego/server/web" ) @@ -54,7 +52,6 @@ func (c *DDAPIController) Sign() { str := "jsapi_ticket=" + ddapi.Ticket + "&noncestr=" + params.NonceStr + "×tamp=" + params.TimeStamp + "&url=" + params.Url retVal = fmt.Sprintf("%x", sha1.Sum([]byte(str))) - globals.SugarLogger.Debugf("dingapi str:%s sign:%v", str, retVal) } return retVal, "", err }) diff --git a/controllers/enterprise_callback.go b/controllers/enterprise_callback.go index 19f383575..f0f8f06c3 100644 --- a/controllers/enterprise_callback.go +++ b/controllers/enterprise_callback.go @@ -20,7 +20,6 @@ type EnterpriseController struct { // 消息结构体将使用创建应用时的EncodingAESKey进行加密(特别注意, 在第三方回调事件中使用加解密算法,receiveid的内容为suiteid) // ,请参考接收消息解析数据包。 func (e *EnterpriseController) EnterpriseCallback() { - globals.SugarLogger.Debug("==============企业微信通知回调") r := e.Ctx.Request switch e.Ctx.Request.Method { case http.MethodPost: diff --git a/controllers/jds_callback.go b/controllers/jds_callback.go index 8d65e9138..69384d241 100644 --- a/controllers/jds_callback.go +++ b/controllers/jds_callback.go @@ -7,8 +7,6 @@ import ( "git.rosy.net.cn/jx-callback/business/partner/purchase/jdshop" - "git.rosy.net.cn/baseapi/utils" - "git.rosy.net.cn/jx-callback/globals" "git.rosy.net.cn/jx-callback/globals/api" "github.com/astaxie/beego/server/web" ) @@ -25,7 +23,6 @@ func (c *JdsController) Msg() { if err == nil { jdshop.OnCallbackMsg(call) } - globals.SugarLogger.Debugf("jds callback callbackResponse:%s", utils.Format4Output(call, true)) c.Data["json"] = call c.ServeJSON() } else { diff --git a/controllers/mtwm_callback.go b/controllers/mtwm_callback.go index 25233beaa..c498901aa 100644 --- a/controllers/mtwm_callback.go +++ b/controllers/mtwm_callback.go @@ -2,9 +2,7 @@ package controllers import ( "git.rosy.net.cn/baseapi/platformapi/mtwmapi" - "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/partner/purchase/mtwm" - "git.rosy.net.cn/jx-callback/globals" "git.rosy.net.cn/jx-callback/globals/api" "github.com/astaxie/beego/server/web" ) @@ -16,7 +14,6 @@ type MtwmController struct { func (c *MtwmController) onCallbackMsg(msgType string) { c.Data["json"] = mtwmapi.Err2CallbackResponse(nil, "") msg, callbackResponse := api.MtwmAPI.GetCallbackMsg(c.Ctx.Request) - globals.SugarLogger.Debug(utils.Format4Output(msg, true)) if callbackResponse == nil { callbackResponse = mtwm.OnCallbackMsg(msg) if callbackResponse == nil { diff --git a/controllers/tonglian_callback.go b/controllers/tonglian_callback.go index e19c3ae56..7560522ef 100644 --- a/controllers/tonglian_callback.go +++ b/controllers/tonglian_callback.go @@ -7,10 +7,7 @@ import ( "git.rosy.net.cn/jx-callback/globals/api" - "git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/jx-callback/business/partner/purchase/jx/localjx" - "git.rosy.net.cn/jx-callback/globals" - "github.com/astaxie/beego/server/web" "github.com/astaxie/beego/server/web/context" ) @@ -22,7 +19,6 @@ type TongLianController struct { func (c *TongLianController) Msg() { if c.Ctx.Input.Method() == http.MethodPost { call, err := api.TLpayAPI.GetCallbackMsg(getUsefulRequest2(c.Ctx)) - globals.SugarLogger.Debugf("tonglianapi callback callbackResponse:%s", utils.Format4Output(call, true)) if err == nil { err = localjx.OnTLPayCallback(call) } diff --git a/controllers/weimob_callback.go b/controllers/weimob_callback.go index 4c9e3707e..eca37f122 100644 --- a/controllers/weimob_callback.go +++ b/controllers/weimob_callback.go @@ -31,7 +31,6 @@ func (c *WeimobController) onCallbackMsg() { } func (c *WeimobController) Code() { - globals.SugarLogger.Debugf("WeimobController code, code:%s, state:%s", c.GetString("code"), c.GetString("state")) state := c.GetString("state") if state == globals.WeimobStateSecret { // 防止有人故意搞坏,添加一个secret code := c.GetString("code") diff --git a/globals/api/apimanager/apimanager.go b/globals/api/apimanager/apimanager.go index c8f55a3da..5dc50a26a 100644 --- a/globals/api/apimanager/apimanager.go +++ b/globals/api/apimanager/apimanager.go @@ -3,7 +3,6 @@ package apimanager import ( "git.rosy.net.cn/baseapi/platformapi/jdapi" "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/jxcontext" "git.rosy.net.cn/jx-callback/business/model" @@ -31,7 +30,6 @@ var ( ) func init() { - globals.SugarLogger.Debug("init apimanager") CurAPIManager = &APIManager{} partner.InitAPIManager(CurAPIManager) } @@ -46,6 +44,9 @@ func (a *APIManager) GetAPI(vendorID int, appOrgCode string) (pfAPI interface{}) pfAPI = api.FakeJdAPI } else { codes, _ := dao.GetVendorOrgCode(db, vendorID, appOrgCode, "platform") + if len(codes) == 0 { + return nil + } code := codes[0] api.JdAPI = jdapi.New(code.Token, code.AppKey, code.AppSecret) pfAPI = api.JdAPI @@ -69,8 +70,10 @@ func (a *APIManager) GetAPI(vendorID int, appOrgCode string) (pfAPI interface{}) pfAPI = api.TiktokApi case model.VendorIDDD: codes, _ := dao.GetVendorOrgCode(db, vendorID, appOrgCode, "platform") + if len(codes) == 0 { + return nil + } pfAPI = tiktok_api.New(beego.AppConfig.DefaultString("tiktokShopAppId", ""), beego.AppConfig.DefaultString("tiktokShopAppSecret", ""), codes[0].Token) - globals.SugarLogger.Debugf("pfAPI ================%v", utils.Format4Output(pfAPI, true)) } return pfAPI } diff --git a/globals/testinit1/testinit1.go b/globals/testinit1/testinit1.go index 823dd07fc..7ee7acced 100644 --- a/globals/testinit1/testinit1.go +++ b/globals/testinit1/testinit1.go @@ -14,7 +14,6 @@ func Init() { apppath, _ := filepath.Abs(filepath.Dir(filepath.Join(file, ".."+string(filepath.Separator)+".."+string(filepath.Separator)))) beego.TestBeegoInit(apppath) - globals.SugarLogger.Infof("testinit RunMode=%s", beego.BConfig.RunMode) beego.BConfig.RunMode = "dev" // InitBeegoBeforeTest会将runmode设置为test globals.Init() diff --git a/main.go b/main.go index 56ccef697..6f3c4263d 100644 --- a/main.go +++ b/main.go @@ -146,10 +146,7 @@ func main() { globals.SugarLogger.Errorf("RefreshWeixin3Token failed with error:%s", err) return } - // if err := tasks.RefreshWeimobToken(); err != nil { - // globals.SugarLogger.Errorf("RefreshWeimobToken failed with error:%s", err) - // return - // } + if err := tasks.RefreshYilianyunToken(); err != nil { globals.SugarLogger.Errorf("RefreshYilianyunToken failed with error:%s", err) return @@ -164,10 +161,6 @@ func main() { return } } - //if err := tasks.RefreshTiktokToken(); err != nil { - // globals.SugarLogger.Errorf("RefreshTiktokToken failed with error:%s", err) - // return - //} if err := tasks.RefreshQywxToken(); err != nil { globals.SugarLogger.Errorf("RefreshQywxToken failed with error:%s", err) return