Commit b2aba0c1fcf9d015c06a5eaf6489a78b3484bb41
Merge branch 'master' of bj.gitlab.cnlive.com:cnlive-team/ModulePedometer
Showing
3 changed files
with
75 additions
and
0 deletions
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/commonInfo/CommonInfo.java
| @@ -156,6 +156,25 @@ public class CommonInfo { | @@ -156,6 +156,25 @@ public class CommonInfo { | ||
| 156 | return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean("FirstStepSendTraceTip", true); | 156 | return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getBoolean("FirstStepSendTraceTip", true); |
| 157 | } | 157 | } |
| 158 | 158 | ||
| 159 | + /** | ||
| 160 | + * 设置围栏ID | ||
| 161 | + * | ||
| 162 | + * @param context | ||
| 163 | + * @param id | ||
| 164 | + */ | ||
| 165 | + public static void setFenceId(Context context, int id) { | ||
| 166 | + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).putInt("FenceId", id); | ||
| 167 | + } | ||
| 168 | + | ||
| 169 | + /** | ||
| 170 | + * 获取围栏ID | ||
| 171 | + * | ||
| 172 | + * @param context | ||
| 173 | + */ | ||
| 174 | + public static int getFenceId(Context context) { | ||
| 175 | + return MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).getInt("FenceId", -1); | ||
| 176 | + } | ||
| 177 | + | ||
| 159 | /*重置 | 178 | /*重置 |
| 160 | * @param context | 179 | * @param context |
| 161 | */ | 180 | */ |
| @@ -168,6 +187,8 @@ public class CommonInfo { | @@ -168,6 +187,8 @@ public class CommonInfo { | ||
| 168 | MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("RunBaiduTraceService"); | 187 | MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("RunBaiduTraceService"); |
| 169 | MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("streetId"); | 188 | MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("streetId"); |
| 170 | MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("FirstStepSendTraceTip"); | 189 | MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("FirstStepSendTraceTip"); |
| 190 | + MySpHelper.getInstance(context, Context.MODE_MULTI_PROCESS).removeKey("FenceId"); | ||
| 191 | + | ||
| 171 | } | 192 | } |
| 172 | 193 | ||
| 173 | 194 |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/frame/view/RunRaceDetailFragmentView.java
| @@ -193,6 +193,10 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | @@ -193,6 +193,10 @@ public class RunRaceDetailFragmentView implements MvpView, SensorEventListener { | ||
| 193 | } | 193 | } |
| 194 | }); | 194 | }); |
| 195 | /*************************设置相关页面数据***************************/ | 195 | /*************************设置相关页面数据***************************/ |
| 196 | + //设置围栏ID | ||
| 197 | + if (!TextUtils.isEmpty(runRaceDetailInfo.getFenceId())) { | ||
| 198 | + CommonInfo.setFenceId(getContext(), Integer.parseInt(runRaceDetailInfo.getFenceId())); | ||
| 199 | + } | ||
| 196 | //设置标题 | 200 | //设置标题 |
| 197 | if (!TextUtils.isEmpty(runRaceDetailInfo.getTitle())) { | 201 | if (!TextUtils.isEmpty(runRaceDetailInfo.getTitle())) { |
| 198 | fragment.binding.includeStreet.tvRaceTitle.setText(runRaceDetailInfo.getTitle()); | 202 | fragment.binding.includeStreet.tvRaceTitle.setText(runRaceDetailInfo.getTitle()); |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/net/bean/RunRaceDetailInfo.java
| @@ -12,6 +12,11 @@ public class RunRaceDetailInfo { | @@ -12,6 +12,11 @@ public class RunRaceDetailInfo { | ||
| 12 | 12 | ||
| 13 | /** | 13 | /** |
| 14 | * address : 澳大利亚黄金海岸 | 14 | * address : 澳大利亚黄金海岸 |
| 15 | + * fenceId : 11 | ||
| 16 | + * fenceName : 11 | ||
| 17 | + * startTime : 2019-06-05 16:20:19 | ||
| 18 | + * endTime : 2019-06-10 16:20:19 | ||
| 19 | + * entityName : 某某某 | ||
| 15 | * description : 2018国际网络徒步大赛黄金海岸站 | 20 | * description : 2018国际网络徒步大赛黄金海岸站 |
| 16 | * employTime : 00:0:30 | 21 | * employTime : 00:0:30 |
| 17 | * endLocation : 首都师范大学操场西门 | 22 | * endLocation : 首都师范大学操场西门 |
| @@ -44,6 +49,11 @@ public class RunRaceDetailInfo { | @@ -44,6 +49,11 @@ public class RunRaceDetailInfo { | ||
| 44 | */ | 49 | */ |
| 45 | 50 | ||
| 46 | private String address; | 51 | private String address; |
| 52 | + private String fenceId; | ||
| 53 | + private String fenceName; | ||
| 54 | + private String startTime; | ||
| 55 | + private String endTime; | ||
| 56 | + private String entityName; | ||
| 47 | private String description; | 57 | private String description; |
| 48 | private String employTime; | 58 | private String employTime; |
| 49 | private String endLocation; | 59 | private String endLocation; |
| @@ -82,6 +92,46 @@ public class RunRaceDetailInfo { | @@ -82,6 +92,46 @@ public class RunRaceDetailInfo { | ||
| 82 | this.address = address; | 92 | this.address = address; |
| 83 | } | 93 | } |
| 84 | 94 | ||
| 95 | + public String getFenceId() { | ||
| 96 | + return fenceId; | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + public void setFenceId(String fenceId) { | ||
| 100 | + this.fenceId = fenceId; | ||
| 101 | + } | ||
| 102 | + | ||
| 103 | + public String getFenceName() { | ||
| 104 | + return fenceName; | ||
| 105 | + } | ||
| 106 | + | ||
| 107 | + public void setFenceName(String fenceName) { | ||
| 108 | + this.fenceName = fenceName; | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + public String getStartTime() { | ||
| 112 | + return startTime; | ||
| 113 | + } | ||
| 114 | + | ||
| 115 | + public void setStartTime(String startTime) { | ||
| 116 | + this.startTime = startTime; | ||
| 117 | + } | ||
| 118 | + | ||
| 119 | + public String getEndTime() { | ||
| 120 | + return endTime; | ||
| 121 | + } | ||
| 122 | + | ||
| 123 | + public void setEndTime(String endTime) { | ||
| 124 | + this.endTime = endTime; | ||
| 125 | + } | ||
| 126 | + | ||
| 127 | + public String getEntityName() { | ||
| 128 | + return entityName; | ||
| 129 | + } | ||
| 130 | + | ||
| 131 | + public void setEntityName(String entityName) { | ||
| 132 | + this.entityName = entityName; | ||
| 133 | + } | ||
| 134 | + | ||
| 85 | public String getDescription() { | 135 | public String getDescription() { |
| 86 | return description; | 136 | return description; |
| 87 | } | 137 | } |