From 45a75ac2896d722b929b993848e0dbb471300117 Mon Sep 17 00:00:00 2001 From: dulingling Date: Mon, 9 Mar 2020 17:40:39 +0800 Subject: [PATCH] =?UTF-8?q?Upd:=E6=B7=BB=E5=8A=A0=E6=8C=87=E5=AE=9A?= =?UTF-8?q?=E5=95=86=E6=88=B7=E6=B6=88=E8=B4=B9=E8=80=85=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=87=8D=E7=94=9F=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 2 +- .../manage/analysis/core/DashboardService.java | 2 ++ .../core/impls/DashboardServiceImpl.java | 15 +++++++++++++++ .../payment/manage/dev/web/TestController.java | 16 ++++++++++++++++ 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 139e8631c..f2839281c 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 1.3.90 + 1.3.91 UTF-8 1.8.0 diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/core/DashboardService.java b/src/main/java/au/com/royalpay/payment/manage/analysis/core/DashboardService.java index 237e8ab11..700d78df7 100644 --- a/src/main/java/au/com/royalpay/payment/manage/analysis/core/DashboardService.java +++ b/src/main/java/au/com/royalpay/payment/manage/analysis/core/DashboardService.java @@ -57,6 +57,8 @@ public interface DashboardService { void generateCustomersAndOrdersStatistics(Date analysisDate); + void generateCustomersAndOrdersStatisticsByClientMoniker(Date analysisDate,String clientMoniker); + JSONObject getOrderAndCustomerPerDay(JSONObject partner,AnalysisBean partnerAnalysisBean); List getStatisticsCustomersAndOrdersInDays(JSONObject partner, AnalysisBean partnerAnalysisBean); diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/DashboardServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/DashboardServiceImpl.java index 0c558bd7c..af21be50c 100644 --- a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/DashboardServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/DashboardServiceImpl.java @@ -488,7 +488,22 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT JSONObject totalObject = new JSONObject(); totalObject.put("client_id",0); generateData(format,date,totalObject); + } + /** + * 重新生成执行商户下某日消费者数据 + * @param analysisDate + * @param clientMoniker + */ + public void generateCustomersAndOrdersStatisticsByClientMoniker(Date analysisDate,String clientMoniker){ + DateFormat format = new SimpleDateFormat("yyyyMMdd"); + String date = format.format(analysisDate); + List clients =clientMapper.listClients(); + for (JSONObject client:clients){ + if(client.getString("client_moniker").equals(clientMoniker)){ + generateData(format, date, client); + } + } } private void generateData(DateFormat format, String date, JSONObject client) { diff --git a/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java b/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java index a93512df0..ae05ba957 100644 --- a/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java +++ b/src/main/java/au/com/royalpay/payment/manage/dev/web/TestController.java @@ -575,6 +575,22 @@ public class TestController implements ApplicationEventPublisherAware { }); } + + /** + * 重新生成执行商户下某日消费者数据 + * @param date + * @param clientMoniker + */ + @GetMapping("/task/analysisCustomerDashboard") + public void analysisCustomerDashboardForClientMoniker(@RequestParam("date") String date,String clientMoniker){ + try { + dashboardService.generateCustomersAndOrdersStatisticsByClientMoniker(DateUtils.addDays(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(date), -1),clientMoniker); + } catch (ParseException e) { + e.printStackTrace(); + } + + } + @ManagerMapping(value = "/reports/ato_reports/royalpay_ato_report_{year}.bttps", role = ManagerRole.DEVELOPER, method = RequestMethod.GET) @ReadOnlyConnection public void downloadATOReport(@PathVariable String year, HttpServletResponse resp) throws IOException {