From e7037350e506b829a28f87c63b2e4ccdbae5ade2 Mon Sep 17 00:00:00 2001 From: luoyang Date: Sat, 29 Dec 2018 16:48:47 +0800 Subject: [PATCH 1/5] fix saveSubMerchantId refresh --- .../static/payment/partner/partner-manage.js | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index 64372f1d9..02ffc234a 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -647,7 +647,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.showFile(); $scope.passClient = function () { if(!$scope.partner.wechat_institution_merchant_id){ - commonDialog.alert({title: 'info', content: 'Wechat Institution Merchant Id not Refresh', type: 'info'}); + commonDialog.alert({title: 'info', content: 'HF Institution Merchant Id not Refresh', type: 'info'}); return; } if ($scope.partner.enable_hf) { @@ -1297,7 +1297,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter } }]); app.controller('partnerPaymentInfoCtrl', ['$scope', '$http', '$state', 'commonDialog','$uibModal', '$sce', function ($scope, $http, $state, commonDialog,$uibModal, $sce) { - $scope.refresh = false; $scope.copyHfLink = function() { var e=document.getElementById("cpbt"); e.select(); @@ -1452,23 +1451,26 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }; $scope.ctrl = {}; $scope.saveSubMerchantId = function () { - if(!$scope.refresh){ - commonDialog.alert({title: 'info', content: 'Wechat Institution Merchant Id not Refresh', type: 'info'}); - return; - } - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/payment_config', {sub_merchant_id: $scope.paymentInfo.sub_merchant_id}).then(function (resp) { + $scope.refreshInstitutionAfterSaveMerchantId(); + }, function (resp) { + commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + }); + }; + + $scope.refreshInstitutionAfterSaveMerchantId = function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/wechat_institution_merchant_id', {wechat_institution_merchant_id: $scope.paymentInfo.wechat_institution_merchant_id}).then(function (resp) { commonDialog.alert({ title: 'Success', - content: 'Modify Wechat Sub Merchant ID successfully', + content: 'Modify Wechat Sub Merchant ID And Refresh Wechat Institution Merchant Id successfully', type: 'success' }); - $scope.refresh = false; $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) }); }; + $scope.refreshWechatInstitutionMerchantId = function () { $http.put('/sys/partners/' + $scope.partner.client_moniker + '/wechat_institution_merchant_id', {wechat_institution_merchant_id: $scope.paymentInfo.wechat_institution_merchant_id}).then(function (resp) { commonDialog.alert({ @@ -1476,7 +1478,6 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter content: 'Refresh Wechat Institution Merchant Id successfully', type: 'success' }); - $scope.refresh = true; $scope.loadPartnerPaymentInfo(); }, function (resp) { commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) From e2c20576e496097c04cd0559a7734bcaa70f8bf7 Mon Sep 17 00:00:00 2001 From: luoyang Date: Thu, 3 Jan 2019 13:52:01 +0800 Subject: [PATCH 2/5] fix try_alerts & alerts display_amount --- src/main/ui/static/boot/templates/bind_qrcode_dialog_guide.html | 2 +- .../static/payment/tradelog/templates/partner_trade_logs.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/ui/static/boot/templates/bind_qrcode_dialog_guide.html b/src/main/ui/static/boot/templates/bind_qrcode_dialog_guide.html index 5e37fb36c..c3a7faa9c 100644 --- a/src/main/ui/static/boot/templates/bind_qrcode_dialog_guide.html +++ b/src/main/ui/static/boot/templates/bind_qrcode_dialog_guide.html @@ -3,7 +3,7 @@ diff --git a/src/main/ui/static/payment/partner/templates/client_partner_detail.html b/src/main/ui/static/payment/partner/templates/client_partner_detail.html index 1d90ce08b..71f79f2f5 100644 --- a/src/main/ui/static/payment/partner/templates/client_partner_detail.html +++ b/src/main/ui/static/payment/partner/templates/client_partner_detail.html @@ -344,9 +344,9 @@
+ id="short-name-input" maxlength="15" required>
-

No more than 50 characters

+

No more than 15 characters

diff --git a/src/main/ui/static/payment/partner/templates/partner_edit.html b/src/main/ui/static/payment/partner/templates/partner_edit.html index 73157848a..3c21c5fe7 100644 --- a/src/main/ui/static/payment/partner/templates/partner_edit.html +++ b/src/main/ui/static/payment/partner/templates/partner_edit.html @@ -111,13 +111,13 @@
+ id="short-name-input" required maxlength="15">

short name for WeChat payment display and partner name

Required Field

-

Less Than 50 +

Less Than 15 Characters(including symbols and spaces)

From b14b693a26f87a585f1bfe4837ea9a971475b823 Mon Sep 17 00:00:00 2001 From: "taylor.dang" Date: Wed, 9 Jan 2019 14:42:13 +0800 Subject: [PATCH 5/5] hanyin --- .../payment/manage/dev/web/TestController.java | 14 +++++++++++++- .../core/impl/TradeSecureServiceHanyinImpl.java | 2 +- 2 files changed, 14 insertions(+), 2 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 2e9b4315b..4e823422f 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 @@ -24,6 +24,8 @@ 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.system.core.TradeSecureService; +import au.com.royalpay.payment.manage.system.core.beans.TradeSecureFile; import au.com.royalpay.payment.manage.tradelog.core.TradeLogService; import au.com.royalpay.payment.tools.CommonConsts; import au.com.royalpay.payment.tools.defines.TradeType; @@ -41,6 +43,7 @@ import com.alibaba.fastjson.serializer.SerializerFeature; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.time.DateFormatUtils; import org.dom4j.Element; +import org.joda.time.DateTime; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; @@ -124,6 +127,8 @@ public class TestController implements ApplicationEventPublisherAware { private ClientManager clientManager; @Resource private SysConfigManager sysConfigManager; + @Resource + private TradeSecureService tradeSecureService; 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}) @@ -174,7 +179,7 @@ public class TestController implements ApplicationEventPublisherAware { sos.close(); } - @RequestMapping(value = "/{clientMoniker}/export/aggregate/agreepdf") + @ManagerMapping(value = "/{clientMoniker}/export/aggregate/agreepdf", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.DIRECTOR, ManagerRole.OPERATOR}) public void exportAggregateAgreeFile(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, HttpServletResponse httpResponse) throws Exception { httpResponse.setContentType("application/pdf"); httpResponse.setHeader("content-disposition", "attachment;filename=" + clientMoniker + "_AGREEMENT_" + new Date() + ".pdf"); @@ -451,4 +456,11 @@ public class TestController implements ApplicationEventPublisherAware { List emailList = Arrays.asList(ccMail.split(",")); clientManager.updateAllPartnerPassword("PINE", emailList, accountWhiteList); } + + @ManagerMapping(value = "/secure/hanyin_reports/{date}", role = ManagerRole.DEVELOPER, method = RequestMethod.GET) + public void downloadHanyinSecureReports(@PathVariable String date, HttpServletResponse response) { + TradeSecureFile file = tradeSecureService.getSecureReportFile(DateTime.parse(date).toDate()); + file.writeToHttp(response); + } + } diff --git a/src/main/java/au/com/royalpay/payment/manage/system/core/impl/TradeSecureServiceHanyinImpl.java b/src/main/java/au/com/royalpay/payment/manage/system/core/impl/TradeSecureServiceHanyinImpl.java index 15a008498..34ffe6f09 100644 --- a/src/main/java/au/com/royalpay/payment/manage/system/core/impl/TradeSecureServiceHanyinImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/system/core/impl/TradeSecureServiceHanyinImpl.java @@ -45,7 +45,7 @@ public class TradeSecureServiceHanyinImpl implements TradeSecureService { @Override public void uploadSecureReportYesterday() { - if (!sysConfigManager.getSysConfig().getBooleanValue("production_flag")) { + if (!sysConfigManager.getSysConfig().getBooleanValue("enable_hanyin_uploading")) { return; } logger.debug("start uploading secure report");