|
|
@@ -161,12 +161,16 @@ public class CoinServiceImpl implements CoinService {
|
|
|
|
|
|
String signQueryString = paramMap.entrySet().stream().map(e -> e.getKey() + "=" + e.getValue()).collect(Collectors.joining("&"));
|
|
|
|
|
|
- JSONObject response = requestApi4Common("/api/mix/v1/order/historyProductType", signQueryString, null, JsoupUtil.HTTP_GET, paramMap);
|
|
|
-
|
|
|
- JSONArray orderList = response.getJSONObject("data").getJSONArray("orderList");
|
|
|
- if (orderList.size() > 0) {
|
|
|
- coinMapper.insertHistoryOrderList(JSONArray.parseArray(orderList.toJSONString(), CoinHistoryOrder.class));
|
|
|
- log.warn("syncData->insertHistoryOrderList,startTime={},endTime={},size={}", startTime, endTime, orderList.size());
|
|
|
+ JSONObject response = null;
|
|
|
+ try {
|
|
|
+ response = requestApi4Common("/api/mix/v1/order/historyProductType", signQueryString, null, JsoupUtil.HTTP_GET, paramMap);
|
|
|
+ JSONArray orderList = response.getJSONObject("data").getJSONArray("orderList");
|
|
|
+ if (orderList.size() > 0) {
|
|
|
+ coinMapper.insertHistoryOrderList(JSONArray.parseArray(orderList.toJSONString(), CoinHistoryOrder.class));
|
|
|
+ log.warn("syncData->insertHistoryOrderList,startTime={},endTime={},size={}", startTime, endTime, orderList.size());
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("syncData->insertHistoryOrderList error,response={}", response, e);
|
|
|
}
|
|
|
}
|
|
|
|