From 633736fadc7fb0d46298c37007ce9ff838ff6d32 Mon Sep 17 00:00:00 2001 From: "taylor.dang" Date: Mon, 30 Dec 2019 09:31:41 +0800 Subject: [PATCH] =?UTF-8?q?[Y]=20=E6=8A=A5=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/custom/task/CustomQueryTask.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/custom/task/CustomQueryTask.java b/src/main/java/au/com/royalpay/payment/manage/custom/task/CustomQueryTask.java index 07e30a2f7..8b04825a6 100644 --- a/src/main/java/au/com/royalpay/payment/manage/custom/task/CustomQueryTask.java +++ b/src/main/java/au/com/royalpay/payment/manage/custom/task/CustomQueryTask.java @@ -24,15 +24,14 @@ public class CustomQueryTask { private PmtCustomReportMapper pmtCustomReportMapper; @Scheduled(cron = "0 0/10 * * * *") - public void customReportQuery(){ + public void customReportQuery() { List reports = pmtCustomReportMapper.findCustomReportNotScucess(); - if(!reports.isEmpty()){ - for (JSONObject report:reports) { - //Alipay直接返回成功与否,Wechat返回的结果较多,成功提交至海关后状态才会变为success,因此只有Wechat需要定时查询报关单状态 - if(report.getString("channel").equals("Wechat")){ - customSupport.queryCustomResult(report.getString("report_id")); - } + reports.forEach(report -> { + try { + customSupport.queryCustomResult(report.getString("report_id")); + } catch (Exception e) { + //donothing } - } + }); } }