Skip to content

Commit bbbd39c

Browse files
committed
Adaptation of jwzx API modification
1 parent 25e6c38 commit bbbd39c

File tree

5 files changed

+221
-229
lines changed

5 files changed

+221
-229
lines changed

.idea/misc.xml

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

app/src/main/java/com/superbug/moi/cquptlife/config/API.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ public class API {
55
public static class URL {
66
// 内网外入后教务在线的查询学生信息接口
77
public static final String END = "http://jwzx.cqupt.congm.in";
8-
public static final String searchStudent = "/jwzxtmp/data/json_studentList.php?dirId=&rows=100";
9-
public static final String searchTeacher = "/jwzxtmp/data/json_teacherList.php?dirId=&rows=100";
8+
public static final String searchStudent = "/jwzxtmp/data/json_StudentSearch.php";
9+
public static final String searchTeacher = "/jwzxtmp/data/json_teacherSearch.php";
1010
// 废弃
1111
public static final String studentId = "http://jwzx.cqupt.congm.in/pubBjStu.php?searchKey=";
1212
// 内网外入后教务在线的查询学生一卡通照片的接口

app/src/main/java/com/superbug/moi/cquptlife/model/bean/StudentWrapper.java

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.superbug.moi.cquptlife.model.bean;
22

3+
import com.google.gson.annotations.SerializedName;
4+
35
import java.io.Serializable;
46
import java.util.List;
57

@@ -28,7 +30,8 @@
2830
*/
2931

3032
public class StudentWrapper {
31-
private int total;
33+
34+
@SerializedName("returnData")
3235
private List<StudentWrapper.Student> rows;
3336

3437
public class Student implements Serializable {
@@ -41,7 +44,6 @@ public class Student implements Serializable {
4144
private String yxm;
4245
private String nj;
4346
private String bj;
44-
private int totalCount;
4547

4648
public String getBj() {
4749
bj = bj.replaceAll(" ", "");
@@ -63,14 +65,6 @@ public void setNj(String nj) {
6365
this.nj = nj;
6466
}
6567

66-
public int getTotalCount() {
67-
return totalCount;
68-
}
69-
70-
public void setTotalCount(int totalCount) {
71-
this.totalCount = totalCount;
72-
}
73-
7468
public String getXb() {
7569
xb = xb.replaceAll(" ", "");
7670
return xb;
@@ -146,11 +140,4 @@ public void setRows(List<StudentWrapper.Student> rows) {
146140
this.rows = rows;
147141
}
148142

149-
public int getTotal() {
150-
return total;
151-
}
152-
153-
public void setTotal(int total) {
154-
this.total = total;
155-
}
156143
}

app/src/main/java/com/superbug/moi/cquptlife/model/bean/TeacherWrapper.java

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.superbug.moi.cquptlife.model.bean;
22

3+
import com.google.gson.annotations.SerializedName;
4+
35
import java.io.Serializable;
46
import java.util.List;
57

@@ -9,12 +11,6 @@
911

1012
public class TeacherWrapper {
1113

12-
/**
13-
* total : 105
14-
* rows : [{"teaId":"010237","teaName":"王永(通)","jys":"0105","jysm":"通信工程系","yxm":"通信与信息工程学院","zc":"讲师(高校)","totalCount":105}]
15-
*/
16-
17-
private int total;
1814
/**
1915
* teaId : 010237
2016
* teaName : 王永(通)
@@ -25,16 +21,9 @@ public class TeacherWrapper {
2521
* totalCount : 105
2622
*/
2723

24+
@SerializedName("returnData")
2825
private List<Teacher> rows;
2926

30-
public int getTotal() {
31-
return total;
32-
}
33-
34-
public void setTotal(int total) {
35-
this.total = total;
36-
}
37-
3827
public List<Teacher> getRows() {
3928
return rows;
4029
}
@@ -50,7 +39,6 @@ public static class Teacher implements Serializable {
5039
private String jysm;
5140
private String yxm;
5241
private String zc;
53-
private int totalCount;
5442

5543
public String getTeaId() {
5644
teaId = teaId.replaceAll(" ", "");
@@ -110,12 +98,5 @@ public void setZc(String zc) {
11098
this.zc = zc;
11199
}
112100

113-
public int getTotalCount() {
114-
return totalCount;
115-
}
116-
117-
public void setTotalCount(int totalCount) {
118-
this.totalCount = totalCount;
119-
}
120101
}
121102
}

0 commit comments

Comments
 (0)