diff --git a/pom.xml b/pom.xml index d87fed4ea..bf87b9d42 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ 4.0.0 manage - 1.4.15 + 1.4.16 UTF-8 1.8.0 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 4fd1ec219..8aedaff3b 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 @@ -42,6 +42,7 @@ import au.com.royalpay.payment.manage.merchants.core.*; import au.com.royalpay.payment.manage.merchants.entity.impls.*; import au.com.royalpay.payment.manage.notice.core.MailService; import au.com.royalpay.payment.manage.permission.utils.OrgCheckUtils; +import au.com.royalpay.payment.manage.rservices.core.RServicesApplyService; import au.com.royalpay.payment.manage.signin.beans.TodoNotice; import au.com.royalpay.payment.manage.signin.core.ManagerTodoNoticeProvider; import au.com.royalpay.payment.manage.signin.core.SignInAccountService; @@ -310,6 +311,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid private GatewayMerchantApply gatewayMerchantApply; @Resource private RetailRSvcService retailRSvcService; + @Resource + private RServicesApplyService rServicesApplyService; @Resource @@ -6582,15 +6585,26 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } saveIncrementalService.put("client_id", client.getInteger("client_id")); saveIncrementalService.put("operator", manager.getString("display_name")); - saveIncrementalService.put("incremental_mode", incrementalService.getInteger("incremental_mode")); - saveIncrementalService.put("incremental_rate_value", incrementalService.getInteger("incremental_mode") == 1 ? incrementalService.getString("incremental_rate_value") : 0); - saveIncrementalService.put("total_incremental_amount", incrementalService.getInteger("incremental_mode") != 1 ? incrementalService.getString("total_incremental_amount") : 0); + //增值模式1:固定手续费;2:固定金额扣款 + saveIncrementalService.put("incremental_mode", incrementalService.getIntValue("incremental_rate_value") == 0 ? 2 : 1); + saveIncrementalService.put("incremental_rate_value", incrementalService.getString("incremental_rate_value")); + saveIncrementalService.put("total_incremental_amount", incrementalService.getString("total_incremental_amount")); + saveIncrementalService.put("title", incrementalService.getString("title")); if (existIncrementalService == null) { clientIncrementalMapper.save(saveIncrementalService); + if (incrementalService.getBigDecimal("total_incremental_amount").compareTo(new BigDecimal(0)) > 0) { + saveIncrementalService.put("amount", incrementalService.getString("total_incremental_amount")); + saveIncrementalService.put("service_code", "RYCBSM"); + String title = incrementalService.getString("title"); + if (StringUtils.isBlank(title)) { + title = "RP跨境商城开通费用"; + } + saveIncrementalService.put("title", title); + rServicesApplyService.saveDebitDetail(saveIncrementalService, client); + } } else { clientIncrementalMapper.update(saveIncrementalService); } - } @Override diff --git a/src/main/java/au/com/royalpay/payment/manage/rservices/core/RServicesApplyService.java b/src/main/java/au/com/royalpay/payment/manage/rservices/core/RServicesApplyService.java index 15418afcf..f9a30854d 100644 --- a/src/main/java/au/com/royalpay/payment/manage/rservices/core/RServicesApplyService.java +++ b/src/main/java/au/com/royalpay/payment/manage/rservices/core/RServicesApplyService.java @@ -10,4 +10,6 @@ public interface RServicesApplyService { void passServicesApply(String applyId, JSONObject manager); void refuseServicesApply(String applyId, JSONObject manager); + + void saveDebitDetail(JSONObject applyInfo, JSONObject client); } diff --git a/src/main/java/au/com/royalpay/payment/manage/rservices/core/impl/RServicesApplyServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/rservices/core/impl/RServicesApplyServiceImpl.java index 5d7a07efa..a1f50a21c 100644 --- a/src/main/java/au/com/royalpay/payment/manage/rservices/core/impl/RServicesApplyServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/rservices/core/impl/RServicesApplyServiceImpl.java @@ -141,6 +141,12 @@ public class RServicesApplyServiceImpl implements RServicesApplyService { private void afterPassProcessingApply(JSONObject applyInfo) { JSONObject client = clientManager.getClientInfo(applyInfo.getIntValue("client_id")); + saveDebitDetail(applyInfo, client); + sendNotify(applyInfo, client); + } + + @Override + public void saveDebitDetail(JSONObject applyInfo, JSONObject client) { String orderId = "R-" + client.getString("client_moniker") + "-" + applyInfo.getString("service_code") + "-" + DateFormatUtils.format(new Date(), "yyyyMMddHHmmssSSS") + "-" + RandomStringUtils.random(3, true, false).toUpperCase(); JSONObject transaction = new JSONObject(); transaction.put("org_id", client.getIntValue("org_id")); @@ -182,8 +188,6 @@ public class RServicesApplyServiceImpl implements RServicesApplyService { order.put("status", 7); order.put("channel", "System"); pmtOrderMapper.save(order); - - sendNotify(applyInfo, client); } private void sendNotify(JSONObject applyInfo, JSONObject client) { diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index 49d1cfb4c..c4b9dbebf 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -5759,13 +5759,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.isCreate = true; $scope.initData =function(){ $scope.isCreate = angular.copy(params.isCreate); - if($scope.isCreate ){ - $scope.model.incremental_mode = "1" + if($scope.isCreate){ $scope.model.channel= angular.copy(params.channelOptions[0]) $scope.model.channelOptions= angular.copy(params.channelOptions) }else{ $scope.model = angular.copy(params.serviceChannel); - $scope.model.incremental_mode = $scope.model.incremental_mode.toString() } } $scope.initData(); diff --git a/src/main/ui/static/payment/partner/templates/incremental_service_dialog.html b/src/main/ui/static/payment/partner/templates/incremental_service_dialog.html index 0c2de0935..c75da2ff5 100644 --- a/src/main/ui/static/payment/partner/templates/incremental_service_dialog.html +++ b/src/main/ui/static/payment/partner/templates/incremental_service_dialog.html @@ -18,19 +18,7 @@ -
- -
- - Required Field -
-
-
+
@@ -50,7 +38,8 @@
-
+
+
+ +
+ +
+
+
+ +
+ +
+
+ Required Field +
+
+
+
@@ -69,4 +77,4 @@ \ No newline at end of file +