From 2a057ce99c66be1c81770869bac0d8b47d80a965 Mon Sep 17 00:00:00 2001 From: lixiaopeng Date: Fri, 14 Feb 2020 15:54:27 +0800 Subject: [PATCH] add type -1 --- .../tanlu/fragment/TanluCardViewFragment.java | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java index efdbc1b618..ac8f087749 100644 --- a/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java +++ b/modules/mogo-module-tanlu/src/main/java/com/mogo/module/tanlu/fragment/TanluCardViewFragment.java @@ -955,6 +955,7 @@ import static com.mogo.module.tanlu.video.VideoInitKt.initVideo; String poiType = ""; if (event.type.equals("1")) { //上报路况 + poiType = "10001"; mMarkerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.tanlu_marker_block_up); } else if (event.type.equals("2")) { //交通检查 10002 poiType = "10002"; @@ -984,16 +985,18 @@ import static com.mogo.module.tanlu.video.VideoInitKt.initVideo; Log.d(TAG, "onMarkerInfo share onCompleted ---!poiType--- else ---->"); } - //请求分享接口 - if (markerExploreWayList != null && markerExploreWayList.size() > 0) { - MarkerExploreWay markerExploreWay = markerExploreWayList.get(0); - if (markerExploreWay.getUserInfo() != null && !TextUtils.isEmpty(poiType)) { //上报路况不使用这个接口 - uploadShareInfo(poiType, event.imageUrl, markerExploreWay.getUserInfo().getUserName(), - markerExploreWay.getUserInfo().getUserHead()); + //请求分享接口,只有封路和交通检查走新接口,老接口只有上报拥堵使用,并且定时任务都是拥堵的type + if (poiType.equals("10002") || poiType.equals("10003")) { + if (markerExploreWayList != null && markerExploreWayList.size() > 0) { + MarkerExploreWay markerExploreWay = markerExploreWayList.get(0); + if (markerExploreWay.getUserInfo() != null && !TextUtils.isEmpty(poiType)) { //上报路况不使用这个接口 + uploadShareInfo(poiType, event.imageUrl, markerExploreWay.getUserInfo().getUserName(), + markerExploreWay.getUserInfo().getUserHead()); + } + } else { + Log.e(TAG, "onMarkerInfo share markerExploreWayList = null"); + uploadShareInfo(poiType, event.imageUrl, "", ""); } - } else { - Log.e(TAG, "onMarkerInfo share markerExploreWayList = null"); - uploadShareInfo(poiType, event.imageUrl, "", ""); } }