修改请求参数
This commit is contained in:
@@ -58,7 +58,7 @@ public class UpgradeAppNetWorkManager {
|
||||
/**
|
||||
* 获取app升级信息
|
||||
*/
|
||||
public void getAppUpgradeInfo(Context context, String screenType) {
|
||||
public void getAppUpgradeInfo(Context context, String screenType, String carType) {
|
||||
// String sn = "X20202203105S688HZ";
|
||||
// int versionCode = 2070000;
|
||||
// String versionName = "2.7.0";
|
||||
@@ -67,7 +67,7 @@ public class UpgradeAppNetWorkManager {
|
||||
int versionCode = AppUtils.getAppVersionCode();
|
||||
String versionName = AppUtils.getAppVersionName();
|
||||
|
||||
UpgradeAppRequest request = new UpgradeAppRequest(sn, versionCode, versionName, screenType);
|
||||
UpgradeAppRequest request = new UpgradeAppRequest(sn, versionCode, versionName, screenType, carType);
|
||||
RequestBody requestBody = RequestBody.create(MediaType.get("application/json;charset=UTF-8"), GsonUtil.jsonFromObject(request));
|
||||
mUpgradeApiService.getUpgradeInfo("apps_control", requestBody)
|
||||
.subscribeOn(Schedulers.io())
|
||||
|
||||
@@ -6,27 +6,20 @@ package com.mogo.eagle.core.function.appupgrade.network;
|
||||
* @since: 11/15/21
|
||||
*/
|
||||
public class UpgradeAppRequest {
|
||||
// private String resources;
|
||||
private String sn;
|
||||
private int version_code;
|
||||
private String version_name;
|
||||
private String screen_type;
|
||||
private String car_type;
|
||||
|
||||
public UpgradeAppRequest(/*String resources,*/ String sn, int versionCode, String versionName, String type) {
|
||||
public UpgradeAppRequest( String sn, int versionCode, String versionName, String type, String carType) {
|
||||
this.sn = sn;
|
||||
this.version_code = versionCode;
|
||||
this.version_name = versionName;
|
||||
this.screen_type = type;
|
||||
this.car_type = carType;
|
||||
}
|
||||
|
||||
// public String getResources() {
|
||||
// return resources;
|
||||
// }
|
||||
//
|
||||
// public void setResources(String resources) {
|
||||
// this.resources = resources;
|
||||
// }
|
||||
|
||||
public String getSn() {
|
||||
return sn;
|
||||
}
|
||||
@@ -59,13 +52,22 @@ public class UpgradeAppRequest {
|
||||
this.screen_type = screen_type;
|
||||
}
|
||||
|
||||
public String getCar_type() {
|
||||
return car_type;
|
||||
}
|
||||
|
||||
public void setCar_type(String car_type) {
|
||||
this.car_type = car_type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "UpgradeAppRequest{" +
|
||||
"sn='" + sn + '\'' +
|
||||
", version_code=" + version_code +
|
||||
", version_name='" + version_name + '\'' +
|
||||
", screen_type=" + screen_type +
|
||||
", screen_type='" + screen_type + '\'' +
|
||||
", car_type='" + car_type + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,12 +128,26 @@ public class BindingcarProvider implements IMoGoBindingcarProvider {
|
||||
return screenType;
|
||||
}
|
||||
|
||||
private int getCarType() {
|
||||
int carType = -1;
|
||||
if(AppIdentityModeUtils.isBus(FunctionBuildConfig.appIdentityMode)) {
|
||||
carType = 1; //bus
|
||||
}
|
||||
|
||||
if(AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)) {
|
||||
carType = 2; //taxi
|
||||
}
|
||||
|
||||
return carType;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询app是否需要升级
|
||||
*/
|
||||
@Override
|
||||
public void queryAppUpgrade() {
|
||||
UpgradeAppNetWorkManager.getInstance().getAppUpgradeInfo(mContext, String.valueOf(getScreenType()));
|
||||
UpgradeAppNetWorkManager.getInstance().getAppUpgradeInfo(mContext, String.valueOf(getScreenType()), String.valueOf(getCarType()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ public class AppInfo implements Serializable {
|
||||
private int version_code;
|
||||
private String version_name;
|
||||
private String create_time;
|
||||
private String car_type;
|
||||
|
||||
public IdInfo get_id() {
|
||||
return _id;
|
||||
@@ -117,21 +118,30 @@ public class AppInfo implements Serializable {
|
||||
this.create_time = create_time;
|
||||
}
|
||||
|
||||
public String getCar_type() {
|
||||
return car_type;
|
||||
}
|
||||
|
||||
public void setCar_type(String car_type) {
|
||||
this.car_type = car_type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AppInfo{" +
|
||||
"_id=" + _id +
|
||||
", bk_inst_id='" + bk_inst_id + '\'' +
|
||||
", bk_inst_id=" + bk_inst_id +
|
||||
", bk_inst_name='" + bk_inst_name + '\'' +
|
||||
", bk_supplier_account='" + bk_supplier_account + '\'' +
|
||||
", screen_type=" + screen_type +
|
||||
", screen_type='" + screen_type + '\'' +
|
||||
", sn='" + sn + '\'' +
|
||||
", last_time=" + last_time +
|
||||
", last_time='" + last_time + '\'' +
|
||||
", app_url='" + app_url + '\'' +
|
||||
", bk_obj_id='" + bk_obj_id + '\'' +
|
||||
", version_code=" + version_code +
|
||||
", version_name='" + version_name + '\'' +
|
||||
", create_time=" + create_time +
|
||||
", create_time='" + create_time + '\'' +
|
||||
", car_type='" + car_type + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,6 +93,7 @@ applicationName=IntelligentPilot
|
||||
versionCode=2080000
|
||||
versionName=2.8.0
|
||||
|
||||
|
||||
################# 新架构模块Maven版本管理 #################
|
||||
MOGO_CORE_FUNCTION_AUTOPILOT_VERSION=0.0.58.10
|
||||
MOGO_CORE_FUNCTION_CHECK_VERSION=0.0.58.10
|
||||
|
||||
Reference in New Issue
Block a user