Skip to content

Commit f309f77

Browse files
javabean新增toString()方法,确保MainActivity中的log能够打印正常,注释了HttpHelper里面没用到的方法
1 parent 8afb7b1 commit f309f77

9 files changed

Lines changed: 36 additions & 26 deletions

File tree

.idea/modules.xml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/main/java/com/lzw/httpprocessor/activity/MainActivity.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import android.os.Bundle;
44
import android.support.v7.app.AppCompatActivity;
5+
import android.util.Log;
56
import android.view.View;
67
import android.widget.Button;
78
import android.widget.TextView;
@@ -38,6 +39,7 @@ public void onClick(View v) {
3839
null, new HttpCallback<ExpressBean>() {
3940
@Override
4041
public void onSuccess(ExpressBean expressBean) {
42+
Log.i("onSuccess: ",expressBean.data.toString());
4143
StringBuffer sb = new StringBuffer();
4244
if(expressBean != null){
4345
ArrayList<ExpressBean.DataBean> datas = expressBean.data;

app/src/main/java/com/lzw/httpprocessor/app/MyApplication.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,6 @@
55
import com.lzw.httpprocessor.http.HttpHelper;
66
import com.lzw.httpprocessor.processor.VolleyProcessor;
77

8-
/**
9-
* 作者:Created by lzw
10-
* 时间:Created on 2017/6/11 0011 10:22
11-
* 邮箱:lzw20099002@126.com
12-
*/
13-
148
public class MyApplication extends Application {
159

1610
@Override

app/src/main/java/com/lzw/httpprocessor/bean/ExpressBean.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,34 @@ public class ExpressBean {
1717
public String state;//3
1818
public ArrayList<DataBean> data;
1919

20+
@Override
21+
public String toString() {
22+
return "ExpressBean{" +
23+
"message='" + message + '\'' +
24+
", nu='" + nu + '\'' +
25+
", ischeck='" + ischeck + '\'' +
26+
", condition='" + condition + '\'' +
27+
", com='" + com + '\'' +
28+
", status='" + status + '\'' +
29+
", state='" + state + '\'' +
30+
", data=" + data +
31+
'}';
32+
}
33+
2034
public static class DataBean {
2135
public String time;//2013-05-27 13:48:37
2236
public String ftime;//2013-05-27 13:48:37
2337
public String context;//派件已【签收】,签收人是【秦胜杰】签收网点是【北京人大分部】
2438
public String location;//
39+
40+
@Override
41+
public String toString() {
42+
return "DataBean{" +
43+
"time='" + time + '\'' +
44+
", ftime='" + ftime + '\'' +
45+
", context='" + context + '\'' +
46+
", location='" + location + '\'' +
47+
'}';
48+
}
2549
}
2650
}

app/src/main/java/com/lzw/httpprocessor/http/HttpHelper.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
/**
1010
* 代理类
1111
*/
12-
1312
public class HttpHelper implements IhttpProcessor {
1413

1514
private static IhttpProcessor mIhttpProcessor;
@@ -38,18 +37,18 @@ public static void init(IhttpProcessor httpProcessor){
3837

3938
@Override
4039
public void get(String url, Map<String, Object> params, ICallBack callback) {
41-
final String finalUrl = appendParams(url,params);
42-
mIhttpProcessor.get(finalUrl,params,callback);
40+
//final String finalUrl = appendParams(url,params);
41+
mIhttpProcessor.get(url,params,callback);
4342
}
4443

4544
@Override
4645
public void post(String url, Map<String, Object> params, ICallBack callback) {
47-
final String finalUrl = appendParams(url,params);
48-
mIhttpProcessor.post(finalUrl,params,callback);
46+
//final String finalUrl = appendParams(url,params);
47+
mIhttpProcessor.post(url,params,callback);
4948
}
5049

5150
//拼接url
5251
private String appendParams(String url, Map<String, Object> params){
53-
52+
return "";
5453
}
5554
}

app/src/main/java/com/lzw/httpprocessor/interfaces/ICallBack.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
package com.lzw.httpprocessor.interfaces;
22

3-
/**
4-
* 作者:Created by lzw
5-
* 时间:Created on 2017/6/11 0011 08:47
6-
* 邮箱:lzw20099002@126.com
7-
*/
83

94
public interface ICallBack {
105

app/src/main/java/com/lzw/httpprocessor/interfaces/IhttpProcessor.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22

33
import java.util.Map;
44

5-
/**
6-
* 作者:Created by lzw
7-
* 时间:Created on 2017/6/11 0011 08:44
8-
* 邮箱:lzw20099002@126.com
9-
*/
10-
115
public interface IhttpProcessor {
126
//GET请求
137
void get(String url, Map<String,Object> params,ICallBack callback);

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.3.1'
8+
classpath 'com.android.tools.build:gradle:2.3.3'
99

1010
// NOTE: Do not place your application dependencies here; they belong
1111
// in the individual module build.gradle files
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sun Jun 11 09:47:32 CST 2017
1+
#Fri Aug 04 13:42:07 CST 2017
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-3.5-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip

0 commit comments

Comments
 (0)