From 700599435d8233e1a1c2198fff8f8c6dbe5555ed Mon Sep 17 00:00:00 2001 From: dulingling Date: Wed, 5 Aug 2020 15:07:31 +0800 Subject: [PATCH 1/3] =?UTF-8?q?upd:=E6=B6=88=E6=81=AF=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E9=80=9A=E7=9F=A5=E5=95=86=E6=88=B7?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E5=A2=9E=E5=8A=A0=EF=BC=9A=E5=8D=A1=E6=94=AF?= =?UTF-8?q?=E4=BB=98/=E8=B7=A8=E5=A2=83=E6=94=AF=E4=BB=98=E5=95=86?= =?UTF-8?q?=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/mappers/system/ClientMapper.java | 2 +- .../notice/core/impls/NoticeManageImpl.java | 8 ++++---- .../manage/mappers/system/ClientMapper.xml | 10 +++++++++- src/main/ui/static/config/notice/notice.js | 15 ++++++++++++++- 4 files changed, 28 insertions(+), 7 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientMapper.java index dda97f360..5a6b78aeb 100644 --- a/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/system/ClientMapper.java @@ -29,7 +29,7 @@ public interface ClientMapper { List listValidClient(); - List listValidClientFor30Days(); + List listValidClientFor30Days(JSONObject params); List listGreenChannel(JSONObject params); diff --git a/src/main/java/au/com/royalpay/payment/manage/notice/core/impls/NoticeManageImpl.java b/src/main/java/au/com/royalpay/payment/manage/notice/core/impls/NoticeManageImpl.java index dc4ed8d40..10379e81e 100644 --- a/src/main/java/au/com/royalpay/payment/manage/notice/core/impls/NoticeManageImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/notice/core/impls/NoticeManageImpl.java @@ -117,9 +117,9 @@ public class NoticeManageImpl implements NoticeManage { notice.put("create_time", date); notice.put("create_id", manager.getString("manager_id")); notice.put("create_name", manager.getString("display_name")); - if (!notice.getBoolean("merchants_type")){ + if (notice.getInteger("merchants_type") != 1){ StringBuilder sendClients = new StringBuilder(); - List clients = clientMapper.listValidClientFor30Days(); + List clients = clientMapper.listValidClientFor30Days(notice); clients.forEach(c -> { if (c.getInteger("parent_client_id")==null || c.getInteger("parent_client_id")!=9){ String p = c.getString("client_moniker")+","; @@ -177,10 +177,10 @@ public class NoticeManageImpl implements NoticeManage { notice.put("send_id", manager.getString("manager_id")); notice.put("send_name", manager.getString("display_name")); } - if (!notice.getBoolean("merchants_type")){ + if (notice.getInteger("merchants_type") != 1){ StringBuilder sendClients = new StringBuilder(); - List clients = clientMapper.listValidClientFor30Days(); + List clients = clientMapper.listValidClientFor30Days(notice); clients.forEach(c -> { if (c.getInteger("parent_client_id")==null || c.getInteger("parent_client_id")!=9){ String p = c.getString("client_moniker")+","; diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml index 4492a60df..f312069b6 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientMapper.xml @@ -12,9 +12,17 @@ sc.client_moniker, sc.parent_client_id FROM statistics_customer_order sco, - sys_clients sc + sys_clients sc, + sys_client_config cc WHERE sco.date >= DATE_SUB(CURDATE(), INTERVAL 30 DAY) AND sco.client_id = sc.client_id + AND sc.client_id = cc.client_id + + AND cc.enable_cross_payment = 1 + + + AND cc.enable_card_payment = 1 +