From f97047476e6db03707e4461b1691126ed71d75c6 Mon Sep 17 00:00:00 2001 From: luoyang Date: Fri, 28 Sep 2018 09:19:43 +0800 Subject: [PATCH 1/7] fix dev --- src/main/ui/static/config/devtools/templates/root.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/ui/static/config/devtools/templates/root.html b/src/main/ui/static/config/devtools/templates/root.html index ffe80f0ea..48774f3f1 100644 --- a/src/main/ui/static/config/devtools/templates/root.html +++ b/src/main/ui/static/config/devtools/templates/root.html @@ -85,7 +85,7 @@ - 更新HF短连接 + 更新Rpay+商户费率时间 From 62787070db03f71272fa651c3c781fb614a7ac40 Mon Sep 17 00:00:00 2001 From: yangkai Date: Fri, 28 Sep 2018 10:13:32 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E9=87=8D=E7=BD=AEpine=E5=95=86=E6=88=B7?= =?UTF-8?q?=E4=B8=8B=E8=B4=A6=E6=88=B7=E5=AF=86=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../payment/manage/dev/web/TestController.java | 18 ++++++++++++++++++ .../manage/task/UpdatePartnerPasswordTask.java | 8 ++++---- .../mappers/system/ClientAccountMapper.xml | 2 +- 3 files changed, 23 insertions(+), 5 deletions(-) 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 5d664eac8..5ae7ecc31 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 @@ -21,6 +21,7 @@ import au.com.royalpay.payment.manage.mappers.payment.OrderMapper; import au.com.royalpay.payment.manage.mappers.payment.RefundMapper; import au.com.royalpay.payment.manage.mappers.system.ClientBankAccountMapper; import au.com.royalpay.payment.manage.mappers.system.ClientMapper; +import au.com.royalpay.payment.manage.merchants.core.ClientManager; import au.com.royalpay.payment.manage.permission.manager.ManagerMapping; import au.com.royalpay.payment.manage.tradelog.core.TradeLogService; import au.com.royalpay.payment.tools.CommonConsts; @@ -56,6 +57,8 @@ import java.io.File; import java.io.IOException; import java.math.BigDecimal; import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.Arrays; import java.util.Date; import java.util.List; @@ -113,6 +116,9 @@ public class TestController implements ApplicationEventPublisherAware { private HfClearAmountService hfClearAmountService; @Resource private HfUpdateService hfUpdateService; + @Resource + private ClientManager clientManager; + private final static String EMAIL = "lily.tao@royalpay.com.au,bella.sun@royalpay.com.au,astro.dai@royalpay.com.au,taylor.dang@royalpay.com.au"; @ManagerMapping(value = "/{clientMoniker}/export/agreepdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.DIRECTOR, ManagerRole.OPERATOR}) public void exportAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, HttpServletResponse httpResponse) throws Exception { @@ -416,4 +422,16 @@ public class TestController implements ApplicationEventPublisherAware { public String rpayUpdateClearing() { return hfUpdateService.rpayUpdate(); } + + @ManagerMapping(value = "/partner", method = RequestMethod.GET, role = ManagerRole.DEVELOPER) + public void resetPartnerPassword() { + final List emails = new ArrayList<>(); + List emailList = Arrays.asList(EMAIL.split(",")); + emailList.stream().forEach(email -> { + if (!emails.contains(email)) { + emails.add(email); + } + }); + clientManager.updateAllPartnerPassword("PINE", emails); + } } diff --git a/src/main/java/au/com/royalpay/payment/manage/task/UpdatePartnerPasswordTask.java b/src/main/java/au/com/royalpay/payment/manage/task/UpdatePartnerPasswordTask.java index 88a81a0d1..5c7152c06 100644 --- a/src/main/java/au/com/royalpay/payment/manage/task/UpdatePartnerPasswordTask.java +++ b/src/main/java/au/com/royalpay/payment/manage/task/UpdatePartnerPasswordTask.java @@ -10,6 +10,7 @@ import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import javax.annotation.Resource; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -24,13 +25,12 @@ public class UpdatePartnerPasswordTask { @Resource private ManagerMapper managerMapper; - private final static String EMAIL = "lily.tao@royalpay.com.au,bella.sun@royalpay.com.au," + - "astro.dai@royalpay.com.au,taylor.dang@royalpay.com.au"; + private final static String EMAIL = "lily.tao@royalpay.com.au,bella.sun@royalpay.com.au,astro.dai@royalpay.com.au,taylor.dang@royalpay.com.au"; @Scheduled(cron = "0 0 9 28 * ?") public void resetPartnerPassword() { - synchronizedScheduler.executeProcess("manage_task:resetPartnerPassword", 120_000, () -> { - final List emails = managerMapper.listDevManager(); + synchronizedScheduler.executeProcess("manage_task:resetPartnerPassword", 300_000, () -> { + final List emails = new ArrayList<>(); List emailList = Arrays.asList(EMAIL.split(",")); emailList.stream().forEach(email -> { if (!emails.contains(email)) { diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientAccountMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientAccountMapper.xml index c35be4b34..36b3ceab0 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientAccountMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientAccountMapper.xml @@ -18,7 +18,7 @@ From a78fd1542dd3fd149301afa29e4911c22d4bb258 Mon Sep 17 00:00:00 2001 From: luoyang Date: Sat, 29 Sep 2018 16:51:15 +0800 Subject: [PATCH 6/7] fix rate_warning --- .../manage/management/clearing/core/impl/CleanServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/CleanServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/CleanServiceImpl.java index c99cf7636..5c3cbaea3 100644 --- a/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/CleanServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/management/clearing/core/impl/CleanServiceImpl.java @@ -618,7 +618,7 @@ public class CleanServiceImpl implements CleanService, ManagerTodoNoticeProvider Date expiryTime = client.getDate("expiry_time"); client.put("generatable", expiryTime != null); if (expiryTime != null) { - client.put("expiry_time", expiryTime.getTime()); + client.put("expiry_time", DateFormatUtils.format(client.getDate("expiry_time"), "dd/MM/yyyy")); } } warnings.put("no_rate", rateInDanger); From d8d6855d13c16295ec7fcbdfc1b894663b8f88fc Mon Sep 17 00:00:00 2001 From: hellolujian <1370256381@qq.com> Date: Sat, 29 Sep 2018 20:37:11 +0800 Subject: [PATCH 7/7] =?UTF-8?q?[fix]=E4=BC=98=E5=8C=96sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/impls/DashboardServiceImpl.java | 11 +- .../mappers/ClientAnalysisMapper.java | 2 +- .../analysis/web/DashboardController.java | 4 +- .../analysis/mappers/ClientAnalysisMapper.xml | 102 +++++++++++++++--- 4 files changed, 94 insertions(+), 25 deletions(-) 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 6e4ea254e..97ef7c216 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 @@ -163,16 +163,15 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT @Override public List getTopTradePartners(JSONObject params, int limit) { - return clientAnalysisMapper.listPartnersTradeAmount(params, new PageBounds(1, limit, Order.formString("aud_fee.desc"))); + params.put("rankType", "aud_fee"); + params.put("limit", limit); + return clientAnalysisMapper.listPartnersTradeAmount(params); } @Override public List getTopTradePartners(JSONObject params) { - String rankType = "aud_fee"; - if (params.getString("rankType")!=null){ - rankType = params.getString("rankType"); - } - return clientAnalysisMapper.listPartnersTradeAmount(params, new PageBounds(Order.formString(rankType+".desc"))); + params.putIfAbsent("rankType", "aud_fee"); + return clientAnalysisMapper.listPartnersTradeAmount(params); } @Override diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/mappers/ClientAnalysisMapper.java b/src/main/java/au/com/royalpay/payment/manage/analysis/mappers/ClientAnalysisMapper.java index dd4272dd2..93913f7e4 100644 --- a/src/main/java/au/com/royalpay/payment/manage/analysis/mappers/ClientAnalysisMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/analysis/mappers/ClientAnalysisMapper.java @@ -33,7 +33,7 @@ public interface ClientAnalysisMapper { List countTradePartnersHistory(JSONObject params); - List listPartnersTradeAmount(JSONObject params, PageBounds pageBounds); + List listPartnersTradeAmount(JSONObject params); List countClientsTypes(JSONObject params); diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/web/DashboardController.java b/src/main/java/au/com/royalpay/payment/manage/analysis/web/DashboardController.java index 86cb29a46..a0000005a 100644 --- a/src/main/java/au/com/royalpay/payment/manage/analysis/web/DashboardController.java +++ b/src/main/java/au/com/royalpay/payment/manage/analysis/web/DashboardController.java @@ -75,11 +75,11 @@ public class DashboardController { @ManagerMapping("/rank_trade_partners") public List rankTradePartners(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { JSONObject params = analysis.toParams(null); - orgManager.checkOrg(manager,params); + orgManager.checkOrg(manager, params); if (analysis.isOnlyGroup() && ManagerRole.BD_LEADER.hasRole(manager.getIntValue("role"))) { params.put("bd_group", manager.getString("manager_id")); if (analysis.getGroup_bd()>0){ - params.put("bd_group_bd",analysis.getGroup_bd()); + params.put("bd_group_bd", analysis.getGroup_bd()); } } return dashboardService.getTopTradePartners(params); diff --git a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/ClientAnalysisMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/ClientAnalysisMapper.xml index 6afef4190..1f14033e4 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/ClientAnalysisMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/ClientAnalysisMapper.xml @@ -97,30 +97,100 @@ GROUP BY date(o.create_time) + + + +