Merge dev_mogo_httpdns

there are some conflicts:
 both modified:   foudations/mogo-commons/src/main/java/com/mogo/commons/AbsMogoApplication.java
        both modified:   gradle.properties
        both modified:   modules/mogo-module-share/consumer-rules.pro
        both modified:   modules/mogo-module-share/src/main/java/com/mogo/module/share/strategyreceiver/BlockStrategy.kt
This commit is contained in:
tongchenfei
2021-01-14 14:45:53 +08:00
43 changed files with 800 additions and 703 deletions

View File

@@ -9,8 +9,11 @@ import com.mogo.commons.AbsMogoApplication;
import com.mogo.commons.network.ParamsProvider;
import com.mogo.commons.network.SubscribeImpl;
import com.mogo.commons.storage.SpStorage;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.constants.HostConst;
import com.mogo.module.service.MogoServices;
import com.mogo.module.service.ServiceConst;
import com.mogo.module.service.network.RefreshApiService;
import com.mogo.module.service.network.bean.HomeCompanyDistanceForPushData;
import com.mogo.module.service.network.bean.HomeCompanyDistanceForPushResponse;
import com.mogo.module.service.onlinecar.panel.NavigationTargetInfo;
@@ -86,7 +89,7 @@ abstract class MainLooperHandler extends Handler {
final Map< String, Object > query = new ParamsProvider.Builder( AbsMogoApplication.getApp() ).build();
query.put( "data", GsonUtil.jsonFromObject( data ) );
MogoServices.getInstance().getRefreshModel().getRefreshApiService().calculationNotHomeCompanyDistanceForPush( query )
MogoApisHandler.getInstance().getApis().getNetworkApi().create(RefreshApiService.class, HostConst.TRAVEL_CONDITION_HOST).calculationNotHomeCompanyDistanceForPush( query )
.subscribeOn( Schedulers.io() )
.observeOn( AndroidSchedulers.mainThread() )
.subscribe( new SubscribeImpl< HomeCompanyDistanceForPushResponse >( RequestOptions.create( AbsMogoApplication.getApp() ) ) {

View File

@@ -9,6 +9,8 @@ import com.mogo.commons.network.ParamsProvider;
import com.mogo.commons.network.SubscribeImpl;
import com.mogo.commons.network.Utils;
import com.mogo.map.MogoLatLng;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.constants.HostConst;
import com.mogo.module.common.entity.MarkerResponse;
import com.mogo.module.service.ServiceConst;
import com.mogo.service.MogoServicePaths;
@@ -34,37 +36,18 @@ public class RefreshModel {
private static final String TAG = "RefreshModel";
public static final String HOST_DEV = "http://dzt-test.zhidaozhixing.com";
public static final String HOST_TEST = "http://dzt-test.zhidaozhixing.com";
public static final String HOST_DEMO = "http://dzt-show.zhidaozhixing.com";
public static final String HOST_PRODUCT = "http://dzt.zhidaozhixing.com";
private final Context mContext;
private RefreshApiService mRefreshApiService;
private final RefreshApiService mRefreshApiService;
public RefreshModel( Context context ) {
this.mContext = context;
IMogoNetwork network = ( IMogoNetwork ) ARouter.getInstance().build( MogoServicePaths.PATH_SERVICES_NETWORK ).navigation( context );
this.mRefreshApiService = network.create( RefreshApiService.class, getNetHost() );
this.mRefreshApiService = MogoApisHandler.getInstance().getApis().getNetworkApi().create( RefreshApiService.class, HostConst.LAUNCHER_SNAPSHOT_HOST);
}
public RefreshApiService getRefreshApiService() {
return mRefreshApiService;
}
public static String getNetHost() {
switch ( DebugConfig.getNetMode() ) {
case DebugConfig.NET_MODE_DEV:
return HOST_DEV;
case DebugConfig.NET_MODE_QA:
return HOST_TEST;
case DebugConfig.NET_MODE_DEMO:
return HOST_DEMO;
default:
return HOST_PRODUCT;
}
}
public void refreshExplorerWayData( MogoLatLng latLng, int radius, int limit, final RefreshCallback callback ) {
if ( mRefreshApiService != null ) {
final Map< String, Object > query = new ParamsProvider.Builder( mContext ).build();

View File

@@ -9,6 +9,7 @@ import com.mogo.commons.network.ParamsProvider;
import com.mogo.commons.network.SubscribeImpl;
import com.mogo.commons.network.Utils;
import com.mogo.map.MogoLatLng;
import com.mogo.module.common.constants.HostConst;
import com.mogo.module.common.entity.MarkerResponse;
import com.mogo.module.service.ServiceConst;
import com.mogo.service.MogoServicePaths;
@@ -33,34 +34,14 @@ public class ZhidaoRefreshModel {
private static final String TAG = "RefreshModel";
public static final String HOST_DEV = "http://carlife-test.zhidaohulian.com";
public static final String HOST_TEST = "http://carlife-test.zhidaohulian.com";
public static final String HOST_DEMO = "http://carlife-test.zhidaohulian.com";
public static final String HOST_PRODUCT = "https://api.zhidaohulian.com";
private final Context mContext;
private ZhidaoApiService mRefreshApiService;
private final ZhidaoApiService mRefreshApiService;
public ZhidaoRefreshModel( Context context ) {
this.mContext = context;
IMogoNetwork network = ( IMogoNetwork ) ARouter.getInstance().build( MogoServicePaths.PATH_SERVICES_NETWORK ).navigation( context );
this.mRefreshApiService = network.create( ZhidaoApiService.class, getNetHost() );
this.mRefreshApiService = network.create( ZhidaoApiService.class, HostConst.CARLIFE_HOST);
}
public ZhidaoApiService getRefreshApiService() {
return mRefreshApiService;
}
public static String getNetHost() {
switch ( DebugConfig.getNetMode() ) {
case DebugConfig.NET_MODE_DEV:
return HOST_DEV;
case DebugConfig.NET_MODE_QA:
return HOST_TEST;
case DebugConfig.NET_MODE_DEMO:
return HOST_DEMO;
default:
return HOST_PRODUCT;
}
}
}

View File

@@ -7,6 +7,8 @@ import com.alibaba.android.arouter.launcher.ARouter;
import com.mogo.commons.debug.DebugConfig;
import com.mogo.commons.network.SubscribeImpl;
import com.mogo.commons.voice.AIAssist;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.common.constants.HostConst;
import com.mogo.module.service.network.RefreshModel;
import com.mogo.module.service.network.bean.TtsConfigEntity;
import com.mogo.service.MogoServicePaths;
@@ -29,8 +31,7 @@ public class TtsConfigModleData {
public TtsConfigModleData() {
IMogoNetwork network = (IMogoNetwork) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICES_NETWORK).navigation(getApp().getApplicationContext());
mTtsConfigApiService = network.create(TtsConfigApiService.class, RefreshModel.getNetHost());
mTtsConfigApiService = MogoApisHandler.getInstance().getApis().getNetworkApi().create(TtsConfigApiService.class, HostConst.DATA_SERVICE_HOST);
}
/**