Skip to content

Commit fd57c32

Browse files
committed
code reformmat
1 parent 8604120 commit fd57c32

File tree

2 files changed

+73
-48
lines changed

2 files changed

+73
-48
lines changed

src/main/java/cn/jpush/api/report/MessagesResult.java

Lines changed: 50 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,48 +10,67 @@
1010
import java.util.List;
1111

1212
public class MessagesResult extends BaseResult {
13-
private static final Type MESSAGE_TYPE = new TypeToken<List<Message>>(){}.getType();
14-
15-
@Expose public List<Message> messages = new ArrayList<Message>();
16-
17-
public static class Message {
18-
@Expose public long msg_id;
19-
@Expose public Android android;
20-
@Expose public Ios ios;
21-
@Expose public Winphone winphone;
22-
}
23-
13+
private static final Type MESSAGE_TYPE = new TypeToken<List<Message>>() {}.getType();
14+
15+
@Expose
16+
public List<Message> messages = new ArrayList<Message>();
17+
18+
public static class Message {
19+
@Expose
20+
public long msg_id;
21+
@Expose
22+
public Android android;
23+
@Expose
24+
public Ios ios;
25+
@Expose
26+
public Winphone winphone;
27+
}
28+
2429
public static class Android {
25-
@Expose public int received;
26-
@Expose public int target;
27-
@Expose public int online_push;
28-
@Expose public int click;
29-
@Expose public int msg_click;
30+
@Expose
31+
public int received;
32+
@Expose
33+
public int target;
34+
@Expose
35+
public int online_push;
36+
@Expose
37+
public int click;
38+
@Expose
39+
public int msg_click;
3040
}
31-
41+
3242
public static class Ios {
33-
@Expose public int apns_sent;
34-
@Expose public int apns_target;
35-
@Expose public int click;
36-
@Expose public int target;
37-
@Expose public int received;
38-
@Expose public int msg_click;
43+
@Expose
44+
public int apns_sent;
45+
@Expose
46+
public int apns_target;
47+
@Expose
48+
public int click;
49+
@Expose
50+
public int target;
51+
@Expose
52+
public int received;
53+
@Expose
54+
public int msg_click;
3955
}
4056

4157
public static class Winphone {
42-
@Expose public int mpns_target;
43-
@Expose public int mpns_sent;
44-
@Expose public int click;
58+
@Expose
59+
public int mpns_target;
60+
@Expose
61+
public int mpns_sent;
62+
@Expose
63+
public int click;
4564
}
46-
47-
static MessagesResult fromResponse(ResponseWrapper responseWrapper) {
65+
66+
static MessagesResult fromResponse(ResponseWrapper responseWrapper) {
4867
MessagesResult result = new MessagesResult();
4968
if (responseWrapper.isServerResponse()) {
5069
result.messages = _gson.fromJson(responseWrapper.responseContent, MESSAGE_TYPE);
5170
}
52-
71+
5372
result.setResponseWrapper(responseWrapper);
5473
return result;
55-
}
56-
74+
}
75+
5776
}

src/main/java/cn/jpush/api/report/ReceivedsResult.java

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,33 @@
1010
import java.util.List;
1111

1212
public class ReceivedsResult extends BaseResult {
13-
private static final Type RECEIVED_TYPE = new TypeToken<List<Received>>(){}.getType();
14-
15-
@Expose public List<Received> received_list = new ArrayList<Received>();
16-
17-
18-
public static class Received {
19-
@Expose public long msg_id;
20-
@Expose public int android_received;
21-
@Expose public int ios_apns_sent;
22-
@Expose public int ios_msg_receive;
23-
@Expose public int wp_mpns_sent;
24-
}
25-
26-
static ReceivedsResult fromResponse(ResponseWrapper responseWrapper) {
13+
private static final Type RECEIVED_TYPE = new TypeToken<List<Received>>() {}.getType();
14+
15+
@Expose
16+
public List<Received> received_list = new ArrayList<Received>();
17+
18+
19+
public static class Received {
20+
@Expose
21+
public long msg_id;
22+
@Expose
23+
public int android_received;
24+
@Expose
25+
public int ios_apns_sent;
26+
@Expose
27+
public int ios_msg_receive;
28+
@Expose
29+
public int wp_mpns_sent;
30+
}
31+
32+
static ReceivedsResult fromResponse(ResponseWrapper responseWrapper) {
2733
ReceivedsResult result = new ReceivedsResult();
2834
if (responseWrapper.isServerResponse()) {
2935
result.received_list = _gson.fromJson(responseWrapper.responseContent, RECEIVED_TYPE);
3036
}
31-
37+
3238
result.setResponseWrapper(responseWrapper);
3339
return result;
34-
}
35-
40+
}
41+
3642
}

0 commit comments

Comments
 (0)