From 77481c7ed92be50f232338903b5308860b85c3a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=AE=87?= Date: Mon, 13 Jan 2020 19:17:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E4=BA=86marker=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mogo/utils/network/utils/GsonUtil.java | 2 ++ .../module/common/entity/MarkerLocation.java | 6 +++--- .../module/common/entity/MarkerResponse.java | 6 +++--- .../module/service/MarkerServiceHandler.java | 20 ++++++++++--------- 4 files changed, 19 insertions(+), 15 deletions(-) diff --git a/foudations/mogo-utils/src/main/java/com/mogo/utils/network/utils/GsonUtil.java b/foudations/mogo-utils/src/main/java/com/mogo/utils/network/utils/GsonUtil.java index ea1cfad71d..540458dde6 100644 --- a/foudations/mogo-utils/src/main/java/com/mogo/utils/network/utils/GsonUtil.java +++ b/foudations/mogo-utils/src/main/java/com/mogo/utils/network/utils/GsonUtil.java @@ -36,6 +36,7 @@ public class GsonUtil { try { return getGson().toJson(object); } catch ( Exception var2) { + var2.printStackTrace(); return null; } } @@ -48,6 +49,7 @@ public class GsonUtil { try { return getGson().fromJson(json, klass); } catch ( Exception var3) { + var3.printStackTrace(); return null; } } diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerLocation.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerLocation.java index 519b644e0d..38715c15aa 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerLocation.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerLocation.java @@ -8,7 +8,7 @@ import java.io.Serializable; public class MarkerLocation implements Serializable { private String address; - private Long angle; + private float angle; private Double lat; private Double lon; @@ -20,11 +20,11 @@ public class MarkerLocation implements Serializable { this.address = address; } - public Long getAngle() { + public float getAngle() { return angle; } - public void setAngle(Long angle) { + public void setAngle(float angle) { this.angle = angle; } diff --git a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerResponse.java b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerResponse.java index 70a07e68cb..7fc61bb9e3 100644 --- a/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerResponse.java +++ b/modules/mogo-module-common/src/main/java/com/mogo/module/common/entity/MarkerResponse.java @@ -7,16 +7,16 @@ import java.io.Serializable; @SuppressWarnings("unused") public class MarkerResponse implements Serializable { - private Long code; + private int code; private String msg; private MarkerCardResult result; private String sign; - public Long getCode() { + public int getCode() { return code; } - public void setCode(Long code) { + public void setCode(int code) { this.code = code; } diff --git a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MarkerServiceHandler.java b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MarkerServiceHandler.java index d992f31ca6..dbddc85b19 100644 --- a/modules/mogo-module-service/src/main/java/com/mogo/module/service/MarkerServiceHandler.java +++ b/modules/mogo-module-service/src/main/java/com/mogo/module/service/MarkerServiceHandler.java @@ -74,7 +74,7 @@ public class MarkerServiceHandler { @Override public void onMsgReceived(MarkerResponse response) { - Logger.e(TAG, "===" + response); + Logger.e(TAG, "======MarkerResponse:" + response); if (!getMogoStatusManager().isSearchUIShow()) { drawMapMarker(response); } @@ -201,16 +201,18 @@ public class MarkerServiceHandler { if (exploreWay != null) { for (MarkerExploreWay markerExploreWay : exploreWay) { - MarkerLocation markerLocation = markerExploreWay.getLocation(); + if (!markerExploreWay.getCanLive()) { + MarkerLocation markerLocation = markerExploreWay.getLocation(); - MarkerShowEntity markerShowEntity = new MarkerShowEntity(); - markerShowEntity.setBindObj(markerExploreWay); - markerShowEntity.setMarkerLocation(markerLocation); - markerShowEntity.setMarkerType(markerExploreWay.getType()); - markerShowEntity.setTextContent(markerExploreWay.getUserInfo().getUserName()); - markerShowEntity.setIconUrl(markerExploreWay.getUserInfo().getUserHead()); + MarkerShowEntity markerShowEntity = new MarkerShowEntity(); + markerShowEntity.setBindObj(markerExploreWay); + markerShowEntity.setMarkerLocation(markerLocation); + markerShowEntity.setMarkerType(markerExploreWay.getType()); + markerShowEntity.setTextContent(markerExploreWay.getUserInfo().getUserName()); + markerShowEntity.setIconUrl(markerExploreWay.getUserInfo().getUserHead()); - drawMapMarker(markerShowEntity); + drawMapMarker(markerShowEntity); + } } }