mCanCollectionIdList = new ArrayList<>();
31 |
32 | static int pageCount = 0;
33 |
34 | public static Object curH5Fragment;
35 | public static Object curH5PageImpl;
36 | public static Object curH5WebView;
37 | public static Object activity;
38 | static int mCollectionCount = 0;
39 |
40 | public static boolean isBankList(String response) {
41 |
42 | try {
43 | FriendRankBean friendRankBean = new Gson().fromJson(response, FriendRankBean.class);
44 | if (friendRankBean.getFriendRanking() == null){
45 | return false;
46 | }
47 | } catch (Exception e) {
48 | LogUtil.e("isBankList 格式化FriendRankBean失败 :" + e.getMessage());
49 | return false;
50 | }
51 | return true;
52 | }
53 |
54 | public static boolean isUserDetail(String response) {
55 | try {
56 | FriendDetailBean friendDetailBean = new Gson().fromJson(response, FriendDetailBean.class);
57 | if (null == friendDetailBean.getBizNo()){
58 |
59 | return false;
60 | }
61 |
62 | } catch (Exception e) {
63 | LogUtil.e("isUserDetail error" + e.getMessage());
64 | return false;
65 | }
66 | return true;
67 | }
68 |
69 | /**
70 | * 一页好友信息,解析得到有可收取的好友id
71 | * @param loader
72 | * @param response
73 | */
74 | public static void autoGetCanCollectUserIdList(final ClassLoader loader, String response) {
75 |
76 | if (mIsWebViewRefresh) {
77 | //如果已经刷新了,又回来response,表示主动刷新webview结束来到的逻辑
78 | finishWork();
79 | return;
80 | }
81 | boolean isSuccess = parseFriendBankDataResponse(loader,response);
82 | LogUtil.d("autoGetCanCollectUserIdList isSuccess = " + isSuccess + ",response = " + response);
83 |
84 | if (isSuccess) {
85 | LogUtil.d("isSuccess 开始分页获取可以收取能量的好友信息");
86 | //分页,这里可能是同步的,要子线程,不确定
87 | new Thread() {
88 | @Override
89 | public void run() {
90 | rpcCall_FriendRankList(loader);
91 | }
92 | }.start();
93 | } else {
94 |
95 | //理论上到达好友最后一页
96 | LogUtil.d("解析不到好友信息,说明到了最后一页 收取的能量数:" + mCollectionCount );
97 |
98 | StringBuilder result = new StringBuilder();
99 | result.append("有可收能量的好友::"+mFriendsRankUseridList.size());
100 | result.append("\n");
101 | result.append("一共有能量球数:"+mCanCollectionIdList.size());
102 | result.append("\n");
103 | result.append("一共收取的能量数:" + mCollectionCount);
104 |
105 | mIsWebViewRefresh = true;
106 | //重置参数
107 | mCollectionCount = 0;
108 | mIsWebViewRefresh = false;
109 | mCanCollectionIdList.clear();
110 | mFriendsRankUseridList.clear();
111 | pageCount = 0;
112 | LogUtil.d("重置参数");
113 |
114 |
115 | toast(loader,result.toString());
116 |
117 |
118 |
119 | refreshWebView();
120 |
121 |
122 |
123 |
124 | }
125 | }
126 |
127 | private static void refreshWebView(){
128 | // mWebView.reload(); //刷新
129 | if (curH5WebView != null){
130 |
131 | try {
132 | Class> clazz = curH5WebView.getClass();
133 | Method reload = clazz.getMethod("reload");
134 | reload.invoke(curH5WebView);
135 | LogUtil.d("调用 刷新webview");
136 |
137 | } catch (Exception e) {
138 | LogUtil.e("调用 刷新webview异常:" + e.getMessage());
139 | }
140 |
141 | }else {
142 | LogUtil.e("webview 为空");
143 | }
144 |
145 | }
146 |
147 | /**
148 | * 获取指定用户可以收取的能量信息
149 | *
150 | * @param loader
151 | * @param userId rpcCall: params:alipay.antmember.forest.h5.queryNextAction,[{"av":"5","ct":"android","userId":"2088012502446033"}],,true,{},null,false,com.alipay.mobile.nebulacore.core.H5PageImpl@2ab462b,0,,false,-1
152 | *
153 | * rpcCall: params:alipay.antmember.forest.h5.pageQueryDynamics,[{"av":"5","ct":"android","pageSize":3,"startIndex":0,"userId":"2088012502446033"}],,true,{},null,false,com.alipay.mobile.nebulacore.core.H5PageImpl@2ab462b,0,,false,-1
154 | */
155 | public static void rpcCall_CanCollectEnergy(ClassLoader loader, String userId) {
156 |
157 | try {
158 | Method rpcCallMethod = getRpcCallMethod(loader);
159 | JSONArray jsonArray = new JSONArray();
160 | JSONObject json = new JSONObject();
161 | json.put("av", "5");
162 | json.put("ct", "android");
163 | json.put("pageSize", 3);
164 | json.put("startIndex", 0);
165 | json.put("userId", userId);
166 | jsonArray.put(json);
167 | LogUtil.d("获取指定用户可以收取的能量信息 pcCall_CanCollectEnergy 参数: " + jsonArray);
168 |
169 | rpcCallMethod.invoke(null, "alipay.antmember.forest.h5.queryNextAction",
170 | jsonArray.toString(), "", true, null, null, false, curH5PageImpl, 0, "", false, -1);
171 |
172 | rpcCallMethod.invoke(null, "params:alipay.antmember.forest.h5.pageQueryDynamics",
173 | jsonArray.toString(), "", true, null, null, false, curH5PageImpl, 0, "", false, -1);
174 |
175 |
176 | } catch (Exception e) {
177 | LogUtil.e("rpcCall_CanCollectEnergy 出错:" + e.getMessage());
178 | }
179 | }
180 |
181 |
182 | /**
183 | * 获取分页好友信息
184 | *
185 | * @param loader 2.下拉好友,有分页pageSizem,startPoint
186 | * rpcCall: params:alipay.antmember.forest.h5.queryEnergyRanking,[{"av":"5","ct":"android","pageSize":20,"startPoint":"21"}],,true,{},null,false,com.alipay.mobile.nebulacore.core.H5PageImpl@d20514,0,,false,-1
187 | */
188 | private static void rpcCall_FriendRankList(ClassLoader loader) {
189 |
190 | try {
191 | Method rpcCallMethod = getRpcCallMethod(loader);
192 | JSONArray jsonArray = new JSONArray();
193 | JSONObject json = new JSONObject();
194 | json.put("av", "5");
195 | json.put("ct", "android");
196 | json.put("pageSize", 20);
197 | //从第一页开始加载
198 | json.put("startPoint", ((pageCount++) * 20 + 1) + "");
199 | jsonArray.put(json);
200 | LogUtil.d("rpcCall_FriendRankList 参数:" + jsonArray);
201 |
202 |
203 | rpcCallMethod.invoke(null, "alipay.antmember.forest.h5.queryEnergyRanking", jsonArray.toString(),
204 | "", true, null, null, false, curH5PageImpl, 0, "", false, -1);
205 |
206 | } catch (Exception e) {
207 | LogUtil.e(" rpcCall_FriendRankList error : " + e.getMessage());
208 | }
209 |
210 | }
211 |
212 | /**
213 | * 利用反射获取对应H5PageImpl对象,最后调用rpcCall方法发送命令请求
214 | *
215 | * @param loader
216 | * @return
217 | */
218 | private static Method getRpcCallMethod(ClassLoader loader) {
219 | try {
220 | Field af = curH5Fragment.getClass().getDeclaredField("a");
221 | af.setAccessible(true);
222 | Object viewHolder = af.get(curH5Fragment);
223 |
224 | Field hf = viewHolder.getClass().getDeclaredField("h");
225 | hf.setAccessible(true);
226 | curH5PageImpl = hf.get(viewHolder);
227 |
228 |
229 |
230 | Class> h5PageClazz = loader.loadClass("com.alipay.mobile.h5container.api.H5Page");
231 | Class> jsonClazz = loader.loadClass("com.alibaba.fastjson.JSONObject");
232 | Class> rpcClazz = loader.loadClass("com.alipay.mobile.nebulabiz.rpc.H5RpcUtil");
233 | if (curH5PageImpl != null) {
234 |
235 | // curH5PageImpl 下有一个 H5WebView f
236 | // Field ff = curH5PageImpl.getClass().getDeclaredField("f");
237 | // ff.setAccessible(true);
238 | // curH5WebView = ff.get(curH5PageImpl); //保存当前webview
239 |
240 |
241 | // try {
242 | // Field cf = curH5PageImpl.getClass().getDeclaredField("c");
243 | // cf.setAccessible(true);
244 | // activity = cf.get(curH5PageImpl); //保存当前webview
245 | // } catch (Exception e) {
246 | // LogUtil.d("获取activity对象失败 " + e.getMessage());
247 | // }
248 |
249 | // public static com.alipay.mobile.nebulabiz.rpc.H5Response
250 | // rpcCall(java.lang.String r17, java.lang.String r18, java.lang.String r19, boolean r20,
251 | // com.alibaba.fastjson.JSONObject r21, java.lang.String r22, boolean r23, com.alipay.mobile.h5container.api.H5Page r24,
252 | // int r25, java.lang.String r26, boolean r27, int r28) {
253 |
254 | Method callM = rpcClazz.getMethod("rpcCall", String.class, String.class, String.class, boolean.class,
255 | jsonClazz, String.class, boolean.class, h5PageClazz,
256 | int.class, String.class, boolean.class, int.class);
257 |
258 |
259 |
260 | return callM;
261 | }
262 |
263 |
264 | } catch (Exception e) {
265 | LogUtil.e("getRpcCallMethod error " + e.getMessage());
266 | }
267 | return null;
268 | }
269 |
270 | public static void autoGetCanCollectBubbleIdList(ClassLoader loader, String response) {
271 | try {
272 | FriendDetailBean friendDetailBean = new Gson().fromJson(response, FriendDetailBean.class);
273 | LogUtil.d("friendDetailBean " + friendDetailBean.getBubbles().size() + ",response = " + response);
274 | //遍历能力,看哪些是可以收取的
275 | for (FriendDetailBean.BubblesBean bubblesBean : friendDetailBean.getBubbles()) {
276 |
277 | if ("AVAILABLE".equalsIgnoreCase(bubblesBean.getCollectStatus()) || bubblesBean.isCanHelpCollect()) {
278 | long id = bubblesBean.getId();
279 | CollectionBean collectionBean = new CollectionBean(bubblesBean.getUserId(), id);
280 | if (!mCanCollectionIdList.contains(collectionBean)) {
281 | LogUtil.d("能量id已经获取到 " + id);
282 | mCanCollectionIdList.add(collectionBean);
283 |
284 | }
285 |
286 | LogUtil.d("调用收取能量接口 " + collectionBean.toString());
287 | rpcCall_CollectEnergy(loader, collectionBean.userId, collectionBean.bubbleIds);
288 |
289 | }
290 | }
291 | } catch (Exception e) {
292 | LogUtil.e("autoGetCanCollectBubbleIdList解析失败 " + e.getMessage());
293 | e.printStackTrace();
294 | }
295 |
296 |
297 | }
298 |
299 | /**
300 | * 解析好友信息,循环吧所有有能量的好友信息解析完
301 | *
302 | * @param response
303 | * @return
304 | */
305 | private static boolean parseFriendBankDataResponse(ClassLoader loader,String response) {
306 | try {
307 | FriendRankBean friendRankBean = new Gson().fromJson(response, FriendRankBean.class);
308 | LogUtil.d("本次解析好友数量 " + friendRankBean.getFriendRanking().size());
309 | if (friendRankBean.getFriendRanking().size() == 0) {
310 | //没有好友了,说明到达最后一页
311 | return false;
312 | }
313 | for (FriendRankBean.FriendRankingBean friendRankingBean : friendRankBean.getFriendRanking()) {
314 | if (friendRankingBean.isCanCollectEnergy()) {
315 | String userId = friendRankingBean.getUserId();
316 | LogUtil.d("好友有能量可以收取 userId = " +userId);
317 |
318 | if (!mFriendsRankUseridList.contains(userId)) {
319 | mFriendsRankUseridList.add(userId);
320 | }
321 |
322 | //直接获取好友能量信息
323 | rpcCall_CanCollectEnergy(loader, userId);
324 | }
325 | }
326 | } catch (Exception e) {
327 | LogUtil.e("parseFriendBankDataResponse error " + e.getMessage());
328 | return false;
329 | }
330 | return true;
331 | }
332 |
333 | private static void finishWork() {
334 | LogUtil.d("finishWork");
335 | LogUtil.d("总共搜集了 "+ mCollectionCount + " g 能量") ;
336 |
337 |
338 |
339 |
340 |
341 | }
342 |
343 | /**
344 | * 收取能量请求
345 | *
346 | * @param loader
347 | * @param userId
348 | * @param bubbleId rpcCall: params:alipay.antmember.forest.h5.collectEnergy,
349 | * [{"av":"5","bubbleIds":[118863443],"ct":"android","userId":2088702958481141}],,true,{},null,false,com.alipay.mobile.nebulacore.core.H5PageImpl@c2fd6ef,0,,false,-1
350 | */
351 | public static void rpcCall_CollectEnergy(final ClassLoader loader, String userId, Long bubbleId) {
352 | try {
353 | Method rpcCallMethod = getRpcCallMethod(loader);
354 | JSONArray jsonArray = new JSONArray();
355 | JSONObject json = new JSONObject();
356 | json.put("av", "5");
357 | json.put("bubbleIds", bubbleId);
358 | json.put("ct", "android");
359 | json.put("userId", userId);
360 | jsonArray.put(json);
361 | LogUtil.d("rpcCall_CollectEnergy 参数:" + jsonArray);
362 |
363 | rpcCallMethod.invoke(null, "alipay.antmember.forest.h5.collectEnergy",
364 | jsonArray.toString(),
365 | "", true, null, null, false, curH5PageImpl, 0, "", false, -1);
366 |
367 | } catch (Exception e) {
368 | LogUtil.e(" rpcCall_CollectEnergy error : " + e.getMessage());
369 | }
370 | }
371 |
372 | /**
373 | * 是否是收取能量的数据
374 | * @return
375 | */
376 | public static boolean isCollectResult(String response) {
377 | try {
378 | CollectionResultBean collectionResultBean = new Gson().fromJson(response, CollectionResultBean.class);
379 | if (collectionResultBean.getFailedBubbleIds() == null ||
380 | collectionResultBean.getTreeEnergy() == null){
381 | return false;
382 | }
383 | } catch (Exception e) {
384 | LogUtil.e("格式化失败 isCollectResult " + e.getMessage());
385 | return false;
386 | }
387 |
388 | return true;
389 | }
390 |
391 | /**
392 | * 计算收集了多少能量
393 | * @param response
394 | */
395 | public static void calcuCollectionResult(String response) {
396 | LogUtil.d("收能量结果解析");
397 | CollectionResultBean collectionResultBean = new Gson().fromJson(response, CollectionResultBean.class);
398 | if (collectionResultBean.getResultCode().equalsIgnoreCase("SUCCESS") || collectionResultBean.isSuccess()){
399 | for (CollectionResultBean.BubblesBean bubblesBean : collectionResultBean.getBubbles()) {
400 | int collectedEnergy = bubblesBean.getCollectedEnergy();
401 | LogUtil.d("成功收集能量 "+ collectedEnergy);
402 | mCollectionCount += collectedEnergy;
403 |
404 | }
405 | }else {
406 | LogUtil.e("收取能量失败");
407 | }
408 |
409 | }
410 |
411 |
412 | private static void toast(ClassLoader loader, final String test){
413 |
414 | try {
415 | Class> h5Utils = loader.loadClass("com.alipay.mobile.nebula.util.H5Utils");
416 | Method getContext = h5Utils.getMethod("getContext");
417 | getContext.setAccessible(true);
418 | final Object result = getContext.invoke(null);
419 |
420 | MainModule.mHandler.post(new Runnable() {
421 | @Override
422 | public void run() {
423 | Toast.makeText((Context)result,test,Toast.LENGTH_LONG).show();
424 | }
425 | });
426 |
427 |
428 | } catch (Exception e) {
429 | e.printStackTrace();
430 | LogUtil.e("toast 失败 "+ e.getMessage());
431 | }
432 | }
433 |
434 |
435 |
436 | //stealingAnimal
437 |
438 | }
439 |
--------------------------------------------------------------------------------
/app/src/main/java/com/lanshifu/xposeddemo/bean/CollectionResultBean.java:
--------------------------------------------------------------------------------
1 | package com.lanshifu.xposeddemo.bean;
2 |
3 | import java.util.List;
4 |
5 | /**
6 | * 收取能量结果
7 | * Created by lanshifu on 2018/9/30.
8 | */
9 |
10 | public class CollectionResultBean {
11 | /**
12 | * bubbles : [{"business":{"bizType":"xianxiazhifu","id":0},"canHelpCollect":false,"collected":false,"collectedEnergy":1,"collectorUserId":"2088702893665066","fullEnergy":5,"id":114934686,"insufficient":false,"noShow":false,"produceTime":1538107146000,"remainEnergy":3,"robbedToday":false,"unavailable":false,"userId":"2088902124760652","waiting":false,"wastedEnergy":0}]
13 | * crossPhase : false
14 | * failedBubbleIds : []
15 | * resultCode : SUCCESS
16 | * resultDesc : 成功
17 | * retriable : false
18 | * success : true
19 | * treeEnergy : {"alias":"shijie","allPhases":[{"index":1,"maxPercent":0,"minPercent":0,"needEnergy":0},{"index":2,"maxPercent":0,"minPercent":0,"needEnergy":895},{"index":3,"maxPercent":0,"minPercent":0,"needEnergy":2685},{"index":4,"maxPercent":0,"minPercent":0,"needEnergy":5370},{"index":5,"maxPercent":0,"minPercent":0,"needEnergy":8950},{"index":6,"maxPercent":0,"minPercent":0,"needEnergy":12530},{"index":7,"maxPercent":200,"minPercent":100,"needEnergy":999999999}],"certificateId":"HE170406222927660566398207","currentEnergy":4463,"currentPhase":{"index":3,"maxPercent":0,"minPercent":0,"needEnergy":2685},"distance":907,"fullEnergy":999999999,"id":535544,"nextPhase":{"index":4,"maxPercent":0,"minPercent":0,"needEnergy":5370},"projectId":0,"templateId":2,"treeName":"世界树","type":"COLLECT","userId":"2088702893665066"}
20 | */
21 |
22 | private boolean crossPhase;
23 | private String resultCode;
24 | private String resultDesc;
25 | private boolean retriable;
26 | private boolean success;
27 | private TreeEnergyBean treeEnergy;
28 | private List bubbles;
29 | private List> failedBubbleIds;
30 |
31 | public boolean isCrossPhase() {
32 | return crossPhase;
33 | }
34 |
35 | public void setCrossPhase(boolean crossPhase) {
36 | this.crossPhase = crossPhase;
37 | }
38 |
39 | public String getResultCode() {
40 | return resultCode;
41 | }
42 |
43 | public void setResultCode(String resultCode) {
44 | this.resultCode = resultCode;
45 | }
46 |
47 | public String getResultDesc() {
48 | return resultDesc;
49 | }
50 |
51 | public void setResultDesc(String resultDesc) {
52 | this.resultDesc = resultDesc;
53 | }
54 |
55 | public boolean isRetriable() {
56 | return retriable;
57 | }
58 |
59 | public void setRetriable(boolean retriable) {
60 | this.retriable = retriable;
61 | }
62 |
63 | public boolean isSuccess() {
64 | return success;
65 | }
66 |
67 | public void setSuccess(boolean success) {
68 | this.success = success;
69 | }
70 |
71 | public TreeEnergyBean getTreeEnergy() {
72 | return treeEnergy;
73 | }
74 |
75 | public void setTreeEnergy(TreeEnergyBean treeEnergy) {
76 | this.treeEnergy = treeEnergy;
77 | }
78 |
79 | public List getBubbles() {
80 | return bubbles;
81 | }
82 |
83 | public void setBubbles(List bubbles) {
84 | this.bubbles = bubbles;
85 | }
86 |
87 | public List> getFailedBubbleIds() {
88 | return failedBubbleIds;
89 | }
90 |
91 | public void setFailedBubbleIds(List> failedBubbleIds) {
92 | this.failedBubbleIds = failedBubbleIds;
93 | }
94 |
95 | public static class TreeEnergyBean {
96 | /**
97 | * alias : shijie
98 | * allPhases : [{"index":1,"maxPercent":0,"minPercent":0,"needEnergy":0},{"index":2,"maxPercent":0,"minPercent":0,"needEnergy":895},{"index":3,"maxPercent":0,"minPercent":0,"needEnergy":2685},{"index":4,"maxPercent":0,"minPercent":0,"needEnergy":5370},{"index":5,"maxPercent":0,"minPercent":0,"needEnergy":8950},{"index":6,"maxPercent":0,"minPercent":0,"needEnergy":12530},{"index":7,"maxPercent":200,"minPercent":100,"needEnergy":999999999}]
99 | * certificateId : HE170406222927660566398207
100 | * currentEnergy : 4463
101 | * currentPhase : {"index":3,"maxPercent":0,"minPercent":0,"needEnergy":2685}
102 | * distance : 907
103 | * fullEnergy : 999999999
104 | * id : 535544
105 | * nextPhase : {"index":4,"maxPercent":0,"minPercent":0,"needEnergy":5370}
106 | * projectId : 0
107 | * templateId : 2
108 | * treeName : 世界树
109 | * type : COLLECT
110 | * userId : 2088702893665066
111 | */
112 |
113 | private String alias;
114 | private String certificateId;
115 | private int currentEnergy;
116 | private CurrentPhaseBean currentPhase;
117 | private int distance;
118 | private int fullEnergy;
119 | private int id;
120 | private NextPhaseBean nextPhase;
121 | private int projectId;
122 | private int templateId;
123 | private String treeName;
124 | private String type;
125 | private String userId;
126 | private List allPhases;
127 |
128 | public String getAlias() {
129 | return alias;
130 | }
131 |
132 | public void setAlias(String alias) {
133 | this.alias = alias;
134 | }
135 |
136 | public String getCertificateId() {
137 | return certificateId;
138 | }
139 |
140 | public void setCertificateId(String certificateId) {
141 | this.certificateId = certificateId;
142 | }
143 |
144 | public int getCurrentEnergy() {
145 | return currentEnergy;
146 | }
147 |
148 | public void setCurrentEnergy(int currentEnergy) {
149 | this.currentEnergy = currentEnergy;
150 | }
151 |
152 | public CurrentPhaseBean getCurrentPhase() {
153 | return currentPhase;
154 | }
155 |
156 | public void setCurrentPhase(CurrentPhaseBean currentPhase) {
157 | this.currentPhase = currentPhase;
158 | }
159 |
160 | public int getDistance() {
161 | return distance;
162 | }
163 |
164 | public void setDistance(int distance) {
165 | this.distance = distance;
166 | }
167 |
168 | public int getFullEnergy() {
169 | return fullEnergy;
170 | }
171 |
172 | public void setFullEnergy(int fullEnergy) {
173 | this.fullEnergy = fullEnergy;
174 | }
175 |
176 | public int getId() {
177 | return id;
178 | }
179 |
180 | public void setId(int id) {
181 | this.id = id;
182 | }
183 |
184 | public NextPhaseBean getNextPhase() {
185 | return nextPhase;
186 | }
187 |
188 | public void setNextPhase(NextPhaseBean nextPhase) {
189 | this.nextPhase = nextPhase;
190 | }
191 |
192 | public int getProjectId() {
193 | return projectId;
194 | }
195 |
196 | public void setProjectId(int projectId) {
197 | this.projectId = projectId;
198 | }
199 |
200 | public int getTemplateId() {
201 | return templateId;
202 | }
203 |
204 | public void setTemplateId(int templateId) {
205 | this.templateId = templateId;
206 | }
207 |
208 | public String getTreeName() {
209 | return treeName;
210 | }
211 |
212 | public void setTreeName(String treeName) {
213 | this.treeName = treeName;
214 | }
215 |
216 | public String getType() {
217 | return type;
218 | }
219 |
220 | public void setType(String type) {
221 | this.type = type;
222 | }
223 |
224 | public String getUserId() {
225 | return userId;
226 | }
227 |
228 | public void setUserId(String userId) {
229 | this.userId = userId;
230 | }
231 |
232 | public List getAllPhases() {
233 | return allPhases;
234 | }
235 |
236 | public void setAllPhases(List allPhases) {
237 | this.allPhases = allPhases;
238 | }
239 |
240 | public static class CurrentPhaseBean {
241 | /**
242 | * index : 3
243 | * maxPercent : 0
244 | * minPercent : 0
245 | * needEnergy : 2685
246 | */
247 |
248 | private int index;
249 | private int maxPercent;
250 | private int minPercent;
251 | private int needEnergy;
252 |
253 | public int getIndex() {
254 | return index;
255 | }
256 |
257 | public void setIndex(int index) {
258 | this.index = index;
259 | }
260 |
261 | public int getMaxPercent() {
262 | return maxPercent;
263 | }
264 |
265 | public void setMaxPercent(int maxPercent) {
266 | this.maxPercent = maxPercent;
267 | }
268 |
269 | public int getMinPercent() {
270 | return minPercent;
271 | }
272 |
273 | public void setMinPercent(int minPercent) {
274 | this.minPercent = minPercent;
275 | }
276 |
277 | public int getNeedEnergy() {
278 | return needEnergy;
279 | }
280 |
281 | public void setNeedEnergy(int needEnergy) {
282 | this.needEnergy = needEnergy;
283 | }
284 | }
285 |
286 | public static class NextPhaseBean {
287 | /**
288 | * index : 4
289 | * maxPercent : 0
290 | * minPercent : 0
291 | * needEnergy : 5370
292 | */
293 |
294 | private int index;
295 | private int maxPercent;
296 | private int minPercent;
297 | private int needEnergy;
298 |
299 | public int getIndex() {
300 | return index;
301 | }
302 |
303 | public void setIndex(int index) {
304 | this.index = index;
305 | }
306 |
307 | public int getMaxPercent() {
308 | return maxPercent;
309 | }
310 |
311 | public void setMaxPercent(int maxPercent) {
312 | this.maxPercent = maxPercent;
313 | }
314 |
315 | public int getMinPercent() {
316 | return minPercent;
317 | }
318 |
319 | public void setMinPercent(int minPercent) {
320 | this.minPercent = minPercent;
321 | }
322 |
323 | public int getNeedEnergy() {
324 | return needEnergy;
325 | }
326 |
327 | public void setNeedEnergy(int needEnergy) {
328 | this.needEnergy = needEnergy;
329 | }
330 | }
331 |
332 | public static class AllPhasesBean {
333 | /**
334 | * index : 1
335 | * maxPercent : 0
336 | * minPercent : 0
337 | * needEnergy : 0
338 | */
339 |
340 | private int index;
341 | private int maxPercent;
342 | private int minPercent;
343 | private int needEnergy;
344 |
345 | public int getIndex() {
346 | return index;
347 | }
348 |
349 | public void setIndex(int index) {
350 | this.index = index;
351 | }
352 |
353 | public int getMaxPercent() {
354 | return maxPercent;
355 | }
356 |
357 | public void setMaxPercent(int maxPercent) {
358 | this.maxPercent = maxPercent;
359 | }
360 |
361 | public int getMinPercent() {
362 | return minPercent;
363 | }
364 |
365 | public void setMinPercent(int minPercent) {
366 | this.minPercent = minPercent;
367 | }
368 |
369 | public int getNeedEnergy() {
370 | return needEnergy;
371 | }
372 |
373 | public void setNeedEnergy(int needEnergy) {
374 | this.needEnergy = needEnergy;
375 | }
376 | }
377 | }
378 |
379 | public static class BubblesBean {
380 | /**
381 | * business : {"bizType":"xianxiazhifu","id":0}
382 | * canHelpCollect : false
383 | * collected : false
384 | * collectedEnergy : 1
385 | * collectorUserId : 2088702893665066
386 | * fullEnergy : 5
387 | * id : 114934686
388 | * insufficient : false
389 | * noShow : false
390 | * produceTime : 1538107146000
391 | * remainEnergy : 3
392 | * robbedToday : false
393 | * unavailable : false
394 | * userId : 2088902124760652
395 | * waiting : false
396 | * wastedEnergy : 0
397 | */
398 |
399 | private BusinessBean business;
400 | private boolean canHelpCollect;
401 | private boolean collected;
402 | private int collectedEnergy;
403 | private String collectorUserId;
404 | private int fullEnergy;
405 | private int id;
406 | private boolean insufficient;
407 | private boolean noShow;
408 | private long produceTime;
409 | private int remainEnergy;
410 | private boolean robbedToday;
411 | private boolean unavailable;
412 | private String userId;
413 | private boolean waiting;
414 | private int wastedEnergy;
415 |
416 | public BusinessBean getBusiness() {
417 | return business;
418 | }
419 |
420 | public void setBusiness(BusinessBean business) {
421 | this.business = business;
422 | }
423 |
424 | public boolean isCanHelpCollect() {
425 | return canHelpCollect;
426 | }
427 |
428 | public void setCanHelpCollect(boolean canHelpCollect) {
429 | this.canHelpCollect = canHelpCollect;
430 | }
431 |
432 | public boolean isCollected() {
433 | return collected;
434 | }
435 |
436 | public void setCollected(boolean collected) {
437 | this.collected = collected;
438 | }
439 |
440 | public int getCollectedEnergy() {
441 | return collectedEnergy;
442 | }
443 |
444 | public void setCollectedEnergy(int collectedEnergy) {
445 | this.collectedEnergy = collectedEnergy;
446 | }
447 |
448 | public String getCollectorUserId() {
449 | return collectorUserId;
450 | }
451 |
452 | public void setCollectorUserId(String collectorUserId) {
453 | this.collectorUserId = collectorUserId;
454 | }
455 |
456 | public int getFullEnergy() {
457 | return fullEnergy;
458 | }
459 |
460 | public void setFullEnergy(int fullEnergy) {
461 | this.fullEnergy = fullEnergy;
462 | }
463 |
464 | public int getId() {
465 | return id;
466 | }
467 |
468 | public void setId(int id) {
469 | this.id = id;
470 | }
471 |
472 | public boolean isInsufficient() {
473 | return insufficient;
474 | }
475 |
476 | public void setInsufficient(boolean insufficient) {
477 | this.insufficient = insufficient;
478 | }
479 |
480 | public boolean isNoShow() {
481 | return noShow;
482 | }
483 |
484 | public void setNoShow(boolean noShow) {
485 | this.noShow = noShow;
486 | }
487 |
488 | public long getProduceTime() {
489 | return produceTime;
490 | }
491 |
492 | public void setProduceTime(long produceTime) {
493 | this.produceTime = produceTime;
494 | }
495 |
496 | public int getRemainEnergy() {
497 | return remainEnergy;
498 | }
499 |
500 | public void setRemainEnergy(int remainEnergy) {
501 | this.remainEnergy = remainEnergy;
502 | }
503 |
504 | public boolean isRobbedToday() {
505 | return robbedToday;
506 | }
507 |
508 | public void setRobbedToday(boolean robbedToday) {
509 | this.robbedToday = robbedToday;
510 | }
511 |
512 | public boolean isUnavailable() {
513 | return unavailable;
514 | }
515 |
516 | public void setUnavailable(boolean unavailable) {
517 | this.unavailable = unavailable;
518 | }
519 |
520 | public String getUserId() {
521 | return userId;
522 | }
523 |
524 | public void setUserId(String userId) {
525 | this.userId = userId;
526 | }
527 |
528 | public boolean isWaiting() {
529 | return waiting;
530 | }
531 |
532 | public void setWaiting(boolean waiting) {
533 | this.waiting = waiting;
534 | }
535 |
536 | public int getWastedEnergy() {
537 | return wastedEnergy;
538 | }
539 |
540 | public void setWastedEnergy(int wastedEnergy) {
541 | this.wastedEnergy = wastedEnergy;
542 | }
543 |
544 | public static class BusinessBean {
545 | /**
546 | * bizType : xianxiazhifu
547 | * id : 0
548 | */
549 |
550 | private String bizType;
551 | private int id;
552 |
553 | public String getBizType() {
554 | return bizType;
555 | }
556 |
557 | public void setBizType(String bizType) {
558 | this.bizType = bizType;
559 | }
560 |
561 | public int getId() {
562 | return id;
563 | }
564 |
565 | public void setId(int id) {
566 | this.id = id;
567 | }
568 | }
569 | }
570 | }
571 |
--------------------------------------------------------------------------------
/app/src/main/java/com/lanshifu/xposeddemo/bean/FriendDetailBean.java:
--------------------------------------------------------------------------------
1 | package com.lanshifu.xposeddemo.bean;
2 |
3 | import java.util.List;
4 |
5 | /**
6 | * 好友详情,查看哪些能量可收,id
7 | * Created by lanshifu on 2018/9/29.
8 | */
9 |
10 | public class FriendDetailBean {
11 |
12 | /**
13 | * bizNo : 03eb85f4-74db-471a-9b6f-62daa367fe75-1538232687951
14 | * bubbles : [{"business":{"bigIconDisplayName":"线下支付","bizType":"xianxiazhifu","dayIconUrl":"https://zos.alipayobjects.com/rmsportal/yTDRgLNTIRQYhOP.png","id":7,"nightIconUrl":"https://zos.alipayobjects.com/rmsportal/RWtkxNvBYnuZylq.png","smallIconDisplayName":"线下支付"},"canHelpCollect":false,"collectStatus":"AVAILABLE","fullEnergy":5,"id":117651384,"produceTime":1538193587000,"remainEnergy":3,"userId":"2088702893665066"}]
15 | * combineHandlerVOMap : {"eventConfig":{"resultCode":"LOW_VERSION","resultDesc":"系统繁忙,请稍后重试","success":true},"plantTreeCount":{"resultCode":"LOW_VERSION","resultDesc":"系统繁忙,请稍后重试","success":true}}
16 | * needGuide : false
17 | * nextAction : Cultivate
18 | * now : 1538232687950
19 | * properties : {"antfarmEntry":"Y","degradeSendCustomizedBarrage":"Y","exchangeMode":"Y","lastLogin":"1538152298980","weather":"Y"}
20 | * resultCode : SUCCESS
21 | * resultDesc : 成功
22 | * retriable : false
23 | * success : true
24 | * totalActivityCertificates : 0
25 | * treeEnergy : {"alias":"shijie","allPhases":[{"index":1,"maxPercent":0,"minPercent":0,"needEnergy":0},{"index":2,"maxPercent":0,"minPercent":0,"needEnergy":895},{"index":3,"maxPercent":0,"minPercent":0,"needEnergy":2685},{"index":4,"maxPercent":0,"minPercent":0,"needEnergy":5370},{"index":5,"maxPercent":0,"minPercent":0,"needEnergy":8950},{"index":6,"maxPercent":0,"minPercent":0,"needEnergy":12530},{"index":7,"maxPercent":200,"minPercent":100,"needEnergy":999999999}],"certificateId":"HE170406222927660566398207","currentEnergy":4589,"currentPhase":{"index":3,"maxPercent":0,"minPercent":0,"needEnergy":2685},"distance":781,"fullEnergy":999999999,"id":535544,"nextPhase":{"index":4,"maxPercent":0,"minPercent":0,"needEnergy":5370},"projectId":0,"templateId":2,"treeName":"世界树","type":"COLLECT","userId":"2088702893665066"}
26 | * userEnergy : {"canCollectEnergy":false,"canCollectLaterTime":-1,"canHelpCollect":false,"collectableBubbleCount":0,"displayName":"蓝晓彬","energySummation":4669,"forestUser":false,"headPortrait":"","realName":true,"treeAmount":0,"userId":"2088702893665066"}
27 | * usingUserProps : []
28 | */
29 |
30 | private String bizNo;
31 | private CombineHandlerVOMapBean combineHandlerVOMap;
32 | private boolean needGuide;
33 | private String nextAction;
34 | private long now;
35 | private PropertiesBean properties;
36 | private String resultCode;
37 | private String resultDesc;
38 | private boolean retriable;
39 | private boolean success;
40 | private int totalActivityCertificates;
41 | private TreeEnergyBean treeEnergy;
42 | private UserEnergyBean userEnergy;
43 | private List bubbles;
44 | private List> usingUserProps;
45 |
46 | public String getBizNo() {
47 | return bizNo;
48 | }
49 |
50 | public void setBizNo(String bizNo) {
51 | this.bizNo = bizNo;
52 | }
53 |
54 | public CombineHandlerVOMapBean getCombineHandlerVOMap() {
55 | return combineHandlerVOMap;
56 | }
57 |
58 | public void setCombineHandlerVOMap(CombineHandlerVOMapBean combineHandlerVOMap) {
59 | this.combineHandlerVOMap = combineHandlerVOMap;
60 | }
61 |
62 | public boolean isNeedGuide() {
63 | return needGuide;
64 | }
65 |
66 | public void setNeedGuide(boolean needGuide) {
67 | this.needGuide = needGuide;
68 | }
69 |
70 | public String getNextAction() {
71 | return nextAction;
72 | }
73 |
74 | public void setNextAction(String nextAction) {
75 | this.nextAction = nextAction;
76 | }
77 |
78 | public long getNow() {
79 | return now;
80 | }
81 |
82 | public void setNow(long now) {
83 | this.now = now;
84 | }
85 |
86 | public PropertiesBean getProperties() {
87 | return properties;
88 | }
89 |
90 | public void setProperties(PropertiesBean properties) {
91 | this.properties = properties;
92 | }
93 |
94 | public String getResultCode() {
95 | return resultCode;
96 | }
97 |
98 | public void setResultCode(String resultCode) {
99 | this.resultCode = resultCode;
100 | }
101 |
102 | public String getResultDesc() {
103 | return resultDesc;
104 | }
105 |
106 | public void setResultDesc(String resultDesc) {
107 | this.resultDesc = resultDesc;
108 | }
109 |
110 | public boolean isRetriable() {
111 | return retriable;
112 | }
113 |
114 | public void setRetriable(boolean retriable) {
115 | this.retriable = retriable;
116 | }
117 |
118 | public boolean isSuccess() {
119 | return success;
120 | }
121 |
122 | public void setSuccess(boolean success) {
123 | this.success = success;
124 | }
125 |
126 | public int getTotalActivityCertificates() {
127 | return totalActivityCertificates;
128 | }
129 |
130 | public void setTotalActivityCertificates(int totalActivityCertificates) {
131 | this.totalActivityCertificates = totalActivityCertificates;
132 | }
133 |
134 | public TreeEnergyBean getTreeEnergy() {
135 | return treeEnergy;
136 | }
137 |
138 | public void setTreeEnergy(TreeEnergyBean treeEnergy) {
139 | this.treeEnergy = treeEnergy;
140 | }
141 |
142 | public UserEnergyBean getUserEnergy() {
143 | return userEnergy;
144 | }
145 |
146 | public void setUserEnergy(UserEnergyBean userEnergy) {
147 | this.userEnergy = userEnergy;
148 | }
149 |
150 | public List getBubbles() {
151 | return bubbles;
152 | }
153 |
154 | public void setBubbles(List bubbles) {
155 | this.bubbles = bubbles;
156 | }
157 |
158 | public List> getUsingUserProps() {
159 | return usingUserProps;
160 | }
161 |
162 | public void setUsingUserProps(List> usingUserProps) {
163 | this.usingUserProps = usingUserProps;
164 | }
165 |
166 | public static class CombineHandlerVOMapBean {
167 | /**
168 | * eventConfig : {"resultCode":"LOW_VERSION","resultDesc":"系统繁忙,请稍后重试","success":true}
169 | * plantTreeCount : {"resultCode":"LOW_VERSION","resultDesc":"系统繁忙,请稍后重试","success":true}
170 | */
171 |
172 | private EventConfigBean eventConfig;
173 | private PlantTreeCountBean plantTreeCount;
174 |
175 | public EventConfigBean getEventConfig() {
176 | return eventConfig;
177 | }
178 |
179 | public void setEventConfig(EventConfigBean eventConfig) {
180 | this.eventConfig = eventConfig;
181 | }
182 |
183 | public PlantTreeCountBean getPlantTreeCount() {
184 | return plantTreeCount;
185 | }
186 |
187 | public void setPlantTreeCount(PlantTreeCountBean plantTreeCount) {
188 | this.plantTreeCount = plantTreeCount;
189 | }
190 |
191 | public static class EventConfigBean {
192 | /**
193 | * resultCode : LOW_VERSION
194 | * resultDesc : 系统繁忙,请稍后重试
195 | * success : true
196 | */
197 |
198 | private String resultCode;
199 | private String resultDesc;
200 | private boolean success;
201 |
202 | public String getResultCode() {
203 | return resultCode;
204 | }
205 |
206 | public void setResultCode(String resultCode) {
207 | this.resultCode = resultCode;
208 | }
209 |
210 | public String getResultDesc() {
211 | return resultDesc;
212 | }
213 |
214 | public void setResultDesc(String resultDesc) {
215 | this.resultDesc = resultDesc;
216 | }
217 |
218 | public boolean isSuccess() {
219 | return success;
220 | }
221 |
222 | public void setSuccess(boolean success) {
223 | this.success = success;
224 | }
225 | }
226 |
227 | public static class PlantTreeCountBean {
228 | /**
229 | * resultCode : LOW_VERSION
230 | * resultDesc : 系统繁忙,请稍后重试
231 | * success : true
232 | */
233 |
234 | private String resultCode;
235 | private String resultDesc;
236 | private boolean success;
237 |
238 | public String getResultCode() {
239 | return resultCode;
240 | }
241 |
242 | public void setResultCode(String resultCode) {
243 | this.resultCode = resultCode;
244 | }
245 |
246 | public String getResultDesc() {
247 | return resultDesc;
248 | }
249 |
250 | public void setResultDesc(String resultDesc) {
251 | this.resultDesc = resultDesc;
252 | }
253 |
254 | public boolean isSuccess() {
255 | return success;
256 | }
257 |
258 | public void setSuccess(boolean success) {
259 | this.success = success;
260 | }
261 | }
262 | }
263 |
264 | public static class PropertiesBean {
265 | /**
266 | * antfarmEntry : Y
267 | * degradeSendCustomizedBarrage : Y
268 | * exchangeMode : Y
269 | * lastLogin : 1538152298980
270 | * weather : Y
271 | */
272 |
273 | private String antfarmEntry;
274 | private String degradeSendCustomizedBarrage;
275 | private String exchangeMode;
276 | private String lastLogin;
277 | private String weather;
278 |
279 | public String getAntfarmEntry() {
280 | return antfarmEntry;
281 | }
282 |
283 | public void setAntfarmEntry(String antfarmEntry) {
284 | this.antfarmEntry = antfarmEntry;
285 | }
286 |
287 | public String getDegradeSendCustomizedBarrage() {
288 | return degradeSendCustomizedBarrage;
289 | }
290 |
291 | public void setDegradeSendCustomizedBarrage(String degradeSendCustomizedBarrage) {
292 | this.degradeSendCustomizedBarrage = degradeSendCustomizedBarrage;
293 | }
294 |
295 | public String getExchangeMode() {
296 | return exchangeMode;
297 | }
298 |
299 | public void setExchangeMode(String exchangeMode) {
300 | this.exchangeMode = exchangeMode;
301 | }
302 |
303 | public String getLastLogin() {
304 | return lastLogin;
305 | }
306 |
307 | public void setLastLogin(String lastLogin) {
308 | this.lastLogin = lastLogin;
309 | }
310 |
311 | public String getWeather() {
312 | return weather;
313 | }
314 |
315 | public void setWeather(String weather) {
316 | this.weather = weather;
317 | }
318 | }
319 |
320 | public static class TreeEnergyBean {
321 | /**
322 | * alias : shijie
323 | * allPhases : [{"index":1,"maxPercent":0,"minPercent":0,"needEnergy":0},{"index":2,"maxPercent":0,"minPercent":0,"needEnergy":895},{"index":3,"maxPercent":0,"minPercent":0,"needEnergy":2685},{"index":4,"maxPercent":0,"minPercent":0,"needEnergy":5370},{"index":5,"maxPercent":0,"minPercent":0,"needEnergy":8950},{"index":6,"maxPercent":0,"minPercent":0,"needEnergy":12530},{"index":7,"maxPercent":200,"minPercent":100,"needEnergy":999999999}]
324 | * certificateId : HE170406222927660566398207
325 | * currentEnergy : 4589
326 | * currentPhase : {"index":3,"maxPercent":0,"minPercent":0,"needEnergy":2685}
327 | * distance : 781
328 | * fullEnergy : 999999999
329 | * id : 535544
330 | * nextPhase : {"index":4,"maxPercent":0,"minPercent":0,"needEnergy":5370}
331 | * projectId : 0
332 | * templateId : 2
333 | * treeName : 世界树
334 | * type : COLLECT
335 | * userId : 2088702893665066
336 | */
337 |
338 | private String alias;
339 | private String certificateId;
340 | private int currentEnergy;
341 | private CurrentPhaseBean currentPhase;
342 | private int distance;
343 | private int fullEnergy;
344 | private int id;
345 | private NextPhaseBean nextPhase;
346 | private int projectId;
347 | private int templateId;
348 | private String treeName;
349 | private String type;
350 | private String userId;
351 | private List allPhases;
352 |
353 | public String getAlias() {
354 | return alias;
355 | }
356 |
357 | public void setAlias(String alias) {
358 | this.alias = alias;
359 | }
360 |
361 | public String getCertificateId() {
362 | return certificateId;
363 | }
364 |
365 | public void setCertificateId(String certificateId) {
366 | this.certificateId = certificateId;
367 | }
368 |
369 | public int getCurrentEnergy() {
370 | return currentEnergy;
371 | }
372 |
373 | public void setCurrentEnergy(int currentEnergy) {
374 | this.currentEnergy = currentEnergy;
375 | }
376 |
377 | public CurrentPhaseBean getCurrentPhase() {
378 | return currentPhase;
379 | }
380 |
381 | public void setCurrentPhase(CurrentPhaseBean currentPhase) {
382 | this.currentPhase = currentPhase;
383 | }
384 |
385 | public int getDistance() {
386 | return distance;
387 | }
388 |
389 | public void setDistance(int distance) {
390 | this.distance = distance;
391 | }
392 |
393 | public int getFullEnergy() {
394 | return fullEnergy;
395 | }
396 |
397 | public void setFullEnergy(int fullEnergy) {
398 | this.fullEnergy = fullEnergy;
399 | }
400 |
401 | public int getId() {
402 | return id;
403 | }
404 |
405 | public void setId(int id) {
406 | this.id = id;
407 | }
408 |
409 | public NextPhaseBean getNextPhase() {
410 | return nextPhase;
411 | }
412 |
413 | public void setNextPhase(NextPhaseBean nextPhase) {
414 | this.nextPhase = nextPhase;
415 | }
416 |
417 | public int getProjectId() {
418 | return projectId;
419 | }
420 |
421 | public void setProjectId(int projectId) {
422 | this.projectId = projectId;
423 | }
424 |
425 | public int getTemplateId() {
426 | return templateId;
427 | }
428 |
429 | public void setTemplateId(int templateId) {
430 | this.templateId = templateId;
431 | }
432 |
433 | public String getTreeName() {
434 | return treeName;
435 | }
436 |
437 | public void setTreeName(String treeName) {
438 | this.treeName = treeName;
439 | }
440 |
441 | public String getType() {
442 | return type;
443 | }
444 |
445 | public void setType(String type) {
446 | this.type = type;
447 | }
448 |
449 | public String getUserId() {
450 | return userId;
451 | }
452 |
453 | public void setUserId(String userId) {
454 | this.userId = userId;
455 | }
456 |
457 | public List getAllPhases() {
458 | return allPhases;
459 | }
460 |
461 | public void setAllPhases(List allPhases) {
462 | this.allPhases = allPhases;
463 | }
464 |
465 | public static class CurrentPhaseBean {
466 | /**
467 | * index : 3
468 | * maxPercent : 0
469 | * minPercent : 0
470 | * needEnergy : 2685
471 | */
472 |
473 | private int index;
474 | private int maxPercent;
475 | private int minPercent;
476 | private int needEnergy;
477 |
478 | public int getIndex() {
479 | return index;
480 | }
481 |
482 | public void setIndex(int index) {
483 | this.index = index;
484 | }
485 |
486 | public int getMaxPercent() {
487 | return maxPercent;
488 | }
489 |
490 | public void setMaxPercent(int maxPercent) {
491 | this.maxPercent = maxPercent;
492 | }
493 |
494 | public int getMinPercent() {
495 | return minPercent;
496 | }
497 |
498 | public void setMinPercent(int minPercent) {
499 | this.minPercent = minPercent;
500 | }
501 |
502 | public int getNeedEnergy() {
503 | return needEnergy;
504 | }
505 |
506 | public void setNeedEnergy(int needEnergy) {
507 | this.needEnergy = needEnergy;
508 | }
509 | }
510 |
511 | public static class NextPhaseBean {
512 | /**
513 | * index : 4
514 | * maxPercent : 0
515 | * minPercent : 0
516 | * needEnergy : 5370
517 | */
518 |
519 | private int index;
520 | private int maxPercent;
521 | private int minPercent;
522 | private int needEnergy;
523 |
524 | public int getIndex() {
525 | return index;
526 | }
527 |
528 | public void setIndex(int index) {
529 | this.index = index;
530 | }
531 |
532 | public int getMaxPercent() {
533 | return maxPercent;
534 | }
535 |
536 | public void setMaxPercent(int maxPercent) {
537 | this.maxPercent = maxPercent;
538 | }
539 |
540 | public int getMinPercent() {
541 | return minPercent;
542 | }
543 |
544 | public void setMinPercent(int minPercent) {
545 | this.minPercent = minPercent;
546 | }
547 |
548 | public int getNeedEnergy() {
549 | return needEnergy;
550 | }
551 |
552 | public void setNeedEnergy(int needEnergy) {
553 | this.needEnergy = needEnergy;
554 | }
555 | }
556 |
557 | public static class AllPhasesBean {
558 | /**
559 | * index : 1
560 | * maxPercent : 0
561 | * minPercent : 0
562 | * needEnergy : 0
563 | */
564 |
565 | private int index;
566 | private int maxPercent;
567 | private int minPercent;
568 | private int needEnergy;
569 |
570 | public int getIndex() {
571 | return index;
572 | }
573 |
574 | public void setIndex(int index) {
575 | this.index = index;
576 | }
577 |
578 | public int getMaxPercent() {
579 | return maxPercent;
580 | }
581 |
582 | public void setMaxPercent(int maxPercent) {
583 | this.maxPercent = maxPercent;
584 | }
585 |
586 | public int getMinPercent() {
587 | return minPercent;
588 | }
589 |
590 | public void setMinPercent(int minPercent) {
591 | this.minPercent = minPercent;
592 | }
593 |
594 | public int getNeedEnergy() {
595 | return needEnergy;
596 | }
597 |
598 | public void setNeedEnergy(int needEnergy) {
599 | this.needEnergy = needEnergy;
600 | }
601 | }
602 | }
603 |
604 | public static class UserEnergyBean {
605 | /**
606 | * canCollectEnergy : false
607 | * canCollectLaterTime : -1
608 | * canHelpCollect : false
609 | * collectableBubbleCount : 0
610 | * displayName : 蓝晓彬
611 | * energySummation : 4669
612 | * forestUser : false
613 | * headPortrait :
614 | * realName : true
615 | * treeAmount : 0
616 | * userId : 2088702893665066
617 | */
618 |
619 | private boolean canCollectEnergy;
620 | private int canCollectLaterTime;
621 | private boolean canHelpCollect;
622 | private int collectableBubbleCount;
623 | private String displayName;
624 | private int energySummation;
625 | private boolean forestUser;
626 | private String headPortrait;
627 | private boolean realName;
628 | private int treeAmount;
629 | private String userId;
630 |
631 | public boolean isCanCollectEnergy() {
632 | return canCollectEnergy;
633 | }
634 |
635 | public void setCanCollectEnergy(boolean canCollectEnergy) {
636 | this.canCollectEnergy = canCollectEnergy;
637 | }
638 |
639 | public int getCanCollectLaterTime() {
640 | return canCollectLaterTime;
641 | }
642 |
643 | public void setCanCollectLaterTime(int canCollectLaterTime) {
644 | this.canCollectLaterTime = canCollectLaterTime;
645 | }
646 |
647 | public boolean isCanHelpCollect() {
648 | return canHelpCollect;
649 | }
650 |
651 | public void setCanHelpCollect(boolean canHelpCollect) {
652 | this.canHelpCollect = canHelpCollect;
653 | }
654 |
655 | public int getCollectableBubbleCount() {
656 | return collectableBubbleCount;
657 | }
658 |
659 | public void setCollectableBubbleCount(int collectableBubbleCount) {
660 | this.collectableBubbleCount = collectableBubbleCount;
661 | }
662 |
663 | public String getDisplayName() {
664 | return displayName;
665 | }
666 |
667 | public void setDisplayName(String displayName) {
668 | this.displayName = displayName;
669 | }
670 |
671 | public int getEnergySummation() {
672 | return energySummation;
673 | }
674 |
675 | public void setEnergySummation(int energySummation) {
676 | this.energySummation = energySummation;
677 | }
678 |
679 | public boolean isForestUser() {
680 | return forestUser;
681 | }
682 |
683 | public void setForestUser(boolean forestUser) {
684 | this.forestUser = forestUser;
685 | }
686 |
687 | public String getHeadPortrait() {
688 | return headPortrait;
689 | }
690 |
691 | public void setHeadPortrait(String headPortrait) {
692 | this.headPortrait = headPortrait;
693 | }
694 |
695 | public boolean isRealName() {
696 | return realName;
697 | }
698 |
699 | public void setRealName(boolean realName) {
700 | this.realName = realName;
701 | }
702 |
703 | public int getTreeAmount() {
704 | return treeAmount;
705 | }
706 |
707 | public void setTreeAmount(int treeAmount) {
708 | this.treeAmount = treeAmount;
709 | }
710 |
711 | public String getUserId() {
712 | return userId;
713 | }
714 |
715 | public void setUserId(String userId) {
716 | this.userId = userId;
717 | }
718 | }
719 |
720 | public static class BubblesBean {
721 | /**
722 | * business : {"bigIconDisplayName":"线下支付","bizType":"xianxiazhifu","dayIconUrl":"https://zos.alipayobjects.com/rmsportal/yTDRgLNTIRQYhOP.png","id":7,"nightIconUrl":"https://zos.alipayobjects.com/rmsportal/RWtkxNvBYnuZylq.png","smallIconDisplayName":"线下支付"}
723 | * canHelpCollect : false
724 | * collectStatus : AVAILABLE
725 | * fullEnergy : 5
726 | * id : 117651384
727 | * produceTime : 1538193587000
728 | * remainEnergy : 3
729 | * userId : 2088702893665066
730 | */
731 |
732 | private BusinessBean business;
733 | private boolean canHelpCollect;
734 | private String collectStatus;
735 | private int fullEnergy;
736 | private long id;
737 | private long produceTime;
738 | private int remainEnergy;
739 | private String userId;
740 |
741 | public BusinessBean getBusiness() {
742 | return business;
743 | }
744 |
745 | public void setBusiness(BusinessBean business) {
746 | this.business = business;
747 | }
748 |
749 | public boolean isCanHelpCollect() {
750 | return canHelpCollect;
751 | }
752 |
753 | public void setCanHelpCollect(boolean canHelpCollect) {
754 | this.canHelpCollect = canHelpCollect;
755 | }
756 |
757 | public String getCollectStatus() {
758 | return collectStatus;
759 | }
760 |
761 | public void setCollectStatus(String collectStatus) {
762 | this.collectStatus = collectStatus;
763 | }
764 |
765 | public int getFullEnergy() {
766 | return fullEnergy;
767 | }
768 |
769 | public void setFullEnergy(int fullEnergy) {
770 | this.fullEnergy = fullEnergy;
771 | }
772 |
773 | public long getId() {
774 | return id;
775 | }
776 |
777 | public void setId(long id) {
778 | this.id = id;
779 | }
780 |
781 | public long getProduceTime() {
782 | return produceTime;
783 | }
784 |
785 | public void setProduceTime(long produceTime) {
786 | this.produceTime = produceTime;
787 | }
788 |
789 | public int getRemainEnergy() {
790 | return remainEnergy;
791 | }
792 |
793 | public void setRemainEnergy(int remainEnergy) {
794 | this.remainEnergy = remainEnergy;
795 | }
796 |
797 | public String getUserId() {
798 | return userId;
799 | }
800 |
801 | public void setUserId(String userId) {
802 | this.userId = userId;
803 | }
804 |
805 | public static class BusinessBean {
806 | /**
807 | * bigIconDisplayName : 线下支付
808 | * bizType : xianxiazhifu
809 | * dayIconUrl : https://zos.alipayobjects.com/rmsportal/yTDRgLNTIRQYhOP.png
810 | * id : 7
811 | * nightIconUrl : https://zos.alipayobjects.com/rmsportal/RWtkxNvBYnuZylq.png
812 | * smallIconDisplayName : 线下支付
813 | */
814 |
815 | private String bigIconDisplayName;
816 | private String bizType;
817 | private String dayIconUrl;
818 | private int id;
819 | private String nightIconUrl;
820 | private String smallIconDisplayName;
821 |
822 | public String getBigIconDisplayName() {
823 | return bigIconDisplayName;
824 | }
825 |
826 | public void setBigIconDisplayName(String bigIconDisplayName) {
827 | this.bigIconDisplayName = bigIconDisplayName;
828 | }
829 |
830 | public String getBizType() {
831 | return bizType;
832 | }
833 |
834 | public void setBizType(String bizType) {
835 | this.bizType = bizType;
836 | }
837 |
838 | public String getDayIconUrl() {
839 | return dayIconUrl;
840 | }
841 |
842 | public void setDayIconUrl(String dayIconUrl) {
843 | this.dayIconUrl = dayIconUrl;
844 | }
845 |
846 | public int getId() {
847 | return id;
848 | }
849 |
850 | public void setId(int id) {
851 | this.id = id;
852 | }
853 |
854 | public String getNightIconUrl() {
855 | return nightIconUrl;
856 | }
857 |
858 | public void setNightIconUrl(String nightIconUrl) {
859 | this.nightIconUrl = nightIconUrl;
860 | }
861 |
862 | public String getSmallIconDisplayName() {
863 | return smallIconDisplayName;
864 | }
865 |
866 | public void setSmallIconDisplayName(String smallIconDisplayName) {
867 | this.smallIconDisplayName = smallIconDisplayName;
868 | }
869 | }
870 | }
871 | }
872 |
--------------------------------------------------------------------------------