From 470d64a6fc147702431ab8aea1c61cd1c96f0a75 Mon Sep 17 00:00:00 2001 From: wujifei Date: Fri, 22 Jan 2021 16:36:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=BF=94=E5=9B=9E=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E5=9F=BA=E6=9C=AC=E6=95=B0=E6=8D=AE=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mogo/cloud/network/ApiService.java | 6 +- .../java/com/mogo/cloud/network/BaseData.java | 12 - .../mogo/cloud/network/NetworkActivity.java | 36 +- .../mogo/cloud/network/V2XRoadDataRes.java | 820 +++++++++--------- .../mogo/cloud/network/V2XSeekHelpRes.java | 42 +- .../mogo/cloud/commons/network/BaseData.kt | 12 + 6 files changed, 444 insertions(+), 484 deletions(-) delete mode 100644 app/src/main/java/com/mogo/cloud/network/BaseData.java create mode 100644 foudations/mogo-commons/src/main/java/com/mogo/cloud/commons/network/BaseData.kt diff --git a/app/src/main/java/com/mogo/cloud/network/ApiService.java b/app/src/main/java/com/mogo/cloud/network/ApiService.java index 0f35dca..991aa02 100644 --- a/app/src/main/java/com/mogo/cloud/network/ApiService.java +++ b/app/src/main/java/com/mogo/cloud/network/ApiService.java @@ -1,5 +1,7 @@ package com.mogo.cloud.network; +import com.mogo.cloud.commons.network.BaseData; + import java.util.Map; import io.reactivex.Observable; @@ -19,7 +21,7 @@ public interface ApiService { * 基于目的地预判的道路事件和违章高发情况的停车推荐 */ @GET("/yycp-geo-fence-carService/car/road/getRoadDataOfVehiclesRecommend") - Observable queryRoadDataOfVehiclesRecommend(@QueryMap Map parameters); + Observable> queryRoadDataOfVehiclesRecommend(@QueryMap Map parameters); /** * 车辆故障求助查询 @@ -29,5 +31,5 @@ public interface ApiService { */ @FormUrlEncoded @POST("/yycp-realtimeLocations/vehicleTypeManage/car/queryVehicleType/v1") - Observable queryHelpSignal(@FieldMap Map param); + Observable> queryHelpSignal(@FieldMap Map param); } diff --git a/app/src/main/java/com/mogo/cloud/network/BaseData.java b/app/src/main/java/com/mogo/cloud/network/BaseData.java deleted file mode 100644 index ef14fd4..0000000 --- a/app/src/main/java/com/mogo/cloud/network/BaseData.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.mogo.cloud.network; - -import java.io.Serializable; - -/** - * Created by congtaowang on 2019/1/7. - */ -public class BaseData implements Serializable, Cloneable { - - public int code = -1; - public String msg; -} diff --git a/app/src/main/java/com/mogo/cloud/network/NetworkActivity.java b/app/src/main/java/com/mogo/cloud/network/NetworkActivity.java index 0393a6c..20dcc6f 100644 --- a/app/src/main/java/com/mogo/cloud/network/NetworkActivity.java +++ b/app/src/main/java/com/mogo/cloud/network/NetworkActivity.java @@ -10,6 +10,7 @@ import androidx.appcompat.app.AppCompatActivity; import com.google.gson.Gson; import com.mogo.cloud.R; +import com.mogo.cloud.commons.network.BaseData; import com.mogo.cloud.commons.network.RetrofitFactory; import com.mogo.cloud.tanlu.UploadManager; import com.mogo.cloud.tanlu.api.ITanluUploadCallback; @@ -19,6 +20,7 @@ import com.mogo.cloud.tanlu.bean.UploadResult; import java.util.HashMap; import java.util.Map; +import java.util.concurrent.atomic.AtomicInteger; import io.reactivex.Observer; import io.reactivex.android.schedulers.AndroidSchedulers; @@ -48,27 +50,17 @@ public class NetworkActivity extends AppCompatActivity { @Override public void onClick(View view) { tvResult.setText("结果显示"); - // queryRoadData("ZD802C1938L10797"); + queryRoadData("ZD802C1938L10797"); // queryHelpSignal("ZD802C1938L10797"); - - UploadManager.getInstance(NetworkActivity.this).loadUpload(new InformationBody(), new ITanluUploadCallback() { - @Override - public void onSuccess(UploadResult result) { - Log.d("liyz", "result.id = " + result.id); - } - - @Override - public void onFailure(int code) { - Log.d("liyz", " code = " + code); - } - - @Override - public void onError(Throwable e) { - Log.d("liyz", "onError e = " + e); - } - }); } }); + + AtomicInteger atomicInteger = new AtomicInteger(); + atomicInteger.addAndGet(10); + atomicInteger.getAndIncrement(); + atomicInteger.incrementAndGet(); + + } @@ -79,14 +71,14 @@ public class NetworkActivity extends AppCompatActivity { apiService.queryRoadDataOfVehiclesRecommend(map) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(new Observer() { + .subscribe(new Observer>() { @Override public void onSubscribe(Disposable d) { } @Override - public void onNext(V2XRoadDataRes value) { + public void onNext(BaseData value) { tvResult.setText(new Gson().toJson(value)); System.out.println(new Gson().toJson(value)); } @@ -112,14 +104,14 @@ public class NetworkActivity extends AppCompatActivity { apiService.queryHelpSignal(map) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) - .subscribe(new Observer() { + .subscribe(new Observer>() { @Override public void onSubscribe(Disposable d) { } @Override - public void onNext(V2XSeekHelpRes value) { + public void onNext(BaseData value) { tvResult.setText(new Gson().toJson(value)); System.out.println(new Gson().toJson(value)); } diff --git a/app/src/main/java/com/mogo/cloud/network/V2XRoadDataRes.java b/app/src/main/java/com/mogo/cloud/network/V2XRoadDataRes.java index 1f9ea39..e0f0a62 100644 --- a/app/src/main/java/com/mogo/cloud/network/V2XRoadDataRes.java +++ b/app/src/main/java/com/mogo/cloud/network/V2XRoadDataRes.java @@ -1,6 +1,7 @@ package com.mogo.cloud.network; +import com.mogo.cloud.commons.network.BaseData; import java.util.List; @@ -8,528 +9,509 @@ import java.util.List; * created by wujifei on 2020/12/24 11:05 * describe:于目的地预判的道路事件和违章高发情况的停车推荐 返回数据 */ -public class V2XRoadDataRes extends BaseData { - private String detailMsg; - private ResultDTO result; - public String getDetailMsg() { - return detailMsg; +public class V2XRoadDataRes { + private String formatAddress; + private List fromPoint; + private List topPoint; + private List poiData; + private List illegalParkingData; + + public String getFormatAddress() { + return formatAddress; } - public void setDetailMsg(String detailMsg) { - this.detailMsg = detailMsg; + public void setFormatAddress(String formatAddress) { + this.formatAddress = formatAddress; } - public ResultDTO getResult() { - return result; + public List getFromPoint() { + return fromPoint; } - public void setResult(ResultDTO result) { - this.result = result; + public void setFromPoint(List fromPoint) { + this.fromPoint = fromPoint; } - public static class ResultDTO { - private String formatAddress; - private List fromPoint; - private List topPoint; - private List poiData; - private List illegalParkingData; + public List getTopPoint() { + return topPoint; + } - public String getFormatAddress() { - return formatAddress; + public void setTopPoint(List topPoint) { + this.topPoint = topPoint; + } + + public List getPoiData() { + return poiData; + } + + public void setPoiData(List poiData) { + this.poiData = poiData; + } + + public List getIllegalParkingData() { + return illegalParkingData; + } + + public void setIllegalParkingData(List illegalParkingData) { + this.illegalParkingData = illegalParkingData; + } + + public static class PoiDataDTO { + /** + * generateTime : 1607061691000 + * type : 0 + * lat : 39.988346 + * lon : 116.410857 + * direction : 333 + * items : [{"url":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1603181678357.png?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1607393278%3B1607400478%26q-key-time%3D1607393278%3B1607400478%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D78c0f738f4dae37e67c235561c78120b86433a04"}] + * cityName : + * distance : 21447 + * nickName : 独狼 + * headImgUrl : https://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/defaultUserHeadImg/VN000015.jpg + * sn : + * userId : 0 + * trafficInfoType : 0 + * infoId : 784423898000445440 + * poiType : 10015 + * uploadType : 2 + * likeNum : 3 + * systemLikeNum : 3 + * fabulous : false + */ + + + private long generateTime; + + private int type; + private double lat; + private double lon; + + private int direction; + private String cityName; + + private int distance; + private String nickName; + + private String headImgUrl; + + private String sn; + + private long userId; + + private String trafficInfoType; + + private String infoId; + + private String poiType; + + private String uploadType; + + private int likeNum; + + private int systemLikeNum; + + private boolean fabulous; + + private List items; + + public long getGenerateTime() { + return generateTime; } - public void setFormatAddress(String formatAddress) { - this.formatAddress = formatAddress; + public void setGenerateTime(long generateTime) { + this.generateTime = generateTime; } - public List getFromPoint() { - return fromPoint; + public int getType() { + return type; } - public void setFromPoint(List fromPoint) { - this.fromPoint = fromPoint; + public void setType(int type) { + this.type = type; } - public List getTopPoint() { - return topPoint; + public double getLat() { + return lat; } - public void setTopPoint(List topPoint) { - this.topPoint = topPoint; + public void setLat(double lat) { + this.lat = lat; } - public List getPoiData() { - return poiData; + public double getLon() { + return lon; } - public void setPoiData(List poiData) { - this.poiData = poiData; + public void setLon(double lon) { + this.lon = lon; } - public List getIllegalParkingData() { - return illegalParkingData; + public int getDirection() { + return direction; } - public void setIllegalParkingData(List illegalParkingData) { - this.illegalParkingData = illegalParkingData; + public void setDirection(int direction) { + this.direction = direction; } - public static class PoiDataDTO { + public String getCityName() { + return cityName; + } + + public void setCityName(String cityName) { + this.cityName = cityName; + } + + public int getDistance() { + return distance; + } + + public void setDistance(int distance) { + this.distance = distance; + } + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName; + } + + public String getHeadImgUrl() { + return headImgUrl; + } + + public void setHeadImgUrl(String headImgUrl) { + this.headImgUrl = headImgUrl; + } + + public String getSn() { + return sn; + } + + public void setSn(String sn) { + this.sn = sn; + } + + public long getUserId() { + return userId; + } + + public void setUserId(long userId) { + this.userId = userId; + } + + public String getTrafficInfoType() { + return trafficInfoType; + } + + public void setTrafficInfoType(String trafficInfoType) { + this.trafficInfoType = trafficInfoType; + } + + public String getInfoId() { + return infoId; + } + + public void setInfoId(String infoId) { + this.infoId = infoId; + } + + public String getPoiType() { + return poiType; + } + + public void setPoiType(String poiType) { + this.poiType = poiType; + } + + public String getUploadType() { + return uploadType; + } + + public void setUploadType(String uploadType) { + this.uploadType = uploadType; + } + + public int getLikeNum() { + return likeNum; + } + + public void setLikeNum(int likeNum) { + this.likeNum = likeNum; + } + + public int getSystemLikeNum() { + return systemLikeNum; + } + + public void setSystemLikeNum(int systemLikeNum) { + this.systemLikeNum = systemLikeNum; + } + + public boolean isFabulous() { + return fabulous; + } + + public void setFabulous(boolean fabulous) { + this.fabulous = fabulous; + } + + public List getItems() { + return items; + } + + public void setItems(List items) { + this.items = items; + } + + + public static class ItemsDTO { /** - * generateTime : 1607061691000 - * type : 0 - * lat : 39.988346 - * lon : 116.410857 - * direction : 333 - * items : [{"url":"http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1603181678357.png?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1607393278%3B1607400478%26q-key-time%3D1607393278%3B1607400478%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D78c0f738f4dae37e67c235561c78120b86433a04"}] - * cityName : - * distance : 21447 - * nickName : 独狼 - * headImgUrl : https://yycp-static-1255510688.cos.ap-beijing.myqcloud.com/defaultUserHeadImg/VN000015.jpg - * sn : - * userId : 0 - * trafficInfoType : 0 - * infoId : 784423898000445440 - * poiType : 10015 - * uploadType : 2 - * likeNum : 3 - * systemLikeNum : 3 - * fabulous : false + * url : http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1603181678357.png?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1607393278%3B1607400478%26q-key-time%3D1607393278%3B1607400478%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D78c0f738f4dae37e67c235561c78120b86433a04 */ - private long generateTime; + private String url; - private int type; - private double lat; - private double lon; - - private int direction; - private String cityName; - - private int distance; - private String nickName; - - private String headImgUrl; - - private String sn; - - private long userId; - - private String trafficInfoType; - - private String infoId; - - private String poiType; - - private String uploadType; - - private int likeNum; - - private int systemLikeNum; - - private boolean fabulous; - - private List items; - - public long getGenerateTime() { - return generateTime; + public String getUrl() { + return url; } - public void setGenerateTime(long generateTime) { - this.generateTime = generateTime; - } - - public int getType() { - return type; - } - - public void setType(int type) { - this.type = type; - } - - public double getLat() { - return lat; - } - - public void setLat(double lat) { - this.lat = lat; - } - - public double getLon() { - return lon; - } - - public void setLon(double lon) { - this.lon = lon; - } - - public int getDirection() { - return direction; - } - - public void setDirection(int direction) { - this.direction = direction; - } - - public String getCityName() { - return cityName; - } - - public void setCityName(String cityName) { - this.cityName = cityName; - } - - public int getDistance() { - return distance; - } - - public void setDistance(int distance) { - this.distance = distance; - } - - public String getNickName() { - return nickName; - } - - public void setNickName(String nickName) { - this.nickName = nickName; - } - - public String getHeadImgUrl() { - return headImgUrl; - } - - public void setHeadImgUrl(String headImgUrl) { - this.headImgUrl = headImgUrl; - } - - public String getSn() { - return sn; - } - - public void setSn(String sn) { - this.sn = sn; - } - - public long getUserId() { - return userId; - } - - public void setUserId(long userId) { - this.userId = userId; - } - - public String getTrafficInfoType() { - return trafficInfoType; - } - - public void setTrafficInfoType(String trafficInfoType) { - this.trafficInfoType = trafficInfoType; - } - - public String getInfoId() { - return infoId; - } - - public void setInfoId(String infoId) { - this.infoId = infoId; - } - - public String getPoiType() { - return poiType; - } - - public void setPoiType(String poiType) { - this.poiType = poiType; - } - - public String getUploadType() { - return uploadType; - } - - public void setUploadType(String uploadType) { - this.uploadType = uploadType; - } - - public int getLikeNum() { - return likeNum; - } - - public void setLikeNum(int likeNum) { - this.likeNum = likeNum; - } - - public int getSystemLikeNum() { - return systemLikeNum; - } - - public void setSystemLikeNum(int systemLikeNum) { - this.systemLikeNum = systemLikeNum; - } - - public boolean isFabulous() { - return fabulous; - } - - public void setFabulous(boolean fabulous) { - this.fabulous = fabulous; - } - - public List getItems() { - return items; - } - - public void setItems(List items) { - this.items = items; - } - - - public static class ItemsDTO { - /** - * url : http://petchfile-1255510688.cos.ap-beijing.myqcloud.com/sso-server-image/1603181678357.png?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDCWfcNwD5PXVWLxwejccR3Tiz5zhIkx0T%26q-sign-time%3D1607393278%3B1607400478%26q-key-time%3D1607393278%3B1607400478%26q-header-list%3D%26q-url-param-list%3D%26q-signature%3D78c0f738f4dae37e67c235561c78120b86433a04 - */ - - - private String url; - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } + public void setUrl(String url) { + this.url = url; } } + } - public static class IllegalParkingDataDTO { - /** - * generateTime : 1594047156488 - * type : 3 - * lat : 40.028599 - * lon : 116.412712 - * direction : 0 - * addr : 红军营南路红军营南路万科星园北口至红军营南路北苑路口段 - * items : [] - * cityName : - * distance : 6728 - * nickName : - * headImgUrl : - * sn : - * userId : 0 - * trafficInfoType : 0 - * infoId : 686267 - * poiType : 10016 - * uploadType : 3 - * likeNum : 0 - * systemLikeNum : 0 - * fabulous : false - */ + public static class IllegalParkingDataDTO { + /** + * generateTime : 1594047156488 + * type : 3 + * lat : 40.028599 + * lon : 116.412712 + * direction : 0 + * addr : 红军营南路红军营南路万科星园北口至红军营南路北苑路口段 + * items : [] + * cityName : + * distance : 6728 + * nickName : + * headImgUrl : + * sn : + * userId : 0 + * trafficInfoType : 0 + * infoId : 686267 + * poiType : 10016 + * uploadType : 3 + * likeNum : 0 + * systemLikeNum : 0 + * fabulous : false + */ - private long generateTime; + private long generateTime; - private int type; + private int type; - private double lat; + private double lat; - private double lon; + private double lon; - private int direction; + private int direction; - private String addr; + private String addr; - private String cityName; + private String cityName; - private int distance; + private int distance; - private String nickName; + private String nickName; - private String headImgUrl; + private String headImgUrl; - private String sn; + private String sn; - private long userId; + private long userId; - private String trafficInfoType; + private String trafficInfoType; - private String infoId; + private String infoId; - private String poiType; + private String poiType; - private String uploadType; + private String uploadType; - private int likeNum; + private int likeNum; - private int systemLikeNum; + private int systemLikeNum; - private boolean fabulous; + private boolean fabulous; - private List items; + private List items; - public long getGenerateTime() { - return generateTime; - } + public long getGenerateTime() { + return generateTime; + } - public void setGenerateTime(long generateTime) { - this.generateTime = generateTime; - } + public void setGenerateTime(long generateTime) { + this.generateTime = generateTime; + } - public int getType() { - return type; - } + public int getType() { + return type; + } - public void setType(int type) { - this.type = type; - } + public void setType(int type) { + this.type = type; + } - public double getLat() { - return lat; - } + public double getLat() { + return lat; + } - public void setLat(double lat) { - this.lat = lat; - } + public void setLat(double lat) { + this.lat = lat; + } - public double getLon() { - return lon; - } + public double getLon() { + return lon; + } - public void setLon(double lon) { - this.lon = lon; - } + public void setLon(double lon) { + this.lon = lon; + } - public int getDirection() { - return direction; - } + public int getDirection() { + return direction; + } - public void setDirection(int direction) { - this.direction = direction; - } + public void setDirection(int direction) { + this.direction = direction; + } - public String getAddr() { - return addr; - } + public String getAddr() { + return addr; + } - public void setAddr(String addr) { - this.addr = addr; - } + public void setAddr(String addr) { + this.addr = addr; + } - public String getCityName() { - return cityName; - } + public String getCityName() { + return cityName; + } - public void setCityName(String cityName) { - this.cityName = cityName; - } + public void setCityName(String cityName) { + this.cityName = cityName; + } - public int getDistance() { - return distance; - } + public int getDistance() { + return distance; + } - public void setDistance(int distance) { - this.distance = distance; - } + public void setDistance(int distance) { + this.distance = distance; + } - public String getNickName() { - return nickName; - } + public String getNickName() { + return nickName; + } - public void setNickName(String nickName) { - this.nickName = nickName; - } + public void setNickName(String nickName) { + this.nickName = nickName; + } - public String getHeadImgUrl() { - return headImgUrl; - } + public String getHeadImgUrl() { + return headImgUrl; + } - public void setHeadImgUrl(String headImgUrl) { - this.headImgUrl = headImgUrl; - } + public void setHeadImgUrl(String headImgUrl) { + this.headImgUrl = headImgUrl; + } - public String getSn() { - return sn; - } + public String getSn() { + return sn; + } - public void setSn(String sn) { - this.sn = sn; - } + public void setSn(String sn) { + this.sn = sn; + } - public long getUserId() { - return userId; - } + public long getUserId() { + return userId; + } - public void setUserId(long userId) { - this.userId = userId; - } + public void setUserId(long userId) { + this.userId = userId; + } - public String getTrafficInfoType() { - return trafficInfoType; - } + public String getTrafficInfoType() { + return trafficInfoType; + } - public void setTrafficInfoType(String trafficInfoType) { - this.trafficInfoType = trafficInfoType; - } + public void setTrafficInfoType(String trafficInfoType) { + this.trafficInfoType = trafficInfoType; + } - public String getInfoId() { - return infoId; - } + public String getInfoId() { + return infoId; + } - public void setInfoId(String infoId) { - this.infoId = infoId; - } + public void setInfoId(String infoId) { + this.infoId = infoId; + } - public String getPoiType() { - return poiType; - } + public String getPoiType() { + return poiType; + } - public void setPoiType(String poiType) { - this.poiType = poiType; - } + public void setPoiType(String poiType) { + this.poiType = poiType; + } - public String getUploadType() { - return uploadType; - } + public String getUploadType() { + return uploadType; + } - public void setUploadType(String uploadType) { - this.uploadType = uploadType; - } + public void setUploadType(String uploadType) { + this.uploadType = uploadType; + } - public int getLikeNum() { - return likeNum; - } + public int getLikeNum() { + return likeNum; + } - public void setLikeNum(int likeNum) { - this.likeNum = likeNum; - } + public void setLikeNum(int likeNum) { + this.likeNum = likeNum; + } - public int getSystemLikeNum() { - return systemLikeNum; - } + public int getSystemLikeNum() { + return systemLikeNum; + } - public void setSystemLikeNum(int systemLikeNum) { - this.systemLikeNum = systemLikeNum; - } + public void setSystemLikeNum(int systemLikeNum) { + this.systemLikeNum = systemLikeNum; + } - public boolean isFabulous() { - return fabulous; - } + public boolean isFabulous() { + return fabulous; + } - public void setFabulous(boolean fabulous) { - this.fabulous = fabulous; - } + public void setFabulous(boolean fabulous) { + this.fabulous = fabulous; + } - public List getItems() { - return items; - } + public List getItems() { + return items; + } - public void setItems(List items) { - this.items = items; - } + public void setItems(List items) { + this.items = items; } } } + diff --git a/app/src/main/java/com/mogo/cloud/network/V2XSeekHelpRes.java b/app/src/main/java/com/mogo/cloud/network/V2XSeekHelpRes.java index 4a28ce3..9353045 100644 --- a/app/src/main/java/com/mogo/cloud/network/V2XSeekHelpRes.java +++ b/app/src/main/java/com/mogo/cloud/network/V2XSeekHelpRes.java @@ -1,5 +1,7 @@ package com.mogo.cloud.network; +import com.mogo.cloud.commons.network.BaseData; + import java.io.Serializable; /** @@ -9,42 +11,24 @@ import java.io.Serializable; * desc : 故障求助查询,当前车辆是否处于求助中 * version: 1.0 */ -public class V2XSeekHelpRes extends BaseData implements Serializable { - private ResultBean result; - public ResultBean getResult() { - return result; +public class V2XSeekHelpRes { + private int vehicleType; + + public int getVehicleType() { + return vehicleType; } - public void setResult(ResultBean result) { - this.result = result; - } - - public static class ResultBean { - private int vehicleType; - - public int getVehicleType() { - return vehicleType; - } - - public void setVehicleType(int vehicleType) { - this.vehicleType = vehicleType; - } - - @Override - public String toString() { - return "ResultBean{" + - "vehicleType=" + vehicleType + - '}'; - } + public void setVehicleType(int vehicleType) { + this.vehicleType = vehicleType; } @Override public String toString() { - return "V2XSeekHelpResult{" + - "result=" + result + - ", code=" + code + - ", msg='" + msg + '\'' + + return "V2XSeekHelpRes{" + + "vehicleType=" + vehicleType + '}'; } } + + diff --git a/foudations/mogo-commons/src/main/java/com/mogo/cloud/commons/network/BaseData.kt b/foudations/mogo-commons/src/main/java/com/mogo/cloud/commons/network/BaseData.kt new file mode 100644 index 0000000..ecdbca6 --- /dev/null +++ b/foudations/mogo-commons/src/main/java/com/mogo/cloud/commons/network/BaseData.kt @@ -0,0 +1,12 @@ +package com.mogo.cloud.commons.network + +import java.io.Serializable + +/** + * created by wujifei on 2021/1/22 11:11 + * describe:基本数据结构 + */ +data class BaseData(var code: Int, + var msg: String?, + val detailMsg: String?, + var result: T?) : Serializable, Cloneable \ No newline at end of file