| | |
| | | // 每30s爬取一次
|
| | | @Scheduled(cron = "0/30 * * * * ? ")
|
| | | public void doJob1() {
|
| | | if (!Constant.IS_TASK)
|
| | | return;
|
| | | // if (!Constant.IS_TASK)
|
| | | // return;
|
| | | long currentTime = System.currentTimeMillis();
|
| | | // 爬取21分钟之前到现在的
|
| | | updateRelationOrder(currentTime - 1000 * 60 * 20L);
|
| | |
| | |
|
| | | JSONObject data = JSONObject.fromObject(response);
|
| | | if (data.optJSONObject("tbk_order_get_response") == null)
|
| | | return null;
|
| | | return orderList;
|
| | | if (data.optJSONObject("tbk_order_get_response").optJSONObject("results") == null)
|
| | | return null;
|
| | | return orderList;
|
| | | if (data.optJSONObject("tbk_order_get_response").optJSONObject("results").optJSONArray("n_tbk_order") == null)
|
| | | return null;
|
| | | return orderList;
|
| | |
|
| | | JSONArray array = data.optJSONObject("tbk_order_get_response").optJSONObject("results")
|
| | | .optJSONArray("n_tbk_order");
|