|
@@ -30,8 +30,8 @@ public class DataService {
|
|
|
*/
|
|
|
public JSONArray getExamList(Integer number) {
|
|
|
Map <String,String> map = new HashMap<String,String>();
|
|
|
- map.put("institution_id", PropKit.get("institution_id"));
|
|
|
- map.put("num", number.toString());
|
|
|
+ map.put("institution_id", "02800001");
|
|
|
+ map.put("num", "30");
|
|
|
String content = postWithParameters(GET_EXAM_URL, map);
|
|
|
JSONObject jsonObject = JSON.parseObject(content);
|
|
|
if (!jsonObject.getString("msg").equals("success")) {
|
|
@@ -79,15 +79,8 @@ public class DataService {
|
|
|
}
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
- Map <String,String> map = new HashMap<String,String>();
|
|
|
- map.put("institution_id", "02800001");
|
|
|
- map.put("num", "1");
|
|
|
- String content = postWithParameters(GET_EXAM_URL, map);
|
|
|
- JSONObject jsonObject = JSON.parseObject(content);
|
|
|
- if (!jsonObject.getString("msg").equals("success")) {
|
|
|
- }
|
|
|
- JSONArray jsonArray = JSON.parseArray(jsonObject.getString("data"));
|
|
|
- System.out.println(jsonArray);
|
|
|
+ DataService dService = new DataService();
|
|
|
+ JSONArray jsonArray = dService.getExamList(1);
|
|
|
}
|
|
|
|
|
|
}
|