[2.13.0] change the host const loc
This commit is contained in:
@@ -15,13 +15,13 @@ import com.mogo.cloud.passport.IMoGoTokenCallback
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClient
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig
|
||||
import com.mogo.commons.AbsMogoApplication
|
||||
import com.mogo.commons.constants.HostConst
|
||||
import com.mogo.commons.constants.SharedPrefsConstants
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.commons.device.Devices
|
||||
import com.mogo.commons.network.NetConfigUtils
|
||||
import com.mogo.commons.network.Utils
|
||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||
import com.mogo.commons.constants.HostConst
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_CLOUD_CONNECT_FAIL
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_CLOUD_CONNECT_LOST
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_ALIAS_CODE_CLOUD_CONNECT_SUCCESS
|
||||
|
||||
@@ -33,7 +33,7 @@ public class UpgradeAppNetWorkManager {
|
||||
|
||||
|
||||
private UpgradeAppNetWorkManager() {
|
||||
mUpgradeApiService = MoGoRetrofitFactory.getInstance(HostConst.Companion.getHost())
|
||||
mUpgradeApiService = MoGoRetrofitFactory.getInstance(HostConst.getHost())
|
||||
.create(UpgradeApiService.class);
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ public class BindingcarNetWorkManager {
|
||||
private static final String TAG = "BindingcarNetManager";
|
||||
|
||||
private BindingcarNetWorkManager() {
|
||||
mBindingcarApiService = MoGoRetrofitFactory.getInstance(HostConst.Companion.getHost())
|
||||
mBindingcarApiService = MoGoRetrofitFactory.getInstance(HostConst.getHost())
|
||||
.create(BindingcarApiService.class);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package com.mogo.eagle.core.function.check.net;
|
||||
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory;
|
||||
import com.mogo.commons.constants.HostConst;
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory;
|
||||
|
||||
/**
|
||||
* @author liujing
|
||||
|
||||
@@ -4,12 +4,10 @@ import com.mogo.eagle.core.data.Response
|
||||
import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
import com.mogo.eagle.core.network.apiResponseCall
|
||||
import com.mogo.eagle.core.network.request
|
||||
import com.mogo.commons.constants.HostConst
|
||||
import com.zhjt.mogo_core_function_devatools.upgrade.network.HostConst.Companion.getBaseUrl
|
||||
|
||||
class UpgradeVersionNetWorkModel {
|
||||
|
||||
private fun getNetWorkApi(baseUrl: String = HostConst.CITY_HOST): UpgradeVersionApiService {
|
||||
private fun getNetWorkApi(baseUrl: String = HostConst.getBaseUrl()): UpgradeVersionApiService {
|
||||
return MoGoRetrofitFactory.getInstanceNoCallAdapter(baseUrl)
|
||||
.create(UpgradeVersionApiService::class.java)
|
||||
}
|
||||
@@ -22,7 +20,7 @@ class UpgradeVersionNetWorkModel {
|
||||
request<Response<Any?>> {
|
||||
loader {
|
||||
apiResponseCall {
|
||||
getNetWorkApi(getBaseUrl()).getUpgradeVersion(
|
||||
getNetWorkApi().getUpgradeVersion(
|
||||
versionName
|
||||
)
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ dependencies {
|
||||
implementation rootProject.ext.dependencies.mogo_core_network
|
||||
implementation rootProject.ext.dependencies.mogo_core_function_call
|
||||
}else{
|
||||
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(':modules:mogo-module-common')
|
||||
|
||||
implementation project(':core:mogo-core-data')
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package com.zhjt.dispatch.model;
|
||||
|
||||
import static com.mogo.commons.context.ContextHolderUtil.getContext;
|
||||
import static com.mogo.commons.constants.HostConst.DATA_SERVICE_HOST;
|
||||
|
||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
||||
import com.mogo.commons.constants.HostConst;
|
||||
import com.mogo.eagle.core.data.BaseData;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotRouteInfo;
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotStatus;
|
||||
@@ -34,7 +34,7 @@ public class DispatchServiceModel {
|
||||
private final IDispatchAdasApiService mAdasApiService;
|
||||
|
||||
private DispatchServiceModel() {
|
||||
mAdasApiService = MoGoRetrofitFactory.getInstance(DATA_SERVICE_HOST).create(IDispatchAdasApiService.class);
|
||||
mAdasApiService = MoGoRetrofitFactory.getInstance(HostConst.DATA_SERVICE_HOST).create(IDispatchAdasApiService.class);
|
||||
}
|
||||
|
||||
public static DispatchServiceModel getInstance() {
|
||||
|
||||
@@ -65,6 +65,7 @@ dependencies {
|
||||
implementation project(':core:mogo-core-function-api')
|
||||
implementation project(':core:mogo-core-function-call')
|
||||
implementation project(':modules:mogo-module-common')
|
||||
implementation project(":foudations:mogo-commons")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.content.Context
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.os.Message
|
||||
import com.mogo.commons.constants.HostConst
|
||||
import com.mogo.eagle.core.data.camera.CameraEntity
|
||||
import com.mogo.eagle.core.data.camera.ReqLiveCarBean
|
||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager
|
||||
@@ -12,7 +13,6 @@ import com.mogo.eagle.core.network.MoGoRetrofitFactory
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_MONITOR
|
||||
import com.mogo.map.MogoLocationClient
|
||||
import com.mogo.commons.constants.HostConst
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
import io.reactivex.disposables.Disposable
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.mogo.commons.constants;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
|
||||
public class HostConst {
|
||||
public static final String DEVA_HOST = "http://dzt-deva.zhidaozhixing.com";
|
||||
public static final String DATA_SERVICE_HOST = "http://dzt-dataService.zhidaozhixing.com";
|
||||
public static final String REALTIME_LOCATION_HOST = "http://dzt-realtimeLocation.zhidaozhixing.com";
|
||||
public static final String GEOFENCE_HOST = "http://dzt-geoFenceCarService.zhidaozhixing.com";
|
||||
public static final String CARLIFE_HOST = "http://dzt-carlife.zhidaozhixing.com";
|
||||
public static final String STRATEGY_PUSH_HOST = "http://dzt-strategyPush.zhidaozhixing.com";
|
||||
public static final String CAMERA_STREAM_HOST = "http://dzt-smartTransportationAiCloud.zhidaozhixing.com";
|
||||
public static final String OPEN_CAMERA_STREAM_HOST = "http://10.0.16.6:18080";
|
||||
|
||||
public static final String CITY_HOST = "http://dzt-city.zhidaozhixing.com";
|
||||
public static final String SOCKET_CENTER_DOMAIN = "socketRegion";
|
||||
|
||||
// public static final String UPGRADE_APP_HOST_TEST = "http://10.0.200.12:32423?/";
|
||||
public static final String UPGRADE_APP_HOST = "http://eagle-mis.zhidaozhixing.com/";
|
||||
|
||||
public static final String CMDB_HOST = "http://eagle-mis.zhidaozhixing.com/eagleEye-mis/cmdbapi/";
|
||||
|
||||
public static final String HOST_DEV = "https://eagle-qa.zhidaozhixing.com";
|
||||
public static final String HOST_RELEASE = "https://eagle-mis.zhidaozhixing.com";
|
||||
|
||||
public static String getHost() {
|
||||
String host = HOST_RELEASE;
|
||||
switch (DebugConfig.getNetMode()) {
|
||||
case DebugConfig.NET_MODE_DEV:
|
||||
case DebugConfig.NET_MODE_QA:
|
||||
host = HOST_DEV;
|
||||
break;
|
||||
}
|
||||
return host;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package com.mogo.commons.constants
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
|
||||
/**
|
||||
* 通用接口请求host
|
||||
*/
|
||||
class HostConst {
|
||||
companion object{
|
||||
const val DEVA_HOST = "http://dzt-deva.zhidaozhixing.com"
|
||||
const val DATA_SERVICE_HOST = "http://dzt-dataService.zhidaozhixing.com"
|
||||
const val REALTIME_LOCATION_HOST = "http://dzt-realtimeLocation.zhidaozhixing.com"
|
||||
const val GEOFENCE_HOST = "http://dzt-geoFenceCarService.zhidaozhixing.com"
|
||||
const val STRATEGY_PUSH_HOST = "http://dzt-strategyPush.zhidaozhixing.com"
|
||||
const val CAMERA_STREAM_HOST = "http://dzt-smartTransportationAiCloud.zhidaozhixing.com"
|
||||
const val OPEN_CAMERA_STREAM_HOST = "http://10.0.16.6:18080"
|
||||
const val CITY_HOST = "http://dzt-city.zhidaozhixing.com"
|
||||
const val SOCKET_CENTER_DOMAIN = "socketRegion"
|
||||
|
||||
// public static final String UPGRADE_APP_HOST_TEST = "http://10.0.200.12:32423?/";
|
||||
const val CMDB_HOST = "http://eagle-mis.zhidaozhixing.com/eagleEye-mis/cmdbapi/"
|
||||
|
||||
private const val HOST_DEV = "https://eagle-qa.zhidaozhixing.com"
|
||||
private const val HOST_RELEASE = "https://eagle-mis.zhidaozhixing.com"
|
||||
|
||||
fun getHost():String{
|
||||
return when (DebugConfig.getNetMode()) {
|
||||
DebugConfig.NET_MODE_DEV -> HOST_DEV
|
||||
DebugConfig.NET_MODE_QA -> HOST_DEV
|
||||
DebugConfig.NET_MODE_DEMO -> HOST_RELEASE
|
||||
DebugConfig.NET_MODE_RELEASE -> HOST_RELEASE
|
||||
else -> HOST_RELEASE
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user