wait test

This commit is contained in:
zhongchao
2022-09-15 15:31:02 +08:00
parent 19e252334a
commit 60354ae73e
5 changed files with 19 additions and 10 deletions

View File

@@ -8,6 +8,8 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_C
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_CLOUD_SHOW
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_LINK_LOG_CONNECT_STATUS
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsFuncConfigListenerManager
import com.mogo.eagle.core.utilcode.util.GsonUtils
import com.mogo.eagle.core.utilcode.util.SPUtils
import com.mogo.eagle.core.utilcode.util.UiThreadHandler
import com.zhjt.mogo_core_function_devatools.funcconfig.FuncConfigConst.Companion.FUNC_CONFIG_TYPE
import com.zhjt.mogo_core_function_devatools.funcconfig.FuncConfigConst.Companion.defaultFuncConfig
@@ -34,9 +36,12 @@ class FuncConfigCenter : IMogoOnMessageListener<FuncConfig> {
.registerOnMessageListener(FUNC_CONFIG_TYPE, this)
UiThreadHandler.postDelayed({
funcConfigNetWorkModel.requestFuncConfig({
SPUtils.getInstance("biz_config").put("config", GsonUtils.toJson(it))
refreshConfig(it)
}, {
refreshConfig(defaultFuncConfig())
val bizJson = SPUtils.getInstance("biz_config")
.getString("config", GsonUtils.toJson(defaultFuncConfig()))
refreshConfig(GsonUtils.fromJson(bizJson, FuncConfig::class.java))
})
}, 2000L)

View File

@@ -88,10 +88,11 @@ class FuncConfigConst {
foundationSubList.add(SubBiz(BIZ_AUTOPILOT_LANE_SELECTION, lock = false, state = true, dependNode = "", data = ""))
businessList.add(Business(FOUNDATION,foundationSubList))
return FuncConfig(0, AppUtils.getAppVersionCode(), getChannel(), AppUtils.getAppVersionCode(), businessList)
return FuncConfig(0, AppUtils.getAppVersionCode(), getChannelCode(), AppUtils.getAppVersionCode(), businessList)
}
private fun getChannel(): Int{
// todo 新增车型需要更新(清扫车)
fun getChannelCode(): Int{
return when{
AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)
&& AppIdentityModeUtils.isPassenger(FunctionBuildConfig.appIdentityMode) -> 1

View File

@@ -10,7 +10,7 @@ interface FuncConfigApiService {
//FuncConfig
@Headers("Content-Type:application/json;charset=UTF-8")
@POST("/test")
@POST("eagleEye-mis/config/abilityInfo")
suspend fun funcConfig(@Body map: MutableMap<String, Any>): BaseResponse<FuncConfig>
}

View File

@@ -5,8 +5,8 @@ import com.mogo.commons.debug.DebugConfig
class FuncConfigHost {
companion object{
private const val HOST_DEV = "http://dzt-test.zhidaozhixing.com/"
private const val HOST_RELEASE = "http://dzt.zhidaozhixing.com/"
private const val HOST_DEV = "https://eagle-qa.zhidaozhixing.com"
private const val HOST_RELEASE = "https://eagle.zhidaozhixing.com"
fun get(): String{
return when (DebugConfig.getNetMode()) {

View File

@@ -1,11 +1,13 @@
package com.zhjt.mogo_core_function_devatools.funcconfig.network
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
import com.mogo.commons.debug.DebugConfig
import com.mogo.eagle.core.data.BaseResponse
import com.mogo.eagle.core.data.app.AppConfigInfo
import com.mogo.eagle.core.data.config.FunctionBuildConfig
import com.mogo.eagle.core.network.MoGoRetrofitFactory
import com.mogo.eagle.core.network.request
import com.mogo.eagle.core.utilcode.mogo.AppIdentityModeUtils
import com.mogo.eagle.core.utilcode.util.DeviceUtils
import com.zhjt.mogo_core_function_devatools.funcconfig.FuncConfigConst
import com.zhjt.service_biz.FuncConfig
class FuncConfigNetWorkModel {
@@ -22,8 +24,8 @@ class FuncConfigNetWorkModel {
loader {
val map = mutableMapOf<String, Any>()
map["sn"] = MoGoAiCloudClientConfig.getInstance().sn
map["env"] = DebugConfig.getNetMode()
map["appVersionCode"] = AppConfigInfo.appVersionCode
map["mac"] = DeviceUtils.getMacAddress()
map["channelVersion"] = FuncConfigConst.getChannelCode()
getNetWorkApi().funcConfig(map)
}
onSuccess {
@@ -49,4 +51,5 @@ class FuncConfigNetWorkModel {
}
}
}