From a09bcb37f88bcfdb7ce9ba5bab65fbcb6eff1282 Mon Sep 17 00:00:00 2001 From: yangyakun Date: Mon, 24 Mar 2025 14:27:43 +0800 Subject: [PATCH 1/3] =?UTF-8?q?[6.10.0]=20[fea]=20[=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=8E=A5=E5=8F=A3=20=E5=8E=BB=E6=8E=892min?= =?UTF-8?q?=E4=B8=80=E6=AC=A1=E8=BD=AE=E8=AF=A2]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo/och/biz/login/LoginServiceManager.kt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/OCH/common/biz/src/main/java/com/mogo/och/biz/login/LoginServiceManager.kt b/OCH/common/biz/src/main/java/com/mogo/och/biz/login/LoginServiceManager.kt index 086f308d7d..b1169e28be 100644 --- a/OCH/common/biz/src/main/java/com/mogo/och/biz/login/LoginServiceManager.kt +++ b/OCH/common/biz/src/main/java/com/mogo/och/biz/login/LoginServiceManager.kt @@ -66,14 +66,14 @@ object LoginServiceManager : IOchLanPassengerStatusListener { if (oldValue != newValue) { OchChainLogManager.writeChainLog("登录状态变化", "${oldValue}-->${newValue}") Log.d(tag, "登录状态变化:${oldValue}-->${newValue}") - if (newValue == EnumLoginStatus.Login && AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) { - BizLoopManager.setLoopFunction( - TAGLoopStatus, - LoopInfo(60 * 2, ::queryLoginStatusByNet, immediately = false, scheduler = Schedulers.io()) - ) - } else { - BizLoopManager.removeLoopFunction(TAGLoopStatus) - } +// if (newValue == EnumLoginStatus.Login && AppIdentityModeUtils.isDriver(FunctionBuildConfig.appIdentityMode)) { +// BizLoopManager.setLoopFunction( +// TAGLoopStatus, +// LoopInfo(60 * 2, ::queryLoginStatusByNet, immediately = false, scheduler = Schedulers.io()) +// ) +// } else { +// BizLoopManager.removeLoopFunction(TAGLoopStatus) +// } LoginStatusManager.invokeLoginStatusChange(loginStatus) } } From 364b17c125c333933313729bc487c13556355f9b Mon Sep 17 00:00:00 2001 From: yangyakun Date: Thu, 27 Mar 2025 17:52:21 +0800 Subject: [PATCH 2/3] =?UTF-8?q?[6.10.0]=20[fix]=20[passwor=20=E8=8E=B7?= =?UTF-8?q?=E5=8F=96sn=E5=92=8Ctoken=20=E5=8F=AA=E6=9C=89=E6=9C=89?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E5=9C=A8=E7=94=B3=E8=AF=B7=20=E9=99=A4?= =?UTF-8?q?=E9=9D=9E=E6=88=90=E5=8A=9F=E3=80=81token=20=E5=A4=B1=E6=95=88?= =?UTF-8?q?=E9=87=8D=E8=AF=95=E5=8A=A0=E6=97=A5=E5=BF=97]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../och/common/module/network/interceptor/FRetryWithTime.kt | 1 - .../och/common/module/network/interceptor/RetryWithTime.kt | 4 +++- gradle.properties | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/OCH/common/common/src/main/java/com/mogo/och/common/module/network/interceptor/FRetryWithTime.kt b/OCH/common/common/src/main/java/com/mogo/och/common/module/network/interceptor/FRetryWithTime.kt index afb02b452f..989d7d938c 100644 --- a/OCH/common/common/src/main/java/com/mogo/och/common/module/network/interceptor/FRetryWithTime.kt +++ b/OCH/common/common/src/main/java/com/mogo/och/common/module/network/interceptor/FRetryWithTime.kt @@ -15,7 +15,6 @@ class FRetryWithTime : Function> { override fun apply(baseData: T): ObservableSource { baseData.let { if (it.code == 100046 || it.code == 100045 || it.code == 100005 || it.code == 100006 || it.code == 520003) { - MoGoAiCloudClient.getInstance().refreshToken() return Observable.error(OchCommonRetryException()) }else if(it.code == 1003){ CallerLogger.e(M_OCHCOMMON, "接口失败报错 1003:需重新查询登录状态") diff --git a/OCH/common/common/src/main/java/com/mogo/och/common/module/network/interceptor/RetryWithTime.kt b/OCH/common/common/src/main/java/com/mogo/och/common/module/network/interceptor/RetryWithTime.kt index 5c06544bc0..5bda2784a5 100644 --- a/OCH/common/common/src/main/java/com/mogo/och/common/module/network/interceptor/RetryWithTime.kt +++ b/OCH/common/common/src/main/java/com/mogo/och/common/module/network/interceptor/RetryWithTime.kt @@ -3,6 +3,7 @@ package com.mogo.och.common.module.network.interceptor import com.mogo.eagle.core.utilcode.constant.TimeConstants import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger import com.mogo.eagle.core.utilcode.util.TimeUtils +import com.mogo.och.common.module.manager.logchainanalytic.OchChainLogManager import com.mogo.och.common.module.utils.CallerLoggerUtils.flavorTag import io.reactivex.Observable import io.reactivex.ObservableSource @@ -15,12 +16,13 @@ class RetryWithTime : Function, ObservableSource> { private const val TAG = "RetryWithTime" } var current = -1 - private var timeDelys = intArrayOf(3, 1, 2) + private var timeDelys = intArrayOf(6, 2, 4) override fun apply(throwableObservable: Observable): ObservableSource? { return throwableObservable.flatMap { ++current CallerLogger.e("${flavorTag}$TAG", " 时间:${TimeUtils.getStringByNow(0, TimeConstants.SEC)}") if (it is OchCommonRetryException && current < timeDelys.size) { + OchChainLogManager.writeChainLogError("token超时","${timeDelys[current]}s后重试") Observable.timer(timeDelys[current].toLong(), TimeUnit.SECONDS) } else { Observable.error(it) diff --git a/gradle.properties b/gradle.properties index 433c0f1eb3..ba7172b786 100644 --- a/gradle.properties +++ b/gradle.properties @@ -66,7 +66,7 @@ LOGLIB_VERSION=1.10.18 # 网络请求LOGLIB_VERSION MOGO_NETWORK_VERSION=1.4.7.58 # 鉴权 -MOGO_PASSPORT_VERSION=1.4.7.58 +MOGO_PASSPORT_VERSION=1.4.7.63 # 长链接 MOGO_SOCKET_VERSION=1.4.7.58 # 数据采集 From dc6acfb8a74e326f6e948efee436cbb64d8287ff Mon Sep 17 00:00:00 2001 From: yangyakun Date: Thu, 27 Mar 2025 18:09:59 +0800 Subject: [PATCH 3/3] =?UTF-8?q?[6.10.0]=20[fix]=20[debug=20=E6=B5=8B?= =?UTF-8?q?=E8=AF=952s=20=E4=B8=80=E6=AC=A1=E5=88=B7token]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo/och/biz/login/ui/debugview/BusinessView.kt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/OCH/common/biz/src/main/java/com/mogo/och/biz/login/ui/debugview/BusinessView.kt b/OCH/common/biz/src/main/java/com/mogo/och/biz/login/ui/debugview/BusinessView.kt index 200feb725f..6c82015d16 100644 --- a/OCH/common/biz/src/main/java/com/mogo/och/biz/login/ui/debugview/BusinessView.kt +++ b/OCH/common/biz/src/main/java/com/mogo/och/biz/login/ui/debugview/BusinessView.kt @@ -6,6 +6,7 @@ import android.view.LayoutInflater import androidx.constraintlayout.widget.ConstraintLayout import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.findViewTreeViewModelStoreOwner +import com.mogo.cloud.passport.MoGoAiCloudClient import com.mogo.eagle.core.data.config.FunctionBuildConfig import com.mogo.eagle.core.function.hmi.ui.setting.ToggleDebugView import com.mogo.eagle.core.utilcode.kotlin.onClick @@ -15,6 +16,8 @@ import com.mogo.och.biz.R import com.mogo.och.biz.login.LoginServiceManager import com.mogo.och.biz.login.bean.LoginInfo import com.mogo.och.common.module.biz.login.EnumLoginStatus +import com.mogo.och.common.module.manager.loop.BizLoopManager +import com.mogo.och.common.module.manager.loop.LoopInfo import kotlinx.android.synthetic.main.biz_login_business_view.view.actv_business_bus import kotlinx.android.synthetic.main.biz_login_business_view.view.actv_business_charter import kotlinx.android.synthetic.main.biz_login_business_view.view.actv_business_shuttle @@ -66,7 +69,14 @@ class BusinessView : ConstraintLayout, BusinessViewModel.IErrorInfoViewCallback actv_business_taxi.onClick { swtichBusiness(Product.TAXI) } actv_business_charter.onClick { swtichBusiness(Product.CHARTER) } actv_business_sweeper.onClick { swtichBusiness(Product.SWEEPER) } - actv_debugview.onClick { ToggleDebugView.toggleDebugView.toggle(context) } + actv_debugview.onClick { + ToggleDebugView.toggleDebugView.toggle(context) + BizLoopManager.setLoopFunction(TAG, LoopInfo(2, ::calculateDistance)) + } + } + + private fun calculateDistance() { + MoGoAiCloudClient.getInstance().refreshToken() } private fun swtichBusiness(businessEnum: Product) {