From aed415d530baf0d0129aecb9fd4fd6777a6d274a Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 12 Dec 2018 14:05:03 +0800 Subject: [PATCH 1/3] =?UTF-8?q?add=20=E5=85=B3=E9=97=AD=E6=B8=85=E7=AE=97?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E5=8E=9F=E5=9B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../analysis/web/DashboardController.java | 2 +- .../manage/merchants/core/ClientManager.java | 2 +- .../core/impls/ClientManagerImpl.java | 14 ++++++- .../web/PartnerManageController.java | 2 +- .../static/payment/partner/partner-manage.js | 38 ++++++++++++++----- 5 files changed, 45 insertions(+), 13 deletions(-) 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 f7cc47bcb..56cc96a55 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 @@ -108,7 +108,7 @@ public class DashboardController { } @ManagerMapping("/new_clients") - public List clientsTradeInDays(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { + public List clientsTradeInDays(AnalysisBean analysis, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { JSONObject params = analysis.toParams(null); orgManager.checkOrg(manager,params); return dashboardService.getClientsTradeAnalysisInDays(params); diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java index 82976ea57..314881b9f 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/ClientManager.java @@ -271,7 +271,7 @@ public interface ClientManager { void updateAppClient(JSONObject account,int client_id, AppClientBean appClientBean); - void setSkipClearing(JSONObject account,String clientMoniker, Boolean skip_clearing); + void setSkipClearing(JSONObject account,String clientMoniker, Boolean skip_clearing,String remark); void enableGatewayUpgrade(JSONObject account,String clientMoniker, boolean gatewayUpgrade); diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java index bc15a15cf..3ccd16f7a 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/core/impls/ClientManagerImpl.java @@ -130,6 +130,7 @@ import org.apache.commons.lang3.RandomUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.time.DateFormatUtils; import org.apache.commons.lang3.time.DateUtils; +import org.apache.el.parser.AstNot; import org.dom4j.Element; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -3234,12 +3235,23 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid @Override @Transactional - public void setSkipClearing(JSONObject account, String clientMoniker, Boolean skip_clearing) { + public void setSkipClearing(JSONObject account, String clientMoniker, Boolean skip_clearing,String remark) { JSONObject client = getClientInfoByMoniker(clientMoniker); if (client == null) { throw new InvalidShortIdException(); } clientModifySupport.processClientConfigModify(new SwitchPermissionModify(account, clientMoniker, "skip_clearing", skip_clearing)); + + if (!skip_clearing) { + if ("".equals(remark) || remark==null){ + throw new ServerErrorException("请填写关闭清算原因"); + } + JSONObject clientConfig = clientConfigMapper.find(client.getIntValue("client_id")); + clientConfig.put("skip_settle_remark", remark); + clientConfigMapper.update(clientConfig); + } + + client.put("skip_clearing", skip_clearing); if (client.getString("rpay_enterprise_id") != null) { rpayApi.switchMerchantSettle(client); diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java index 7bb29b70d..a39bd8f1d 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/web/PartnerManageController.java @@ -367,7 +367,7 @@ public class PartnerManageController { @ManagerMapping(value = "/{clientMoniker}/skip_clearing", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.FINANCIAL_STAFF}) public void skipClearing(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager,@PathVariable String clientMoniker, @RequestBody JSONObject skip_clearing) { - clientManager.setSkipClearing(manager,clientMoniker, skip_clearing.getBooleanValue("skip_clearing")); + clientManager.setSkipClearing(manager,clientMoniker, skip_clearing.getBooleanValue("skip_clearing"),skip_clearing.getString("remark")); } @ManagerMapping(value = "/{clientMoniker}/settle_hour", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.SERVANT, ManagerRole.FINANCIAL_STAFF}) diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index 6a11acef0..42072fd12 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -1887,7 +1887,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.loadSubClients(); }]); - app.controller('partnerRatesCtrl', ['$scope', '$rootScope', '$http', '$uibModal', 'commonDialog', function ($scope, $rootScope, $http, $uibModal, commonDialog) { + app.controller('partnerRatesCtrl', ['$scope', '$rootScope', '$http', '$uibModal', 'commonDialog','$sce', function ($scope, $rootScope, $http, $uibModal, commonDialog,$sce) { $scope.bankCtrl = {edit: true, rate_name: 'Wechat'}; $scope.init = {skip_clearing:false,tax_in_surcharge:false,customer_tax_free:false}; $scope.getBankAccount = function () { @@ -1906,19 +1906,39 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }) }); }; + $scope.skipClearing = function (skipClearing) { if (!$scope.init.skip_clearing) { $scope.init.skip_clearing = true; return; } - commonDialog.confirm({ - title: 'Warning', - content: 'This operation will switch skip clearing status. Are you sure?' - }).then(function () { - $http.put('/sys/partners/' + $scope.partner.client_moniker + '/skip_clearing', {skip_clearing: skipClearing}).then(function (resp) { - $scope.getBankAccount(); - }); - }) + if (!skipClearing) { + commonDialog.confirm({ + title: 'Warning', + content: 'This operation will switch skip clearing status. Are you sure?' + }).then(function () { + commonDialog.inputText({title: '请输入关闭跳过清算的原因'}).then(function (text) { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/skip_clearing', { + skip_clearing: skipClearing, + remark: text + }).then(function (resp) { + $scope.getBankAccount(); + }); + }); + }) + }else{ + commonDialog.confirm({ + title: 'Warning', + content: 'This operation will switch skip clearing status. Are you sure?', + // contentHtml: $sce.trustAsHtml('This operation will switch skip clearing status. Are you sure?') + }).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/skip_clearing', {skip_clearing: skipClearing}).then(function (resp) { + $scope.getBankAccount(); + }); + }) + } + + }; $scope.taxInSurcharge = function (taxInSurcharge) { if (!$scope.init.tax_in_surcharge) { From d3585149c6e6ce9202f36a38d37107827a025051 Mon Sep 17 00:00:00 2001 From: lujian Date: Mon, 17 Dec 2018 21:16:30 +0800 Subject: [PATCH 2/3] =?UTF-8?q?[fix]=E6=94=AF=E4=BB=98=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E9=A1=B5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/ui/static/lib/weui/index.css | 4 ++-- src/main/ui/static/templates/payment/success.css | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/ui/static/lib/weui/index.css b/src/main/ui/static/lib/weui/index.css index a75c74ecb..e5bd85d84 100644 --- a/src/main/ui/static/lib/weui/index.css +++ b/src/main/ui/static/lib/weui/index.css @@ -37,7 +37,7 @@ margin-top: 6px; } .weui-wepay-details__bd { - padding: 12px 0; + padding: 8px 0; } .weui-wepay-details__line { margin-top: 7px; @@ -63,7 +63,7 @@ display: flex; justify-content: space-between; font-size: 14px; - line-height: 30px; + line-height: 28px; } .weui-wepay-detail__hd { text-align: left; diff --git a/src/main/ui/static/templates/payment/success.css b/src/main/ui/static/templates/payment/success.css index 89a829205..769001aef 100644 --- a/src/main/ui/static/templates/payment/success.css +++ b/src/main/ui/static/templates/payment/success.css @@ -1,5 +1,5 @@ .pagehead { - padding: 10px 0; + padding: 5px 0; color: white; background-color: #09bb07; } @@ -13,8 +13,8 @@ background-color: #23ac38; } .pagehead img { - width: 40px; - height: 40px; + width: 30px; + height: 30px; border: 3px solid white; border-radius: 50%; vertical-align: middle; @@ -31,15 +31,15 @@ } .pright { - font-size: 24px; + font-size: 20px; position: absolute; right: 10%; - padding-top: 5px; + padding-top: 2px; vertical-align: middle; } .afterhr { - padding: 5px 0; + /*padding: 5px 0;*/ content: " "; position: relative; bottom: 0; @@ -51,7 +51,7 @@ } .ad { - padding: 15px 0; + padding: 5px 0 0 0; text-align: center; margin: auto; From a0b5557f9943536b2cf8e5c6b2d2ddf5875fd4f3 Mon Sep 17 00:00:00 2001 From: lujian Date: Tue, 18 Dec 2018 09:14:07 +0800 Subject: [PATCH 3/3] =?UTF-8?q?[fix]=E6=94=AF=E4=BB=98=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E9=A1=B5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/ui/static/lib/weui/index.css | 4 ++-- src/main/ui/static/templates/payment/success.css | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/ui/static/lib/weui/index.css b/src/main/ui/static/lib/weui/index.css index e5bd85d84..7dbe43e45 100644 --- a/src/main/ui/static/lib/weui/index.css +++ b/src/main/ui/static/lib/weui/index.css @@ -37,7 +37,7 @@ margin-top: 6px; } .weui-wepay-details__bd { - padding: 8px 0; + /*padding: 8px 0;*/ } .weui-wepay-details__line { margin-top: 7px; @@ -63,7 +63,7 @@ display: flex; justify-content: space-between; font-size: 14px; - line-height: 28px; + line-height: 26px; } .weui-wepay-detail__hd { text-align: left; diff --git a/src/main/ui/static/templates/payment/success.css b/src/main/ui/static/templates/payment/success.css index 769001aef..4abfb0e03 100644 --- a/src/main/ui/static/templates/payment/success.css +++ b/src/main/ui/static/templates/payment/success.css @@ -51,7 +51,7 @@ } .ad { - padding: 5px 0 0 0; + /*padding: 5px 0 0 0;*/ text-align: center; margin: auto;