From 49548f0137666348a3f4c6e1c03c128fe47e7148 Mon Sep 17 00:00:00 2001 From: luoyang Date: Tue, 18 Sep 2018 11:14:30 +0800 Subject: [PATCH 001/103] add 5% --- .../system/SysRpayMerchantApplyMapper.java | 4 +- .../core/impls/ClientManagerImpl.java | 4 +- .../static/payment/partner/partner-manage.js | 87 ++++++++-- .../templates/apply_rpay_sub_merchant_id.html | 164 ++++++++++++++++++ 4 files changed, 241 insertions(+), 18 deletions(-) create mode 100644 src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysRpayMerchantApplyMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysRpayMerchantApplyMapper.java index 9aa1cdbff..898ac3661 100644 --- a/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysRpayMerchantApplyMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysRpayMerchantApplyMapper.java @@ -10,7 +10,7 @@ import org.apache.ibatis.annotations.Param; import java.util.List; /** - * Created by yangluo on 2017-03-14. + * Created by yangluo on 2018-09-18. */ @AutoMapper(tablename = "sys_rpay_merchant_apply",pkName = "merchant_app_id") public interface SysRpayMerchantApplyMapper { @@ -21,6 +21,6 @@ public interface SysRpayMerchantApplyMapper { void insertRpayMerchantApply(JSONObject params); @AutoSql(type = SqlType.SELECT) - List selectByShortName(@Param("client_id") int client_id,@Param("merchant_shortname") String shortName); + List listByShortName(@Param("client_id") int client_id,@Param("merchant_shortname") String shortName); } 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 4defc9826..870653d59 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 @@ -3582,9 +3582,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } checkOrgPermission(manager, client); - List selectByshortName = sysRpayMerchantApplyMapper.selectByShortName(client.getIntValue("client_id"),client.getString("short_name")); + List listByshortName = sysRpayMerchantApplyMapper.listByShortName(client.getIntValue("client_id"),client.getString("short_name")); - if (selectByshortName.size()>0) { + if (listByshortName.size()>0) { throw new BadRequestException("请修改【" + clientMoniker + "】的Company shortName信息(请避免和Rpay+商务号列表内的Company Short Name重复)"); } diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index b855dae98..8de911884 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -3129,20 +3129,29 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }) }; $scope.applyRpaySubMerchantId = function () { - $http.post('/sys/partners/' + $scope.partner.client_moniker + '/registRpaySubMerchantId').then(function (resp) { - commonDialog.alert({ - title: 'Success', - content: 'Modify Rpay+ Sub Merchant ID successfully', - type: 'success' - }); - $state.reload(); - }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) - }); - - - - + $uibModal.open({ + templateUrl: '/static/payment/partner/templates/apply_rpay_sub_merchant_id', + controller: 'applyRpaySubMerchantIdCtrl', + resolve: { + subMerchantInfo: function () { + return $scope.partner; + }, + merchantIds: ['$http', '$stateParams', function ($http) { + $http.post('/sys/partners/' + $scope.partner.client_moniker + '/registRpaySubMerchantId').then(function (resp) { + commonDialog.alert({ + title: 'Success', + content: 'Modify Rpay+ Sub Merchant ID successfully', + type: 'success' + }); + $state.reload(); + }, function (resp) { + commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + }); + }] + } + }).result.then(function () { + $scope.loadSubMerchantInfos(); + }) }; $scope.loadSubMerchantInfos(); }]); @@ -3194,6 +3203,56 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }) } }]); + + app.controller('applyRpaySubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', '$filter', 'merchantIds', 'commonDialog', function ($scope, $http, $uibModal, $state, subMerchantInfo, $filter, merchantIds, commonDialog) { + $scope.wxIndustries = angular.copy(wxMerchantIndustries); + $scope.subMerchantInfo = angular.copy(subMerchantInfo); + $scope.merchantIds = merchantIds.data; + $scope.subMerchantInfo.industry = $filter('wxindustries')($scope.subMerchantInfo.industry); + $scope.saveAppliy = function (form) { + $scope.errmsg = null; + if (form.$invalid) { + angular.forEach(form, function (item, key) { + if (key.indexOf('$') < 0) { + item.$dirty = true; + } + }); + return; + } + $http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/registRpaySubMerchantId', $scope.subMerchantInfo).then(function (resp) { + $scope.apply_sub_merchant_id = resp.data; + $scope.$close(); + if (subMerchantInfo.sub_merchant_id != null) { + commonDialog.confirm({title: 'Confirm', content: '已申请成功,是否确认使用'}).then(function () { + $http.put('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/payment_config', {sub_merchant_id: $scope.apply_sub_merchant_id}).then(function (resp) { + commonDialog.alert({ + title: 'Success', + content: 'Modify Wechat Sub Merchant ID successfully', + type: 'success' + }); + $state.reload(); + }, function (resp) { + commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + }); + }) + } else { + $http.put('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/payment_config', {sub_merchant_id: $scope.apply_sub_merchant_id}).then(function (resp) { + commonDialog.alert({ + title: 'Success', + content: 'Apply Success And Modify Wechat Sub Merchant ID successfully', + type: 'success' + }); + $state.reload(); + }, function (resp) { + commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + }); + } + }, function (resp) { + $scope.errmsg = resp.data.message; + }) + } + }]); + app.controller('permissionClientCtrl', ['$scope', '$http', '$uibModal', '$state', '$filter', 'commonDialog', function ($scope, $http, $uibModal, $state, $filter, commonDialog) { $scope.clientPermission = {client_moniker:$scope.partner.client_moniker}; $scope.loadPermissionList = function () { diff --git a/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html b/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html new file mode 100644 index 000000000..34b94f7d4 --- /dev/null +++ b/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html @@ -0,0 +1,164 @@ +
+
+
+
+
+
Apply Sub Merchant Id
+
+
+
+ +
+ +
+

Required Field

+

Length is more than 50

+
+
+
+ +
+ +
+ +
+

Required Field

+
+
+
+

More than 50

+
+
+ +
+ +
+ +
+

Required Field

+

Length is more than 50

+
+
+
+ +
+ +
+ +
+

Required Field

+
+
+
+

More than 50

+
+
+ +
+ +
+ +
+
+
+
+ +
+ +
+

Required Field

+

Length is more than 20

+
+
+
+ +
+ +
+ +
+

Required Field

+

Length is more than 256

+

Length is less than 10

+
+
+
+ +
+ +
+ +
+

Required Field

+
+
+ +
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+
+ + + + + + + + +
+ +
+
+
+
+
\ No newline at end of file From 8c5e51982d700b2f10dbbbc6ea80f9a12b7fa417 Mon Sep 17 00:00:00 2001 From: luoyang Date: Tue, 18 Sep 2018 14:33:00 +0800 Subject: [PATCH 002/103] add 10% --- .../static/payment/partner/partner-manage.js | 52 ++---- .../templates/apply_rpay_sub_merchant_id.html | 169 ++++++++++++++---- 2 files changed, 142 insertions(+), 79 deletions(-) diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index 8de911884..63b2127d4 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -3130,24 +3130,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }; $scope.applyRpaySubMerchantId = function () { $uibModal.open({ - templateUrl: '/static/payment/partner/templates/apply_rpay_sub_merchant_id', + templateUrl: '/static/payment/partner/templates/apply_rpay_sub_merchant_id.html', controller: 'applyRpaySubMerchantIdCtrl', resolve: { subMerchantInfo: function () { return $scope.partner; - }, - merchantIds: ['$http', '$stateParams', function ($http) { - $http.post('/sys/partners/' + $scope.partner.client_moniker + '/registRpaySubMerchantId').then(function (resp) { - commonDialog.alert({ - title: 'Success', - content: 'Modify Rpay+ Sub Merchant ID successfully', - type: 'success' - }); - $state.reload(); - }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) - }); - }] + } } }).result.then(function () { $scope.loadSubMerchantInfos(); @@ -3199,17 +3187,18 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); } }, function (resp) { - $scope.errmsg = resp.data.message; + commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) }) } }]); - app.controller('applyRpaySubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', '$filter', 'merchantIds', 'commonDialog', function ($scope, $http, $uibModal, $state, subMerchantInfo, $filter, merchantIds, commonDialog) { + app.controller('applyRpaySubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', 'businessStructuresMap','$filter', 'commonDialog','timezone', function ($scope, $http, $uibModal, $state, subMerchantInfo, businessStructuresMap,$filter, commonDialog,timezone) { $scope.wxIndustries = angular.copy(wxMerchantIndustries); $scope.subMerchantInfo = angular.copy(subMerchantInfo); - $scope.merchantIds = merchantIds.data; $scope.subMerchantInfo.industry = $filter('wxindustries')($scope.subMerchantInfo.industry); - $scope.saveAppliy = function (form) { + $scope.business_structures = businessStructuresMap.configs(); + + $scope.saveRpayAppliy = function (form) { $scope.errmsg = null; if (form.$invalid) { angular.forEach(form, function (item, key) { @@ -3223,29 +3212,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.apply_sub_merchant_id = resp.data; $scope.$close(); if (subMerchantInfo.sub_merchant_id != null) { - commonDialog.confirm({title: 'Confirm', content: '已申请成功,是否确认使用'}).then(function () { - $http.put('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/payment_config', {sub_merchant_id: $scope.apply_sub_merchant_id}).then(function (resp) { - commonDialog.alert({ - title: 'Success', - content: 'Modify Wechat Sub Merchant ID successfully', - type: 'success' - }); - $state.reload(); - }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) - }); - }) - } else { - $http.put('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/payment_config', {sub_merchant_id: $scope.apply_sub_merchant_id}).then(function (resp) { - commonDialog.alert({ - title: 'Success', - content: 'Apply Success And Modify Wechat Sub Merchant ID successfully', - type: 'success' - }); - $state.reload(); - }, function (resp) { - commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}) + commonDialog.alert({ + title: 'Success', + content: 'Modify Rpay+ Sub Merchant ID successfully', + type: 'success' }); + $state.reload(); } }, function (resp) { $scope.errmsg = resp.data.message; diff --git a/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html b/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html index 34b94f7d4..84d908278 100644 --- a/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html +++ b/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html @@ -8,7 +8,7 @@
- +
@@ -21,30 +21,24 @@
- +
- -
+ +

Required Field

+

Length is more than 50

-
-
-

More than 50

-
+
- + ng-class="{'has-error':subForm.company_shortname.$invalid && subForm.company_shortname.$dirty}"> +
-
+ type="text" name="company_shortname" id="company_shortname_input" required maxlength="50"> +

Required Field

Length is more than 50

@@ -78,70 +72,167 @@
+
- + ng-class="{'has-error':subForm.description.$invalid && subForm.description.$dirty}"> +
- -
+ +

Required Field

-

Length is more than 20

+

Length is more than 256

+

Length is less than 10

-
- +
+
- -
+ +

Required Field

-

Length is more than 256

-

Length is less than 10

+

Length is more than 10

+
+
+
+ +
+ +
+ +
+

Required Field

+

Length is more than 10

- + ng-class="{'has-error':subForm.business_structure.$invalid && subForm.business_structure.$dirty}"> + +
+ +
+
+ + +
+
-
+ type="tel" name="company_phone" id="company_phone_input" required> +

Required Field

-
+
+
+

Required Field

+
-
+
+
+

Required Field

+
-
+
+
+

Required Field

+
+
+
+ +
+ +
+ +
+

Required Field

+
+
+
+ +
+ +
+ +
+

Required Field

+

Length is more than 50

+
+
+ +
+ +
+

Required Field

+

Length is more than 10

+
+
+
+ +
+ +
+ +
+

Required Field

+

Length is more than 10

+
+
+
+ +
+ +
+ +
+

Required Field

+

Length is more than 10

+
+
+
+ + + + +
@@ -155,7 +246,7 @@
From d215a7fa8af86de7b63e381ff09951a66a066401 Mon Sep 17 00:00:00 2001 From: kira <164851225@qq.com> Date: Tue, 18 Sep 2018 16:10:42 +0800 Subject: [PATCH 003/103] fix --- .../static/payment/partner/templates/partner_bankaccounts.html | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/ui/static/payment/partner/templates/partner_bankaccounts.html b/src/main/ui/static/payment/partner/templates/partner_bankaccounts.html index 49679a2f3..f1e00b160 100644 --- a/src/main/ui/static/payment/partner/templates/partner_bankaccounts.html +++ b/src/main/ui/static/payment/partner/templates/partner_bankaccounts.html @@ -171,6 +171,7 @@
  • Bestpay
  • JDpay
  • HFpay
  • +
  • Rpay+
  • From 8667dbee0ef602fc70b79114638a0268c00841f3 Mon Sep 17 00:00:00 2001 From: luoyang Date: Tue, 18 Sep 2018 16:20:59 +0800 Subject: [PATCH 004/103] fix rpay clearing html --- .../partner/templates/partner_new_rate.html | 24 +++++++++++++++++++ .../templates/sub_merchant_id_apply.html | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/main/ui/static/payment/partner/templates/partner_new_rate.html b/src/main/ui/static/payment/partner/templates/partner_new_rate.html index 02f7c1875..ee45ccec7 100644 --- a/src/main/ui/static/payment/partner/templates/partner_new_rate.html +++ b/src/main/ui/static/payment/partner/templates/partner_new_rate.html @@ -160,6 +160,30 @@ +
    + +
    +
    + +
    %
    +
    +
    +
    + No more than 2.2% +
    +
    + No less than 0.6% +
    +
    + Required Field +
    +
    + +
    +
    +
    diff --git a/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html b/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html index 40fc8c119..95381f8dd 100644 --- a/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html +++ b/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html @@ -95,7 +95,7 @@
    -

    +

    Rpay+ Sub Merchant Id : {{partner.rpay_enterprise_id}}

    From 6929fa2ebbbe32acecd7615a25fe64c01b34dbc6 Mon Sep 17 00:00:00 2001 From: luoyang Date: Tue, 18 Sep 2018 16:34:03 +0800 Subject: [PATCH 005/103] fix rpay clearing html --- .../static/payment/partner/templates/sub_merchant_id_apply.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html b/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html index 95381f8dd..66ebd8403 100644 --- a/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html +++ b/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html @@ -95,7 +95,7 @@
    -

    +

    Rpay+ Sub Merchant Id : {{partner.rpay_enterprise_id}}

    From 6a368f7b658d4fc9fac2ebdb5d54e4e3d1bc3cf4 Mon Sep 17 00:00:00 2001 From: kira <164851225@qq.com> Date: Tue, 18 Sep 2018 17:48:59 +0800 Subject: [PATCH 006/103] add customerId --- src/main/ui/static/templates/rpay/v1/payment.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/ui/static/templates/rpay/v1/payment.js b/src/main/ui/static/templates/rpay/v1/payment.js index 74397a9c1..dfc96b138 100644 --- a/src/main/ui/static/templates/rpay/v1/payment.js +++ b/src/main/ui/static/templates/rpay/v1/payment.js @@ -255,6 +255,7 @@ $(function () { } data.coupons = dataCache.coupons; data.qrcodeVersion = window.qrcodeVersion; + data.customerId = window.customerId; dataCache.remark = ''; @@ -424,7 +425,7 @@ $(function () { function getUserId(){ window.RPayPlus.send("getUserId", null, function(data){ - window.Rpay.userInfo = data; + window.customerId = data; }); } From 48247667efbe4a081acf0bdf625fddcfb5a20107 Mon Sep 17 00:00:00 2001 From: luoyang Date: Tue, 18 Sep 2018 18:15:52 +0800 Subject: [PATCH 007/103] add 40% --- .../manage/mappers/system/ClientMapper.java | 3 ++ .../manage/merchants/core/ClientManager.java | 2 +- .../core/impls/ClientManagerImpl.java | 5 +- .../static/payment/partner/partner-manage.js | 46 ++++++++++++------- .../templates/apply_rpay_sub_merchant_id.html | 37 ++++++--------- 5 files changed, 49 insertions(+), 44 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 da095448a..f42b842c5 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 @@ -99,4 +99,7 @@ public interface ClientMapper { List findByhfPayUrlNotNull(); + @AutoSql(type = SqlType.UPDATE) + void updateRpayEnterpriseId(@Param("client_id") int clientId, @Param("rpay_enterprise_id") String rpayEnterpriseId); + } 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 0604c11e3..925136d37 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 @@ -336,6 +336,6 @@ public interface ClientManager { void updateAllPartnerPassword(String clientMoniker, List emails); - String subRpayMerchantApplication(String clientMoniker, JSONObject manager); + void subRpayMerchantApplication(String clientMoniker, JSONObject manager); } 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 870653d59..f7374de7b 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 @@ -3575,7 +3575,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } @Override - public String subRpayMerchantApplication(String clientMoniker, JSONObject manager) { + public void subRpayMerchantApplication(String clientMoniker, JSONObject manager) { JSONObject client = getClientInfoByMoniker(clientMoniker); if (client == null) { throw new InvalidShortIdException(); @@ -3602,11 +3602,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid merchantApply.put("business_category", client.getString("royalpayindustry")); merchantApply.put("merchant_shortname", client.getString("short_name")); sysRpayMerchantApplyMapper.insertRpayMerchantApply(merchantApply); + clientMapper.updateRpayEnterpriseId(client.getIntValue("client_id"), rpayMerchantInfo.getString("merchantId")); }else { throw new BadRequestException("请求失败"); } - - return null; } @Override diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index 63b2127d4..8a65a6128 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -3193,13 +3193,14 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }]); app.controller('applyRpaySubMerchantIdCtrl', ['$scope', '$http', '$uibModal', '$state', 'subMerchantInfo', 'businessStructuresMap','$filter', 'commonDialog','timezone', function ($scope, $http, $uibModal, $state, subMerchantInfo, businessStructuresMap,$filter, commonDialog,timezone) { - $scope.wxIndustries = angular.copy(wxMerchantIndustries); $scope.subMerchantInfo = angular.copy(subMerchantInfo); - $scope.subMerchantInfo.industry = $filter('wxindustries')($scope.subMerchantInfo.industry); $scope.business_structures = businessStructuresMap.configs(); + $scope.timezone = timezone.configs(); + $scope.saveRpayAppliy = function (form) { - $scope.errmsg = null; + $scope.merchantInfo = angular.copy(form); + $scope.errmsg = null; if (form.$invalid) { angular.forEach(form, function (item, key) { if (key.indexOf('$') < 0) { @@ -3208,20 +3209,31 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); return; } - $http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/registRpaySubMerchantId', $scope.subMerchantInfo).then(function (resp) { - $scope.apply_sub_merchant_id = resp.data; - $scope.$close(); - if (subMerchantInfo.sub_merchant_id != null) { - commonDialog.alert({ - title: 'Success', - content: 'Modify Rpay+ Sub Merchant ID successfully', - type: 'success' - }); - $state.reload(); - } - }, function (resp) { - $scope.errmsg = resp.data.message; - }) + + angular.forEach(form, function (item, key) { + if(item !=null) { + console.log("++++" + key + item.$name) + + } + }); + + // var str = angular.toJson(form, true); + // console.log("----------" + str); + + // $http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/registRpaySubMerchantId', $scope.merchantInfo).then(function (resp) { + // $scope.apply_sub_merchant_id = resp.data; + // $scope.$close(); + // if (subMerchantInfo.sub_merchant_id != null) { + // commonDialog.alert({ + // title: 'Success', + // content: 'Modify Rpay+ Sub Merchant ID successfully', + // type: 'success' + // }); + // $state.reload(); + // } + // }, function (resp) { + // $scope.errmsg = resp.data.message; + // }) } }]); diff --git a/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html b/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html index 84d908278..d13ba4af6 100644 --- a/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html +++ b/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html @@ -8,6 +8,7 @@
    +
    -
    - -
    - -
    -

    Required Field

    -
    -
    -
    -

    More than 50

    -
    -
    -
    + type="text" name="website" id="website_input">
    -
    -
    @@ -113,7 +93,7 @@
    - +
    + + +
    +
    + From de55f0b10c85d3debc883d280f201900a12b6d72 Mon Sep 17 00:00:00 2001 From: luoyang Date: Tue, 18 Sep 2018 18:31:43 +0800 Subject: [PATCH 008/103] fix merchant --- .../payment/manage/mappers/system/ClientMapper.java | 3 +++ .../mappers/system/SysRpayMerchantApplyMapper.java | 2 +- .../payment/manage/merchants/core/ClientManager.java | 2 +- .../manage/merchants/core/impls/ClientManagerImpl.java | 9 ++++----- .../manage/merchants/web/PartnerManageController.java | 4 ++-- 5 files changed, 11 insertions(+), 9 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 da095448a..f42b842c5 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 @@ -99,4 +99,7 @@ public interface ClientMapper { List findByhfPayUrlNotNull(); + @AutoSql(type = SqlType.UPDATE) + void updateRpayEnterpriseId(@Param("client_id") int clientId, @Param("rpay_enterprise_id") String rpayEnterpriseId); + } diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysRpayMerchantApplyMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysRpayMerchantApplyMapper.java index 9aa1cdbff..06664dc14 100644 --- a/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysRpayMerchantApplyMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysRpayMerchantApplyMapper.java @@ -21,6 +21,6 @@ public interface SysRpayMerchantApplyMapper { void insertRpayMerchantApply(JSONObject params); @AutoSql(type = SqlType.SELECT) - List selectByShortName(@Param("client_id") int client_id,@Param("merchant_shortname") String shortName); + List listByShortName(@Param("client_id") int client_id,@Param("merchant_shortname") String shortName); } 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 7808c732b..3e03074d9 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 @@ -336,7 +336,7 @@ public interface ClientManager { void sendHfEmailNotice(JSONObject order); - String subRpayMerchantApplication(String clientMoniker, JSONObject manager); + void subRpayMerchantApplication(String clientMoniker, JSONObject manager); void updateAllPartnerPassword(String clientMoniker, List emails); } 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 9636537e8..01d570fc5 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 @@ -3598,16 +3598,16 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } @Override - public String subRpayMerchantApplication(String clientMoniker, JSONObject manager) { + public void subRpayMerchantApplication(String clientMoniker, JSONObject manager) { JSONObject client = getClientInfoByMoniker(clientMoniker); if (client == null) { throw new InvalidShortIdException(); } checkOrgPermission(manager, client); - List selectByshortName = sysRpayMerchantApplyMapper.selectByShortName(client.getIntValue("client_id"),client.getString("short_name")); + List listByshortName = sysRpayMerchantApplyMapper.listByShortName(client.getIntValue("client_id"),client.getString("short_name")); - if (selectByshortName.size()>0) { + if (listByshortName.size()>0) { throw new BadRequestException("请修改【" + clientMoniker + "】的Company shortName信息(请避免和Rpay+商务号列表内的Company Short Name重复)"); } @@ -3625,11 +3625,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid merchantApply.put("business_category", client.getString("royalpayindustry")); merchantApply.put("merchant_shortname", client.getString("short_name")); sysRpayMerchantApplyMapper.insertRpayMerchantApply(merchantApply); + clientMapper.updateRpayEnterpriseId(client.getIntValue("client_id"), rpayMerchantInfo.getString("merchantId")); }else { throw new BadRequestException("请求失败"); } - - return null; } @Override 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 768b1ebcb..6d186abbe 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 @@ -582,8 +582,8 @@ public class PartnerManageController { clientManager.switchPermission(manager, clientMoniker, "enable_hf_email_notice", pass.getBooleanValue("allow")); } @ManagerMapping(value = "/{clientMoniker}/registRpaySubMerchantId", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) - public String subRpayMerchantApplication(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { - return clientManager.subRpayMerchantApplication(clientMoniker, manager); + public void subRpayMerchantApplication(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { + clientManager.subRpayMerchantApplication(clientMoniker, manager); } } From 0b70366c7ef1964cef3e90cf28ce67fcf175d17d Mon Sep 17 00:00:00 2001 From: yangkai Date: Tue, 18 Sep 2018 18:44:46 +0800 Subject: [PATCH 009/103] =?UTF-8?q?=E6=B7=BB=E5=8A=A0app=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../support/cms/core/AppStyleService.java | 15 ++ .../cms/core/Impl/AppStyleServiceImpl.java | 101 ++++++++ .../support/cms/web/AppStyleController.java | 42 ++++ src/main/ui/static/cms/cms.js | 233 +++++++++++++++++- .../ui/static/cms/templates/app_style.html | 65 +++++ .../cms/templates/app_style_config.html | 67 +++++ .../cms/templates/app_style_preview.html | 46 ++++ .../ui/static/cms/templates/cms_root.html | 3 + .../risk/templates/attention_merchants.html | 2 +- 9 files changed, 572 insertions(+), 2 deletions(-) create mode 100644 src/main/java/au/com/royalpay/payment/manage/support/cms/core/AppStyleService.java create mode 100644 src/main/java/au/com/royalpay/payment/manage/support/cms/core/Impl/AppStyleServiceImpl.java create mode 100644 src/main/java/au/com/royalpay/payment/manage/support/cms/web/AppStyleController.java create mode 100644 src/main/ui/static/cms/templates/app_style.html create mode 100644 src/main/ui/static/cms/templates/app_style_config.html create mode 100644 src/main/ui/static/cms/templates/app_style_preview.html diff --git a/src/main/java/au/com/royalpay/payment/manage/support/cms/core/AppStyleService.java b/src/main/java/au/com/royalpay/payment/manage/support/cms/core/AppStyleService.java new file mode 100644 index 000000000..3b83a79f5 --- /dev/null +++ b/src/main/java/au/com/royalpay/payment/manage/support/cms/core/AppStyleService.java @@ -0,0 +1,15 @@ +package au.com.royalpay.payment.manage.support.cms.core; + +import com.alibaba.fastjson.JSONObject; + +public interface AppStyleService { + JSONObject listAppStyleGroup(int page, int limit); + + JSONObject getAppStyleByStyleId(String style_id); + + void switchGroupByStyleId(String style_id); + + void addAppStyle(String style_id, JSONObject appStyleGroup); + + void updateAppStyleByStyleId(String style_id, String originStyleId, JSONObject appStyleGroup); +} diff --git a/src/main/java/au/com/royalpay/payment/manage/support/cms/core/Impl/AppStyleServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/support/cms/core/Impl/AppStyleServiceImpl.java new file mode 100644 index 000000000..60aa24644 --- /dev/null +++ b/src/main/java/au/com/royalpay/payment/manage/support/cms/core/Impl/AppStyleServiceImpl.java @@ -0,0 +1,101 @@ +package au.com.royalpay.payment.manage.support.cms.core.Impl; + +import au.com.royalpay.payment.manage.support.cms.core.AppStyleService; +import au.com.royalpay.payment.tools.exceptions.ServerErrorException; +import cn.yixblog.platform.http.HttpRequestGenerator; +import cn.yixblog.platform.http.HttpRequestResult; +import com.alibaba.fastjson.JSONObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.web.bind.annotation.RequestMethod; + +import java.io.IOException; +import java.net.URISyntaxException; + +@Service +public class AppStyleServiceImpl implements AppStyleService { + + @Value("http://127.0.0.1:9533") + private String cmsHost; + private Logger logger = LoggerFactory.getLogger(getClass()); + + @Override + public JSONObject listAppStyleGroup(int page, int limit) { + String url = concatUrl("/app/style_group"); + HttpRequestGenerator gen = new HttpRequestGenerator(url, RequestMethod.GET).addQueryString("page", page + "").addQueryString("limit", limit + ""); + try { + HttpRequestResult res = gen.execute(); + if (res.isSuccess()) { + return res.getResponseContentJSONObj(); + } + } catch (URISyntaxException | IOException e) { + logger.error(e.getMessage(), e); + } + throw new ServerErrorException("Failed to request CMS"); + } + + @Override + public JSONObject getAppStyleByStyleId(String style_id) { + String url = concatUrl("/app/style_group/" + style_id); + HttpRequestGenerator gen = new HttpRequestGenerator(url, RequestMethod.GET); + try { + HttpRequestResult res = gen.execute(); + if (res.isSuccess()) { + return res.getResponseContentJSONObj(); + } + } catch (URISyntaxException | IOException e) { + logger.error(e.getMessage(), e); + } + throw new ServerErrorException("Failed to request CMS"); + } + + @Override + public void switchGroupByStyleId(String style_id) { + String url = concatUrl("/app/style_group/" + style_id); + try { + HttpRequestResult res = new HttpRequestGenerator(url, RequestMethod.PUT).execute(); + if (res.isSuccess()) { + return; + } + } catch (URISyntaxException e) { + logger.error(e.getMessage(), e); + } + throw new ServerErrorException("Failed to request CMS"); + } + + @Override + public void addAppStyle(String style_id, JSONObject appStyleGroup) { + String url = concatUrl("/app/style_group"); + try { + HttpRequestResult gen = new HttpRequestGenerator(url, RequestMethod.POST).addQueryString("style_id", style_id).setJSONEntity(appStyleGroup).execute(); + if (gen.isSuccess()) { + return; + } + } catch (URISyntaxException e) { + logger.error(e.getMessage(), e); + } + throw new ServerErrorException("Failed to request CMS"); + } + + @Override + public void updateAppStyleByStyleId(String style_id, String originStyleId, JSONObject appStyleGroup) { + String url = concatUrl("/app/style_group/" + style_id + "/style"); + try { + HttpRequestResult gen = new HttpRequestGenerator(url, RequestMethod.PUT).addQueryString("originStyleId", originStyleId).setJSONEntity(appStyleGroup).execute(); + if (gen.isSuccess()) { + return; + } + } catch (URISyntaxException e) { + logger.error(e.getMessage(), e); + } + throw new ServerErrorException("Failed to request CMS"); + } + + private String concatUrl(String uri) { + String host = cmsHost.endsWith("/") ? cmsHost.substring(0, cmsHost.length() - 1) : cmsHost; + uri = uri.startsWith("/") ? uri.substring(1) : uri; + return host + "/" + uri; + } +} diff --git a/src/main/java/au/com/royalpay/payment/manage/support/cms/web/AppStyleController.java b/src/main/java/au/com/royalpay/payment/manage/support/cms/web/AppStyleController.java new file mode 100644 index 000000000..2ea0a87e0 --- /dev/null +++ b/src/main/java/au/com/royalpay/payment/manage/support/cms/web/AppStyleController.java @@ -0,0 +1,42 @@ +package au.com.royalpay.payment.manage.support.cms.web; + + +import au.com.royalpay.payment.manage.permission.manager.ManagerMapping; +import au.com.royalpay.payment.manage.support.cms.core.AppStyleService; +import au.com.royalpay.payment.tools.permission.enums.ManagerRole; +import com.alibaba.fastjson.JSONObject; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +@RestController +@ManagerMapping(value = "/app/cms/app_style", role = {ManagerRole.SITE_MANAGER}) +public class AppStyleController { + @Resource + private AppStyleService appStyleService; + + @RequestMapping(value = "/style_group", method = RequestMethod.GET) + public JSONObject listAppStyleGroup(@RequestParam(defaultValue = "1") int page, @RequestParam(defaultValue = "10") int limit) { + return appStyleService.listAppStyleGroup(page, limit); + } + + @RequestMapping(value = "/style_group/{style_id}", method = RequestMethod.GET) + public JSONObject getAppStyleByStyleId(@PathVariable String style_id) { + return appStyleService.getAppStyleByStyleId(style_id); + } + + @RequestMapping(value = "/style_group/{style_id}", method = RequestMethod.PUT) + public void switchGroupByStyleId(@PathVariable String style_id) { + appStyleService.switchGroupByStyleId(style_id); + } + + @RequestMapping(value = "/style_group", method = RequestMethod.POST) + public void addOneGroupAppStyle(@RequestParam String style_id, @RequestBody JSONObject appStyleGroup) { + appStyleService.addAppStyle(style_id, appStyleGroup); + } + + @RequestMapping(value = "/style_group/{style_id}/style", method = RequestMethod.PUT) + public void updateAppStyleByStyleId(@PathVariable String style_id,@RequestParam String originStyleId, @RequestBody JSONObject appStyleGroup) { + appStyleService.updateAppStyleByStyleId(style_id, originStyleId, appStyleGroup); + } +} diff --git a/src/main/ui/static/cms/cms.js b/src/main/ui/static/cms/cms.js index 3ab730034..156cda39b 100644 --- a/src/main/ui/static/cms/cms.js +++ b/src/main/ui/static/cms/cms.js @@ -4,6 +4,67 @@ define(['angular', 'uiRouter', 'static/commons/angular-ueditor'], function (angular) { 'use strict'; var app = angular.module('cms', ['ui.router','ng.uditor']); + var style = [ + { + "style_key":"settlement", + "style_value":"" + }, + { + "style_key":"home_select", + "style_value":"" + }, + { + "style_key":"activity_gray", + "style_value":"" + }, + { + "style_key":"activity_select", + "style_value":"" + }, + { + "style_key":"mess_gray", + "style_value":"" + }, + { + "style_key":"mess_select", + "style_value":"" + }, + { + "style_key":"my_select", + "style_value":"" + }, + { + "style_key":"transaction", + "style_value":"" + }, + { + "style_key":"statistics", + "style_value":"" + }, + { + "style_key":"marketing_account", + "style_value":"" + }, + { + "style_key":"usergroup", + "style_value":"" + }, + { + "style_key":"coupon", + "style_value":"" + }, + { + "style_key":"rpbill", + "style_value":"" + }, + { + "style_key":"invoice_assistant", + "style_value":"" + }, + { + "style_key":"home_gray", + "style_value":"" + }]; app.config(['$stateProvider', function ($stateProvider) { $stateProvider.state('cms', { url: '/cms', @@ -38,7 +99,41 @@ define(['angular', 'uiRouter', 'static/commons/angular-ueditor'], function (angu }).state('cms.phone_top_up', { url: '/phone_top_up', controller: 'CmsPhonetopupCtrl', - templateUrl: '/static/cms/templates/phone_top_up.html' + templateUrl: '/static/cms/templates/phone_top_up.html', + }).state('cms.app_style',{ + url: '/app_style', + controller: 'cmsAppStyleListCtrl', + templateUrl: '/static/cms/templates/app_style.html', + }).state('cms.app_style.app_style_preview',{ + url: '/{style_id}/preview', + controller: 'cmsAppStylePreviewCtrl', + templateUrl: '/static/cms/templates/app_style_preview.html', + resolve: { + appStyles: ['$http', '$stateParams', function ($http, $stateParams) { + return $http.get('/app/cms/app_style/style_group/' + $stateParams.style_id); + }] + } + }).state('cms.app_style.app_style_save',{ + url: '/save', + controller: 'cmsAppStyleSaveCtrl', + templateUrl: '/static/cms/templates/app_style_config.html', + resolve: { + style: function () { + return angular.copy(style); + } + } + }).state('cms.app_style.app_style_edit',{ + url: '/{style_id}/edit', + controller: 'cmsAppStyleEditCtrl', + templateUrl: '/static/cms/templates/app_style_config.html', + resolve: { + appStyles: ['$http', '$stateParams', function ($http, $stateParams) { + return $http.get('/app/cms/app_style/style_group/' + $stateParams.style_id); + }], + style: function () { + return angular.copy(style); + } + } }) }]); app.controller('cmsRootCtrl', ['$scope', function ($scope) { @@ -140,6 +235,142 @@ define(['angular', 'uiRouter', 'static/commons/angular-ueditor'], function (angu $scope.article = article.data; }]); + app.controller('cmsAppStyleListCtrl', ['$scope', '$http', '$uibModal', function ($scope, $http, $uibModal) { + $scope.pagination = {}; + $scope.appStyleGroupList = function (page) { + var params = $scope.queryParams || {}; + params.page = page || $scope.pagination.page || 1; + $http.get('/app/cms/app_style/style_group', {params: params}).then(function (resp) { + $scope.appStyleGroups = resp.data.data; + $scope.pagination = resp.data.pagination; + }) + }; + $scope.appStyleGroupList(1); + }]); + + app.controller('cmsAppStylePreviewCtrl', ['$scope', '$http', 'appStyles', function ($scope, $http, appStyles) { + $scope.appStyles = appStyles.data.data; + }]); + + app.controller('cmsAppStyleEditCtrl', ['$scope', '$http', '$state','commonDialog', 'appStyles', 'style', function ($scope, $http, $state, commonDialog, appStyles, style) { + $scope.ctrl = {sending: false, flag: false, originStyleId: angular.copy(appStyles.data.data[0].style_id)}; + $scope.entity={}; + $scope.style = angular.copy(style); + $scope.entity.appStyle = angular.copy(appStyles.data.data); + $scope.params = {style_id: angular.copy(appStyles.data.data[0].style_id)}; + $scope.appStyleList = function() { + var styleKeyStr = ""; + $scope.entity.appStyle.forEach(function(item){ + styleKeyStr += item.style_key + ","; + }); + $scope.style.forEach(function(item){ + if (styleKeyStr.indexOf(item.style_key) < 0) { + $scope.entity.appStyle.push({"style_key": item.style_key,"style_value":""}); + } + }) + }; + $scope.appStyleList(); + $scope.addSpecOption = function() { + $scope.entity.appStyle.push({}); + + }; + + // 删除规格选项 + $scope.delSpecOption = function(index) { + $scope.entity.appStyle.splice(index, 1); + + }; + + $scope.saveOneGroupAppStyle = function() { + if ($scope.params.style_id == "" || $scope.params.style_id == null) { + $scope.errmsg = "title不能为空"; + return; + } + var item = ""; + for (var i=0;i<$scope.entity.appStyle.length;i++) { + item = $scope.entity.appStyle[i]; + if (item.style_value == "" || item.style_value == null) { + $scope.errmsg = "value不能为空"; + return; + } + if (item.style_value.substr(0,4).toLowerCase() != "http" && + item.style_value.substr(0,5).toLowerCase() != "https") { + $scope.errmsg = "value必须以http或者https开头"; + return; + } + + } + $scope.ctrl.sending = true; + $http.put('/app/cms/app_style/style_group/' + $scope.params.style_id + '/style?originStyleId=' + $scope.ctrl.originStyleId, $scope.entity).then(function(){ + $scope.ctrl.sending = false; + $state.go('cms.app_style.app_style_preview',{style_id: $scope.params.style_id}); + }, function (resp) { + $scope.ctrl.sending = false; + $scope.errmsg = resp.data.message; + }) + } + $scope.toggleAppStyleIsValid = function(styleId) { + if (styleId) { + commonDialog.confirm({ + title: '确认操作', + content: '当前操作将发布title为:' +styleId +"的app图标,是否确认?" + }).then(function () { + $http.put('/app/cms/app_style/style_group/' + styleId).then(function () { + $state.reload(); + }) + }) + } + } + }]); + app.controller('cmsAppStyleSaveCtrl', ['$scope', '$http', '$state', 'style', function ($scope, $http, $state, style) { + $scope.ctrl = {sending: false, flag: true}; + $scope.entity={}; + $scope.entity.appStyle = angular.copy(style); + $scope.params = {style_id: ""}; + $scope.addSpecOption = function() { + $scope.entity.appStyle.push({}); + + }; + + // 删除规格选项 + $scope.delSpecOption = function(index) { + console.log(index) + $scope.entity.appStyle.splice(index, 1); + + }; + + $scope.saveOneGroupAppStyle = function() { + if ($scope.params.style_id == "" || $scope.params.style_id == null) { + $scope.errmsg = "title不能为空"; + return; + } + var item = ""; + for (var i=0;i<$scope.entity.appStyle.length;i++) { + item = $scope.entity.appStyle[i]; + if (item.style_value == "" || item.style_value == null) { + $scope.errmsg = "value不能为空"; + return; + } + if (item.style_value.substr(0,4).toLowerCase() != "http" && + item.style_value.substr(0,5).toLowerCase() != "https") { + $scope.errmsg = "value必须以http或者https开头"; + return; + } + + } + $scope.ctrl.sending = true; + $http.post('/app/cms/app_style/style_group?style_id=' + $scope.params.style_id, $scope.entity).then(function(){ + $scope.ctrl.sending = false; + $state.go('cms.app_style.app_style_preview', {style_id: $scope.params.style_id}); + }, function (resp) { + $scope.ctrl.sending = false; + $scope.errmsg = resp.data.message; + }) + }; + $scope.checkStyleValue = function () { + + } + }]); app.filter('topUpType', function () { return function (status) { switch (status + '') { diff --git a/src/main/ui/static/cms/templates/app_style.html b/src/main/ui/static/cms/templates/app_style.html new file mode 100644 index 000000000..613b0f19d --- /dev/null +++ b/src/main/ui/static/cms/templates/app_style.html @@ -0,0 +1,65 @@ +
    +
    +

    APP_STYLE

    + +
    +
    +
    + +
    +
    +
    +
    + + + + + + + + + + + + + + +
    TitlePublishedOperation
    + + + + + + +
    +
    + +
    + +
    \ No newline at end of file diff --git a/src/main/ui/static/cms/templates/app_style_config.html b/src/main/ui/static/cms/templates/app_style_config.html new file mode 100644 index 000000000..694d761c9 --- /dev/null +++ b/src/main/ui/static/cms/templates/app_style_config.html @@ -0,0 +1,67 @@ +
    +
    +

    APP_STYLE

    + +
    +
    +
    +
    +
    +
    +
    + + +
    + +
    +
    + + + + + +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + +
    KeyValue
    + + + +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/src/main/ui/static/cms/templates/app_style_preview.html b/src/main/ui/static/cms/templates/app_style_preview.html new file mode 100644 index 000000000..7ab0f756a --- /dev/null +++ b/src/main/ui/static/cms/templates/app_style_preview.html @@ -0,0 +1,46 @@ +
    +
    +

    APP_STYLE

    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + +
    TitleStyle_KeyStyle_Value
    +
    +
    +
    +
    \ No newline at end of file diff --git a/src/main/ui/static/cms/templates/cms_root.html b/src/main/ui/static/cms/templates/cms_root.html index 69e7b8911..0040caa6b 100644 --- a/src/main/ui/static/cms/templates/cms_root.html +++ b/src/main/ui/static/cms/templates/cms_root.html @@ -26,6 +26,9 @@ +
    + App图标 +
    diff --git a/src/main/ui/static/risk/templates/attention_merchants.html b/src/main/ui/static/risk/templates/attention_merchants.html index b618f4f6b..d3ddfdf66 100644 --- a/src/main/ui/static/risk/templates/attention_merchants.html +++ b/src/main/ui/static/risk/templates/attention_merchants.html @@ -67,7 +67,7 @@ {{client.bank_account_no}} {{client.contact_person}} {{client.contact_phone}} - {{client.last_update_date}} + {{client.creation_date}} {{client.remark}} Date: Tue, 18 Sep 2018 18:48:09 +0800 Subject: [PATCH 010/103] =?UTF-8?q?app=E5=9B=BE=E6=A0=87cmsHost=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/support/cms/core/Impl/AppStyleServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/support/cms/core/Impl/AppStyleServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/support/cms/core/Impl/AppStyleServiceImpl.java index 60aa24644..dee97a580 100644 --- a/src/main/java/au/com/royalpay/payment/manage/support/cms/core/Impl/AppStyleServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/support/cms/core/Impl/AppStyleServiceImpl.java @@ -17,7 +17,7 @@ import java.net.URISyntaxException; @Service public class AppStyleServiceImpl implements AppStyleService { - @Value("http://127.0.0.1:9533") + @Value("${app.cms.host}") private String cmsHost; private Logger logger = LoggerFactory.getLogger(getClass()); From 086873f98ae4f9690cbefc4db94e66319eaae7b4 Mon Sep 17 00:00:00 2001 From: luoyang Date: Tue, 18 Sep 2018 19:15:40 +0800 Subject: [PATCH 011/103] add 55% --- .../web/PartnerManageController.java | 4 +- .../static/payment/partner/partner-manage.js | 42 ++++++++++--------- .../templates/apply_rpay_sub_merchant_id.html | 2 +- 3 files changed, 25 insertions(+), 23 deletions(-) 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 c228f5995..2b7e1a2ec 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 @@ -564,8 +564,8 @@ public class PartnerManageController { } @ManagerMapping(value = "/{clientMoniker}/registRpaySubMerchantId", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) - public String subRpayMerchantApplication(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { - return clientManager.subRpayMerchantApplication(clientMoniker, manager); + public void subRpayMerchantApplication(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { + clientManager.subRpayMerchantApplication(clientMoniker, manager); } diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index 8a65a6128..c7652834b 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -3199,7 +3199,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.saveRpayAppliy = function (form) { - $scope.merchantInfo = angular.copy(form); + var merchantInfo = {}; $scope.errmsg = null; if (form.$invalid) { angular.forEach(form, function (item, key) { @@ -3212,28 +3212,30 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter angular.forEach(form, function (item, key) { if(item !=null) { - console.log("++++" + key + item.$name) - + if(item.$name !=null) { + var name = item.$name; + merchantInfo.name = item.$modelValue; + console.log("++++" + item.$name + "++++" + item.$modelValue); + } } }); + // var str = angular.toJson(form, true); + // console.log("----------" + str); - // var str = angular.toJson(form, true); - // console.log("----------" + str); - - // $http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/registRpaySubMerchantId', $scope.merchantInfo).then(function (resp) { - // $scope.apply_sub_merchant_id = resp.data; - // $scope.$close(); - // if (subMerchantInfo.sub_merchant_id != null) { - // commonDialog.alert({ - // title: 'Success', - // content: 'Modify Rpay+ Sub Merchant ID successfully', - // type: 'success' - // }); - // $state.reload(); - // } - // }, function (resp) { - // $scope.errmsg = resp.data.message; - // }) + $http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/registRpaySubMerchantId', merchantInfo).then(function (resp) { + $scope.apply_sub_merchant_id = resp.data; + $scope.$close(); + if (subMerchantInfo.sub_merchant_id != null) { + commonDialog.alert({ + title: 'Success', + content: 'Modify Rpay+ Sub Merchant ID successfully', + type: 'success' + }); + $state.reload(); + } + }, function (resp) { + $scope.errmsg = resp.data.message; + }) } }]); diff --git a/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html b/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html index d13ba4af6..d898d0af8 100644 --- a/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html +++ b/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html @@ -214,7 +214,7 @@
    From 1a4d406f03389b980130458a03e7a1925cd99511 Mon Sep 17 00:00:00 2001 From: luoyang Date: Tue, 18 Sep 2018 20:25:54 +0800 Subject: [PATCH 012/103] add 65% --- .../ui/static/payment/partner/partner-manage.js | 5 ++--- .../templates/apply_rpay_sub_merchant_id.html | 16 ++++++++-------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index c7652834b..575637bcf 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -3209,12 +3209,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); return; } - + var option = []; angular.forEach(form, function (item, key) { if(item !=null) { if(item.$name !=null) { - var name = item.$name; - merchantInfo.name = item.$modelValue; + merchantInfo[key] = item.$modelValue; console.log("++++" + item.$name + "++++" + item.$modelValue); } } diff --git a/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html b/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html index d898d0af8..90806d504 100644 --- a/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html +++ b/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html @@ -12,7 +12,7 @@
    + type="text" name="company_name" id="merchant_name_input" required maxlength="50">

    Required Field

    Length is more than 50

    @@ -47,10 +47,10 @@
    - +
    + type="text" name="company_website" id="company_website_input">
    -
    - +
    +
    -
    + type="text" name="country" id="country_input"> +

    Required Field

    @@ -165,7 +165,7 @@
    + type="text" name="address" id="company_address_input">

    Required Field

    Length is more than 50

    From f826867191f879c5692544597daaf44ea281e262 Mon Sep 17 00:00:00 2001 From: yangkai Date: Tue, 18 Sep 2018 20:46:56 +0800 Subject: [PATCH 013/103] =?UTF-8?q?=E7=BC=A9=E5=B0=8F=E6=8A=BD=E5=A5=96?= =?UTF-8?q?=E5=A5=96=E5=8A=B1=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/ui/static/templates/payment/success.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/ui/static/templates/payment/success.css b/src/main/ui/static/templates/payment/success.css index ab5abda7a..5dc8ef94b 100644 --- a/src/main/ui/static/templates/payment/success.css +++ b/src/main/ui/static/templates/payment/success.css @@ -351,10 +351,10 @@ } .points-dialog .dialog-content{ margin: auto; - width: 90%; + width: 80%; display: block; position: relative; - margin-top: 130px; + margin-top: 100px; padding-top: 25px; padding-bottom: 19px; border-radius: 5px; @@ -386,8 +386,8 @@ } .points-content .coin{ - width: 100px; - height: 100px; + width: 80px; + height: 80px; position: relative; background: url(/static/images/star.png) no-repeat; background-size: contain; From f3bfd8d0ecd9eedd2a3278a63edd3594e1a77a71 Mon Sep 17 00:00:00 2001 From: yixian Date: Wed, 19 Sep 2018 09:10:09 +0800 Subject: [PATCH 014/103] img --- src/main/ui/static/images/Group@1x.png | Bin 0 -> 6303 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/main/ui/static/images/Group@1x.png diff --git a/src/main/ui/static/images/Group@1x.png b/src/main/ui/static/images/Group@1x.png new file mode 100644 index 0000000000000000000000000000000000000000..6fd90323f8095463eab3cd49390d9be251a3b117 GIT binary patch literal 6303 zcmV;Q7+~j#P)Py2SxH1eRCodHoC%y1MV5zORQ26}fC!4mz~BigI(Ut!obHOpdVtr=cr${iBcl$e zt79u(D2n2Ri1+HOC#=UDat?|PF8f} zM7((MGBPsaAMd@0EF-OY544@rwo@b)8DL`0K$>@eV`K*rr!(n15mQdA*9zk} z^Q165z3Ql{mE>DP3+MskZ-X;Z4w0DrH?;14x-VTvdW9I7DZ^JyLa!~b?#u)Og;a}AQK~NbXukm`0Z9-!nl|mV1 z?v>gm)M+uS&PCFJ=RM6fC?*@s6nUn_G;SMfNb#)VozXg`I*xP9raU@;@?JP(F557$ zdj6)!`TtONmtCZI_;9H$D??S-f+6HwB3+#kGLGw)OtAKedwdC&a=hEvP-)1{E%GC zy{}7G)>PW66|(TAo1}kJ>nT5ND9g)}qqEi3=iu2F`uXytPNqXRm}?baVHHWz9|JJe z#KXD#VFUE{BrM~Yh_{kft!4-{uOzZqH|-h*driUZl+F-@&T8t0haB@47%!~GE>&1l^T%f9gE22`FZkiI4s?3YUC?> zTStDqcCB25X;#l<>gLj&s0_mAQ_eWZ8VU+z|7g9O(58)CP^~j8B{(5jg1l!tb&|W+ ztdR{V#akqcW)m8BgN(q8c`Mru>5F_Gdrv@L<18rs(pB9bAR72dX zfa2Z9k=_&LOxTC~Vvm+3aq6iOp7w%FHAe1a(ti_XneE?S^5@Q#h+B2%ou#Vp3{iawu|&GBNR-^^u6o@Ry_A^d%oY;s}||b2m9Cs092fo&-ncQ?iqnk0-Wc zqWwF`j%X^6bB$s+%!1Z|cp&swQ~0-ytRtQ2gO>o769ATNvk#j1rc36P>=dhuO{UuB z29zihWqLRin&|pf+Rtg<{>K47{+LS>r@e>gJHK63No9H0n|qjU8}>5GOjrZ7+T zaPPsSU$btV=O(aZ1+14|kn>DfE~u-M1DWvGyZkBfdcfs^bna%fqs!p^K2|S>Q(w~= z1NgK(rKgtx4=9-6s51_)GQD_Cxgu~R4@45FKN>2^QYlpdZ z4fL=rb7Z{V>~NlgK2weY3{}JG!qsrVGT@l_IorSXKDyiGG^i8eKDts2r7Yf$F`0t% zw->u&uFuI<*MH6!X-jV%LyLOB-_a}ZC-UVsbD!NR75r31vRZoD;(Dp#IY0BWy6FI) z67Q1_7!Zu779Q%NlbARiHd`x=Y~W=-nwM|xS=X=TE0tUFW=U76iQQ5gt?Ac)PX9gT z4w&m{8|m(wAC}>BJM%MdfMu^~xCVbu3{6&+sk7$(Q9}wc3i#_S)jXo&op*VR_F`SB8Jss+5j-;7L~}WOfY$K zo=m`T83P1E->s7Iei_h4VftLiB!5=vOypUN;_>wndEL*aX*7!~@x8q5f_@pkiz!nw zn43`^=JxFs~&3Y7*_@V6;L$)wT=151en0fyu!@~Vq;arIlK&Z|Kii%+%L_R%Jp#8w%T_FUTW5M>3v@-31?D|v&qt1l(qc9BE8J4 z8z(j_3R2ipSOAzzJScqVi>iTawEGGo#WRYBu2}Xhny%B`UjuicPL@VNWyhVR-?!gN zweD!t)yQN_l>KSX7*`HycR|xPG8Qly0uc2?Rp03H5bqe$k(v_NN%=P%uzewa?iS&@ z=m+gDZa!O#skNK>Q?l{>)bj1NlMa>ZWi<6Ss0=i!g+$wFI#aN|om%-M>LmG+pyJ34 z0ES+<1;+x1`d8w?5sPR{gp(iy0mX1&&cTCjWD#rmlki+2Bjsi$+>r)QqQyerrHeW(PLP15t+0JOW#@vn0HHU=~XrE46kOjXB{PG?qZtQaT~dlVp0Q^FtO{t^?qYr~-Gx3pj`e;P_> zmhK;u=sn`Z`ddQEKgT!+up`7R(s?T4%nB%)s;iZ&K=D^qV<8JbH4Lg{+;oF{z)M^n za-_REZOHEmD6IgHypZ6%1;SE~NCMMg4pBxYs-IWW07}{bU=0M^R1*sX`nj`-%I^Wc zK$!{2bLmW?jT_`@1gzmI3#-fFxeBOU}EI# zR38SD?GMz`hBJ7Wcp?u{|7}3#pU@8>U%*N>lDLd39^%@In|svUp4e`STD!Hx7AV*l zIiLHz=rU@ITwM*0@zXX}8f_tub!o6qp4He`7kA(ckAgxxD4^!a8E9pTU6RK1g<8pB zKg~@8wy#sJ{JpqJ8S=x4C%EPGm1-~XVCciG=Mdu0+-Cb@CVhvBs@3OJ9bNlCoB3__ zi&fP>#w0zKciO;T;?~pS{Lx7LxR?|9Ewr@#Xn7qe>M*-_H`2@9y6Ix|4WP(P={&*n{5)0Grse^) z9ncg`1U#+`$TIRqAWsIL(QxLLF3_|6Wo&it$5!`6$QT}t`Nmj+sSFUEI#mi?;Pux{ zP17fdU^oO8k`ppsM*aiNuM*syczvY|>OAr_q~mJ&Iys(vmjsV)P@j7}3Fr%5^~WgV_YNoN}jYrnX=e zUtZ>vg(~}2eh;`D$61j*N{ia=ym4^tXx9O&b^E;AC!a%eqodKf&lzaC0A&W0#LXf` zx+RinBf!H%>+B+x4?ujQOaO-J2Nh|qs_XtJzh>8G5xP%r#Dkg(BEMpi9_f+-vB7T;!bznkP#q41#hCEM?&REs zneu6ZH|ZoavKZ~-&43Iy6T)j9vmm9Ep87I*AXVgFVAWT3a~G~I7(b^IKgFf?up3^% zkMX6=MC1UMNLy-=pcA~=f;DHv`jpymlMq9sG;lK`&+*K&EY0z?O=KQ)&z26<$(HHL zGnLzWcH;TEvA!s{Pow{mT8hY@%suj5Hc>66+%fnCoZZs4$8ma$pE>?y%B;4zen9OP zlJXTu$*htgpZvH;&E>tAB)JEZ_d{dMXeDEjr+`=O@avcnGYe#II& zVE5gnaM_nEaE9;UQW_P`m*W7OPjL1g<<%zvNG#s4!8-Q+rSzRUfGS42Ys$wZj33>T)E6?!tk|mrwOB2*&!vFI!^6y0cnlvmP zDG4e{a;$S!Cv>`S5op_s&eXx%1>UPr&yNl;IyiEZVMQ{Tl5%_x?MN~1SDl=dI9?-Y zCHEowHe17y%kU$-g2&}7PlEB86u}**HM9qXwONDO#i?g^+#4>Y-50wV23K41ZYXyX zO^xZ38u~fz;Fi%z}{mztE-qI4R&OA?gP@%1?FMlAipyF?O+u3dR zipJ_DIwKRwrUQGU_#N~?G@tby6HJ7&+-06<^NfcY*5leI5n{x~u8A>1+iYe^5a2=iM}?bJvl6%gtwt(*cTG2Or6sfYvkBmGUHD zcLGt_;GHlrF* zwf!c?)d)VqyqOzkwEtIlX|}HQJ0>sR90^^8QiEzp1`V!I`T%Nv1W&dtX{Mys&MoiQ z0bG}0?gw=0fR4X@gBCPdKFCc_%iszb=flQYf;n?&+nGh4#;k|eN@o;KjKu0bW@7v# zKw)5iy5@*A8#3KjCsl|Y8UR2wb}z6Edl;%-pzzvLfog z8z{??!G|%KYihO&!1!YpQF6pl_M4$XOqGXK`*-;Z!g2;C*jUb<32)oK@n6K~PaINIZPN1R2}lnrt1Z`b|vygr0wkP3r{@h;>29x+Wpdi*R77CZsD- zJfwVxg=w=E`H#EB$UMbM2elOT59MvjHhSfCq6ezH&h+S;D}j#)=|i|qP>5ACfJ zrp;ApoTM|n+v4a$+fcjzCk5Vvs;kd>m4jQZF35YuEj?kJ{HfX67;$7A&f3l;GYd!5 zMQc81*&WSThy!W1%4y0?DD*@ca)87Z>Vg1)3=<-RL-wOcOvdSj8Sr>2Pky0w!1f6l znPkoQREEa#02BjuDHHLXOc&LwX~;>9iP5sTb0yNQgPeko=YYJhJfS8T8p>!KuM^b- z_y4M1f(LZt0?Fd||6RgxWX~pMtw( z$Tl^+d*FR|0%dG9^ut-#Z-BR>)Da)VJEf=%jNGd z_Or}r8)$aD=!>T?5gNdCvZjR14Y&QuPr{G@nh z(Oi!7_0QZ=r(d+H{=0a&yVhmq&Qen4$X3pPY8W53&H_H%kU^uh*G?-_fqGn8>>YMOp?WJI~nI)0FQlmj}L~z@;(W&;$J6$F*0NO!deb+kIDrX%ek zF45DmOeFnscUeYp@zc0>@nXs{@`ych?-tkLol!t)5bUJNx28x#K+xS1V^@^&Kt+>y z?y%1Xqzq1c3p>EO37JG+9E*s!Cg+!>KN~TJgL{5Il$Pf;@=ikXq$k4QhjO;w-+Et@F(LQovx9TUkAwa;8qe{Y+daVU z*!DbQ(kDtrKZ;wGc<@UYq;|iZylM)WL!CXqlOJF(NrcA7Fb}h4KV+-DpLAZv!Q>6@ z(+{3266QoejF&OKoh99>^`EZwnBocj2oHHfc$)LL=R#j`1+>?p-3IMzAKfOAsSfG; zJi2acCxhR6?oTHdT?wtmqn8BQ;E`=2<~zXW$m8_i zx*)^Wm8%|HJqcgOz0K8X6z>JaZAwmP>hGzz?cqz{7XXSo{HDoCr^sXNx0heCTeR-S zAMBBewR`Uq_m|a2F;R`Y%MQ%n^vJs_CtJ+VC|rgk_PR_LBjU_-GH62&faH9fynp&` zrF_q++TZbsz#S(Kw4<$nNDV|Gi@K%Wpk;^kCdHUnrefJSHYF^^I+| z`(TUDEOd&8xgQxerS%*}TUXjvx&tPAVmkOuYflVj&yHv*lRNJuzw&?R*R7ireY;$y zq1}v1^#244oIH9|%pPrfq$ez+ee>kxh78c1^oVT7eU|%BV z5l1l5PUn@b0s`*LWdh?9=*f+)=hBHknF0Ri)EhT7&xBh*t!*pSH~PCmPbp)Zcf}gLD2e1;v#s zWf$FI_tTq_wxH6K3eCyO1kyuMKM&j^B!kd^W(R27PzIn~&Et0R9$B?QzJvzEn{*z+ ztKY=LmI4*4tvIpqO>CaW&OlzrsyPKe%{|qFs{LlB$J3hFGCk1bE#)oKEbgK|u8qH8 zTLzQ{eI5VZnM=@8wg{j!xPLPeI3hJTDc*boNU)>gwB^I%L-Y${7Mr4ExlQQ``z0#D z>`=(eE-EPfOJj%IQtGy5o3RI47N~H{86fF^g;~vx|NrValxBSPtwVHI-)8~Wi+=jw zK&{?79wc)syUpoV^j&o2k-YnA ztJe=&U*R`zDqDw2<_>NxY3+fQ)C2fAg1dap(72BO=-5t=;p;ELHG}w8kz2S2{tp^^ VH$8{n_woP$002ovPDHLkV1i#-e=7h0 literal 0 HcmV?d00001 From d327dce76c13aed431a13db55d0be0ac520d3702 Mon Sep 17 00:00:00 2001 From: kira <164851225@qq.com> Date: Wed, 19 Sep 2018 10:36:03 +0800 Subject: [PATCH 015/103] update --- .../partner/templates/partner_new_rate.html | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/src/main/ui/static/payment/partner/templates/partner_new_rate.html b/src/main/ui/static/payment/partner/templates/partner_new_rate.html index 2452a150d..19267e23d 100644 --- a/src/main/ui/static/payment/partner/templates/partner_new_rate.html +++ b/src/main/ui/static/payment/partner/templates/partner_new_rate.html @@ -88,30 +88,6 @@
    -
    - -
    -
    - -
    %
    -
    -
    -
    - No more than 2.2% -
    -
    - No less than 0.6% -
    -
    - Required Field -
    -
    - -
    -
    -
    From 93a4ff7bed00b45b45c3e4bc3af9f0e979a5b4d5 Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 19 Sep 2018 11:29:14 +0800 Subject: [PATCH 016/103] add 100% --- .../manage/merchants/core/ClientManager.java | 4 +- .../core/impls/ClientManagerImpl.java | 29 ++++---- .../web/PartnerManageController.java | 4 +- .../static/payment/partner/partner-manage.js | 10 +-- .../templates/apply_rpay_sub_merchant_id.html | 73 +++++++++---------- 5 files changed, 58 insertions(+), 62 deletions(-) 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 925136d37..43b3eec38 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 @@ -334,8 +334,8 @@ public interface ClientManager { void sendHfEmailNotice(JSONObject order); - void updateAllPartnerPassword(String clientMoniker, List emails); + void subRpayMerchantApplication(String clientMoniker,JSONObject merchantInfo, JSONObject manager); - void subRpayMerchantApplication(String clientMoniker, JSONObject manager); + void updateAllPartnerPassword(String clientMoniker, List emails); } 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 f7374de7b..85d4c6ff5 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 @@ -3575,33 +3575,32 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } @Override - public void subRpayMerchantApplication(String clientMoniker, JSONObject manager) { + public void subRpayMerchantApplication(String clientMoniker, JSONObject merchantInfo,JSONObject manager) { JSONObject client = getClientInfoByMoniker(clientMoniker); if (client == null) { throw new InvalidShortIdException(); } checkOrgPermission(manager, client); - List listByshortName = sysRpayMerchantApplyMapper.listByShortName(client.getIntValue("client_id"),client.getString("short_name")); + List listByshortName = sysRpayMerchantApplyMapper.listByShortName(client.getIntValue("client_id"),merchantInfo.getString("company_shortname")); - if (listByshortName.size()>0) { - throw new BadRequestException("请修改【" + clientMoniker + "】的Company shortName信息(请避免和Rpay+商务号列表内的Company Short Name重复)"); - } +// if (listByshortName.size()>0) { +// throw new BadRequestException("请修改【" + clientMoniker + "】的Company shortName信息(请避免和Rpay+商务号列表内的Company Short Name重复)"); +// } - SubRpayMerchantInfo subRpayMerchantInfo = JSONObject.toJavaObject(client, SubRpayMerchantInfo.class); + SubRpayMerchantInfo subRpayMerchantInfo = JSONObject.toJavaObject(merchantInfo, SubRpayMerchantInfo.class); subRpayMerchantInfo.CheckEmpty(); JSONObject rpayMerchantInfo = rpayApi.registerMerchant(client.getIntValue("client_id"), subRpayMerchantInfo); if (rpayMerchantInfo != null) { - JSONObject merchantApply = new JSONObject(); - merchantApply.put("merchant_id", rpayMerchantInfo.getString("rpay_order_id")); - merchantApply.put("client_id", client.getString("client_id")); - merchantApply.put("create_time", new Date()); - merchantApply.put("operator", manager.getString("display_name")); - merchantApply.put("sub_merchant_id", rpayMerchantInfo.getString("merchantId")); - merchantApply.put("business_category", client.getString("royalpayindustry")); - merchantApply.put("merchant_shortname", client.getString("short_name")); - sysRpayMerchantApplyMapper.insertRpayMerchantApply(merchantApply); + merchantInfo.put("merchant_id", rpayMerchantInfo.getString("rpay_order_id")); + merchantInfo.put("client_id", client.getString("client_id")); + merchantInfo.put("create_time", new Date()); + merchantInfo.put("operator", manager.getString("display_name")); + merchantInfo.put("sub_merchant_id", rpayMerchantInfo.getString("merchantId")); + merchantInfo.put("business_category", client.getString("royalpayindustry")); + merchantInfo.put("merchant_shortname", merchantInfo.getString("company_shortname")); + sysRpayMerchantApplyMapper.insertRpayMerchantApply(merchantInfo); clientMapper.updateRpayEnterpriseId(client.getIntValue("client_id"), rpayMerchantInfo.getString("merchantId")); }else { throw new BadRequestException("请求失败"); 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 2b7e1a2ec..1e5ada8bc 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 @@ -564,8 +564,8 @@ public class PartnerManageController { } @ManagerMapping(value = "/{clientMoniker}/registRpaySubMerchantId", method = RequestMethod.POST, role = {ManagerRole.OPERATOR, ManagerRole.ADMIN}) - public void subRpayMerchantApplication(@PathVariable String clientMoniker, @ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { - clientManager.subRpayMerchantApplication(clientMoniker, manager); + public void subRpayMerchantApplication(@PathVariable String clientMoniker,@RequestBody JSONObject merchantInfo,@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager) { + clientManager.subRpayMerchantApplication(clientMoniker, merchantInfo,manager); } diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index 575637bcf..c536102ee 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -3209,17 +3209,13 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }); return; } - var option = []; angular.forEach(form, function (item, key) { if(item !=null) { if(item.$name !=null) { merchantInfo[key] = item.$modelValue; - console.log("++++" + item.$name + "++++" + item.$modelValue); } } }); - // var str = angular.toJson(form, true); - // console.log("----------" + str); $http.post('/sys/partners/' + $scope.subMerchantInfo.client_moniker + '/registRpaySubMerchantId', merchantInfo).then(function (resp) { $scope.apply_sub_merchant_id = resp.data; @@ -3233,7 +3229,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $state.reload(); } }, function (resp) { - $scope.errmsg = resp.data.message; + commonDialog.alert({ + title: 'Error', + content: resp.data.message, + type: 'error' + }); }) } }]); diff --git a/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html b/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html index 90806d504..ecc2e3069 100644 --- a/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html +++ b/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html @@ -7,13 +7,12 @@
    -
    - + ng-class="{'has-error':subForm.company_name.$invalid && subForm.company_name.$dirty}"> +
    -
    + type="text" name="company_name" id="company_name_input" required maxlength="50"> +

    Required Field

    Length is more than 50

    @@ -21,7 +20,7 @@
    + ng-class="{'has-error':subForm.business_name.$invalid && subForm.business_name.$dirty}">
    * Company description
    + type="text" name="description" id="description_input" required maxlength="256">

    Required Field

    Length is more than 256

    -

    Length is less than 10

    -
    - +
    +
    + type="text" name="abn" id="abn_input" required maxlength="256">

    Required Field

    -

    Length is more than 10

    -
    - +
    +
    + type="text" name="acn" id="acn_input" required maxlength="256">

    Required Field

    -

    Length is more than 10

    +
    - +
    + type="tel" name="company_phone" id="company_phone_input" required maxlength="256">

    Required Field

    @@ -118,10 +117,10 @@
    - +
    + type="text" name="contact_name" id="contact_name_input" required maxlength="256">

    Required Field

    @@ -129,10 +128,10 @@
    - +
    + type="text" name="contact_phone" id="contact_phone_input" required maxlength="256">

    Required Field

    @@ -140,10 +139,10 @@
    - +
    + type="text" name="contact_email" id="contact_email_input" required maxlength="256">

    Required Field

    @@ -151,22 +150,22 @@
    - +
    + type="text" name="country" id="country_input" required maxlength="256">

    Required Field

    -
    - +
    +
    -
    + type="text" name="address" id="company_address_input" required maxlength="256"> +

    Required Field

    Length is more than 50

    @@ -174,34 +173,32 @@
    - +
    + type="text" name="suburb" id="company_suburb_input" required maxlength="256">

    Required Field

    -

    Length is more than 10

    - +
    + type="text" name="postcode" id="company_postcode_input" required maxlength="256">

    Required Field

    -

    Length is more than 10

    - +
    + type="text" name="state" id="state_input" required maxlength="256">

    Required Field

    Length is more than 10

    From 2436757e1dc581df5f854d29a92f5928ea2ef51c Mon Sep 17 00:00:00 2001 From: kira <164851225@qq.com> Date: Wed, 19 Sep 2018 11:40:08 +0800 Subject: [PATCH 017/103] update --- .../cms/core/Impl/AppStyleServiceImpl.java | 74 +++---------------- 1 file changed, 9 insertions(+), 65 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/support/cms/core/Impl/AppStyleServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/support/cms/core/Impl/AppStyleServiceImpl.java index dee97a580..804daffe8 100644 --- a/src/main/java/au/com/royalpay/payment/manage/support/cms/core/Impl/AppStyleServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/support/cms/core/Impl/AppStyleServiceImpl.java @@ -1,18 +1,14 @@ package au.com.royalpay.payment.manage.support.cms.core.Impl; import au.com.royalpay.payment.manage.support.cms.core.AppStyleService; -import au.com.royalpay.payment.tools.exceptions.ServerErrorException; -import cn.yixblog.platform.http.HttpRequestGenerator; -import cn.yixblog.platform.http.HttpRequestResult; +import au.com.royalpay.payment.tools.cms.RoyalPayCMSSupport; + import com.alibaba.fastjson.JSONObject; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; -import org.springframework.web.bind.annotation.RequestMethod; - -import java.io.IOException; -import java.net.URISyntaxException; @Service public class AppStyleServiceImpl implements AppStyleService { @@ -21,81 +17,29 @@ public class AppStyleServiceImpl implements AppStyleService { private String cmsHost; private Logger logger = LoggerFactory.getLogger(getClass()); + private RoyalPayCMSSupport royalPayCMSSupport; @Override public JSONObject listAppStyleGroup(int page, int limit) { - String url = concatUrl("/app/style_group"); - HttpRequestGenerator gen = new HttpRequestGenerator(url, RequestMethod.GET).addQueryString("page", page + "").addQueryString("limit", limit + ""); - try { - HttpRequestResult res = gen.execute(); - if (res.isSuccess()) { - return res.getResponseContentJSONObj(); - } - } catch (URISyntaxException | IOException e) { - logger.error(e.getMessage(), e); - } - throw new ServerErrorException("Failed to request CMS"); + return royalPayCMSSupport.listAppStyleGroup(page,limit); } @Override public JSONObject getAppStyleByStyleId(String style_id) { - String url = concatUrl("/app/style_group/" + style_id); - HttpRequestGenerator gen = new HttpRequestGenerator(url, RequestMethod.GET); - try { - HttpRequestResult res = gen.execute(); - if (res.isSuccess()) { - return res.getResponseContentJSONObj(); - } - } catch (URISyntaxException | IOException e) { - logger.error(e.getMessage(), e); - } - throw new ServerErrorException("Failed to request CMS"); + return royalPayCMSSupport.getAppStyleByStyleId(style_id); } @Override public void switchGroupByStyleId(String style_id) { - String url = concatUrl("/app/style_group/" + style_id); - try { - HttpRequestResult res = new HttpRequestGenerator(url, RequestMethod.PUT).execute(); - if (res.isSuccess()) { - return; - } - } catch (URISyntaxException e) { - logger.error(e.getMessage(), e); - } - throw new ServerErrorException("Failed to request CMS"); + royalPayCMSSupport.switchGroupByStyleId(style_id); } @Override public void addAppStyle(String style_id, JSONObject appStyleGroup) { - String url = concatUrl("/app/style_group"); - try { - HttpRequestResult gen = new HttpRequestGenerator(url, RequestMethod.POST).addQueryString("style_id", style_id).setJSONEntity(appStyleGroup).execute(); - if (gen.isSuccess()) { - return; - } - } catch (URISyntaxException e) { - logger.error(e.getMessage(), e); - } - throw new ServerErrorException("Failed to request CMS"); + royalPayCMSSupport.addAppStyle(style_id,appStyleGroup); } @Override public void updateAppStyleByStyleId(String style_id, String originStyleId, JSONObject appStyleGroup) { - String url = concatUrl("/app/style_group/" + style_id + "/style"); - try { - HttpRequestResult gen = new HttpRequestGenerator(url, RequestMethod.PUT).addQueryString("originStyleId", originStyleId).setJSONEntity(appStyleGroup).execute(); - if (gen.isSuccess()) { - return; - } - } catch (URISyntaxException e) { - logger.error(e.getMessage(), e); - } - throw new ServerErrorException("Failed to request CMS"); - } - - private String concatUrl(String uri) { - String host = cmsHost.endsWith("/") ? cmsHost.substring(0, cmsHost.length() - 1) : cmsHost; - uri = uri.startsWith("/") ? uri.substring(1) : uri; - return host + "/" + uri; + royalPayCMSSupport.updateAppStyleByStyleId(style_id,originStyleId,appStyleGroup); } } From f72b439353cc925edf109594a1350bd87fbc3a7a Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 19 Sep 2018 12:03:46 +0800 Subject: [PATCH 018/103] change Rpay merchant --- .../payment/partner/templates/apply_rpay_sub_merchant_id.html | 2 +- ...apply_sub_merchant_id.html => apply_wx_sub_merchant_id.html} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/main/ui/static/payment/partner/templates/{apply_sub_merchant_id.html => apply_wx_sub_merchant_id.html} (99%) diff --git a/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html b/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html index ecc2e3069..bf36efcf3 100644 --- a/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html +++ b/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html @@ -3,7 +3,7 @@
    -
    Apply Sub Merchant Id
    +
    Apply Rpay+ Sub Merchant Id
    -
    Apply Sub Merchant Id
    +
    Apply Wechat Sub Merchant Id
    Date: Wed, 19 Sep 2018 13:17:31 +0800 Subject: [PATCH 019/103] =?UTF-8?q?=E5=8A=A0@Resource=E5=BC=95=E5=85=A5Roy?= =?UTF-8?q?alPayCMSSupport?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manage/support/cms/core/Impl/AppStyleServiceImpl.java | 4 +++- src/main/ui/static/cms/templates/app_style_config.html | 4 ++-- src/main/ui/static/cms/templates/app_style_preview.html | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/support/cms/core/Impl/AppStyleServiceImpl.java b/src/main/java/au/com/royalpay/payment/manage/support/cms/core/Impl/AppStyleServiceImpl.java index 804daffe8..e189061a9 100644 --- a/src/main/java/au/com/royalpay/payment/manage/support/cms/core/Impl/AppStyleServiceImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/support/cms/core/Impl/AppStyleServiceImpl.java @@ -10,13 +10,15 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; +import javax.annotation.Resource; + @Service public class AppStyleServiceImpl implements AppStyleService { @Value("${app.cms.host}") private String cmsHost; private Logger logger = LoggerFactory.getLogger(getClass()); - + @Resource private RoyalPayCMSSupport royalPayCMSSupport; @Override public JSONObject listAppStyleGroup(int page, int limit) { diff --git a/src/main/ui/static/cms/templates/app_style_config.html b/src/main/ui/static/cms/templates/app_style_config.html index 694d761c9..d934aa1f4 100644 --- a/src/main/ui/static/cms/templates/app_style_config.html +++ b/src/main/ui/static/cms/templates/app_style_config.html @@ -3,7 +3,7 @@

    APP_STYLE

    @@ -16,7 +16,7 @@ -
    +
    diff --git a/src/main/ui/static/cms/templates/app_style_preview.html b/src/main/ui/static/cms/templates/app_style_preview.html index 7ab0f756a..08eda755d 100644 --- a/src/main/ui/static/cms/templates/app_style_preview.html +++ b/src/main/ui/static/cms/templates/app_style_preview.html @@ -3,7 +3,7 @@

    APP_STYLE

    From 163c8e1976c8621ec407075ba3fadb43fd6e62fa Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 19 Sep 2018 13:20:59 +0800 Subject: [PATCH 020/103] 0.2.0 -dev --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index adaacec07..cfb6e206d 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ au.com.royalpay.payment payment-parent - 0.2.0 + 0.2.0-dev 4.0.0 From 3831ea17ae23aa08b0229a664b752c919d5f9fe9 Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 19 Sep 2018 13:26:06 +0800 Subject: [PATCH 021/103] fix pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cfb6e206d..adaacec07 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ au.com.royalpay.payment payment-parent - 0.2.0-dev + 0.2.0 4.0.0 From 9c2ee829d6e9b27b46be5fa18ae0b8968b68acd0 Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 19 Sep 2018 13:35:23 +0800 Subject: [PATCH 022/103] fix pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index adaacec07..cfb6e206d 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ au.com.royalpay.payment payment-parent - 0.2.0 + 0.2.0-dev 4.0.0 From 71daf269e453857b94613957b40e5e4725c04725 Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 19 Sep 2018 13:55:53 +0800 Subject: [PATCH 023/103] fix pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cfb6e206d..adaacec07 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ au.com.royalpay.payment payment-parent - 0.2.0-dev + 0.2.0 4.0.0 From 6e60424265923d2f38e676de050061c4ffabc942 Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 19 Sep 2018 16:16:45 +0800 Subject: [PATCH 024/103] fix merchant_id --- .../templates/apply_rpay_sub_merchant_id.html | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html b/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html index bf36efcf3..f7d130c75 100644 --- a/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html +++ b/src/main/ui/static/payment/partner/templates/apply_rpay_sub_merchant_id.html @@ -77,22 +77,17 @@
    -
    - +
    +
    -
    -

    Required Field

    -
    + type="text" name="acn" id="acn_input">
    -
    - +
    +
    -
    -

    Required Field

    -
    + type="text" name="acn" id="acn_input">
    -
    - +
    +
    + + + + + + + SELECT lne.*, po.client_order_id + FROM log_notify_error lne + INNER JOIN pmt_orders po + ON lne.order_id = po.order_id + + INNER JOIN sys_clients sc + ON sc.client_id = lne.client_id + AND sc.is_valid = 1 + AND sc.client_moniker = #{client_moniker} + + + + lne.order_id = #{order_id} + + + AND po.client_order_id = #{client_order_id} + + + AND DATE(lne.addtime) = DATE(#{date}) + + + AND lne.success = #{success} + + + + +
    +
    +
    @@ -61,6 +76,7 @@ Time Order ID + Client Order ID Notify Url Success Http Code @@ -71,7 +87,8 @@ - + + From 3959b7c0715b11069fb5e77a9a8b66eacb812d46 Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 26 Sep 2018 14:08:32 +0800 Subject: [PATCH 066/103] add select_nap --- .../impls/CustomersAnalysisServiceImp.java | 1 + .../analysis/mappers/OrderAnalysisMapper.xml | 14 +++++++++++- .../ui/static/analysis/customer_analysis.js | 1 + .../analysis/templates/customer_analysis.html | 22 +++++++++++++++++++ 4 files changed, 37 insertions(+), 1 deletion(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/CustomersAnalysisServiceImp.java b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/CustomersAnalysisServiceImp.java index 62d967da8..88e26c0d1 100644 --- a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/CustomersAnalysisServiceImp.java +++ b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/CustomersAnalysisServiceImp.java @@ -78,6 +78,7 @@ public class CustomersAnalysisServiceImp implements CustomersAnalysisService { PageList logs = orderAnalysisMapper.listCustomersData(params, new PageBounds(page, limit, Order.formString("amount.desc"))); JSONObject result = PageListUtils.buildPageListResult(logs); result.put("analysis", orderAnalysisMapper.listCustomersDataAnalysis(params)); + result.put("openid_type", params.getIntValue("openid_type")); return result; } diff --git a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/OrderAnalysisMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/OrderAnalysisMapper.xml index d8c12acdc..81cee3fb0 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/OrderAnalysisMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/OrderAnalysisMapper.xml @@ -197,10 +197,16 @@
    @@ -99,6 +100,7 @@ + @@ -110,6 +112,26 @@ + + + + From 93719ed3196d8cd1c84d8f7bf99ce3030dc1642c Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 26 Sep 2018 14:12:48 +0800 Subject: [PATCH 067/103] add select_nap --- .../impls/CustomersAnalysisServiceImp.java | 1 + .../analysis/mappers/OrderAnalysisMapper.xml | 14 ++++++++++- .../ui/static/analysis/customer_analysis.js | 1 + .../analysis/templates/customer_analysis.html | 22 ++++++++++++++++++ src/main/ui/static/images/nap.png | Bin 0 -> 1203 bytes .../ui/static/images/royalpay_sign_ln.png | Bin 0 -> 1504 bytes 6 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 src/main/ui/static/images/nap.png create mode 100644 src/main/ui/static/images/royalpay_sign_ln.png diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/CustomersAnalysisServiceImp.java b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/CustomersAnalysisServiceImp.java index 62d967da8..88e26c0d1 100644 --- a/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/CustomersAnalysisServiceImp.java +++ b/src/main/java/au/com/royalpay/payment/manage/analysis/core/impls/CustomersAnalysisServiceImp.java @@ -78,6 +78,7 @@ public class CustomersAnalysisServiceImp implements CustomersAnalysisService { PageList logs = orderAnalysisMapper.listCustomersData(params, new PageBounds(page, limit, Order.formString("amount.desc"))); JSONObject result = PageListUtils.buildPageListResult(logs); result.put("analysis", orderAnalysisMapper.listCustomersDataAnalysis(params)); + result.put("openid_type", params.getIntValue("openid_type")); return result; } diff --git a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/OrderAnalysisMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/OrderAnalysisMapper.xml index d8c12acdc..81cee3fb0 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/OrderAnalysisMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/OrderAnalysisMapper.xml @@ -197,10 +197,16 @@
    @@ -99,6 +100,7 @@
    Nick Name Customer openId Amount(AUD)
    + + + {{customer.nickname}} + + + + {{customer.nickname}} + + + + {{customer.nickname}} + + + + {{customer.nickname}} +
    + @@ -110,6 +112,26 @@ + + + + diff --git a/src/main/ui/static/images/nap.png b/src/main/ui/static/images/nap.png new file mode 100644 index 0000000000000000000000000000000000000000..613b393fa21a6c7df6e338b0de8999da031822b1 GIT binary patch literal 1203 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xd_B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxR5#hc&_u!9QqR!T z(8R(}N5ROz&{*HVSl`fC*U-qyz|zXlQ~?TIxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD$Tv3bSNU;+l1ennz|zM-B0$V)JVzP|XC=H|jx7ncO3BHWAB;NpiyW)Z+ZoqGVvir744~DzI`cN=+=uFAB-e&w+(vKt_H^esM;Afr7KMf`)Hma%LWg zuL;)R>ucqiS6q^qmz?V9Vygr+LN7Bj#mdOh+0fG2&Be*m%*4>p)xy!#+1$d!$=T7_ z#n8yq$pxm@B|o_|H#M&WrZ)wl*A=H;P+G_>0NU)5T9jFqn&MWJpQ`}&vsET;w>aT6 z52`l>w_BWX>eUB2MjsTjNHGl)0wy026P|8?9C*r4%>yR)B4E0nT)Zrjfq_xY)5S5Q z;#Shb=pXmH8XFVU1Wp@IV3T7iv{Js%Anwp+!Cd)3Rd|9xvVwd^BhL?~M#lIV5*n-r z41Ro(=eTD7_;TI(Pxl+93E~a24l+y;vS<8zoIB{tLv@u82O3YbeNgw{Il{iu zQH;Ime1g6LX9KU}vc#O6M;jcTEL4#E*uYca+Q_)xA&z5_iZwHf1cPjHdv)7Kb4O4y N;_2$=vd$@?2>=tDlC}T< literal 0 HcmV?d00001 diff --git a/src/main/ui/static/images/royalpay_sign_ln.png b/src/main/ui/static/images/royalpay_sign_ln.png new file mode 100644 index 0000000000000000000000000000000000000000..72178aee3c77710dc4c5818afa021185dbbeaeeb GIT binary patch literal 1504 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xd_B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxR5#hc&_u!9QqR!T z(8R(}N5ROz&{*HVSl`fC*U-qyz|zXlQ~?TIxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD$Tv3bSNU;+l1ennz|zM-B0$V)JVzP|XC=H|jx7ncO3BHWAB;NpiyW)Z+ZoqGVvir744~DzI`cN=+=uFAB-e&w+(vKt_H^esM;Afr7KMf`)Hma%LWg zuL;)R>ucqiS6q^qmz?V9Vygr+LN7Bj#mdOh+0fG2&Cp)xy!#+1$d!$=T7_ z#n8yq$pxm@B|o_|H#M&WrZ)wl*Ab^)P+G_>0NU)5T9jFqn&MWJpQ`}&vsET;x0vHJ z52`l>w_7Z5>eUB2MjsTjNHGl)0wy026P|8?9C*r4%>yR)B4D~s|F8v^ru;@JFZtFF2;5+aXRA9RXx+%VyWptO7-_kRcTH91?PJ6#U#6O4_Vcw<6I zBd?g4opR>oNtrHEhNo6&N?tX*t;tmuv4*)Tn-(Pg=Gt)V{mN_U%XJ%XXI0d*YacxM`O>o3NgsKZ z+FyE6`|@b8=DB+56)xHfRW$_et+V_+dkWuokGS&Z(WM8{PbSyTyb`seNwDeq!h($|waPp8 z8nXV5*xV9%bpE9p!3E10p6yebDRi>W(8=J+`KY@`*jSgH+<4n2xVoT}rJ_A6k;EHO{8YVNX2EtgXIei%>`jd*v}}iHkb}`L>1G_X{2Q z^VQ^;RJirMBimM-EB27xr=5F4v)A^>mdrcf50;(r-_>!(`k7OB!jWBRTp7zM@7qL| z7f1byPq?bBb91X+(2NJWAI;J(Is4?+%?szIwK#>We!nm3y5xK3gXYoMS9}7k|BEIt Yr2aef|A=YAKTw(L>FVdQ&MBb@0JpV7ivR!s literal 0 HcmV?d00001 From 441800b599704dfe6344d4656d7cd53ca5eb04e3 Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 26 Sep 2018 14:15:14 +0800 Subject: [PATCH 068/103] add select_nap --- src/main/ui/static/images/nap.png | Bin 0 -> 1203 bytes src/main/ui/static/images/royalpay_sign_ln.png | Bin 0 -> 1504 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/main/ui/static/images/nap.png create mode 100644 src/main/ui/static/images/royalpay_sign_ln.png diff --git a/src/main/ui/static/images/nap.png b/src/main/ui/static/images/nap.png new file mode 100644 index 0000000000000000000000000000000000000000..613b393fa21a6c7df6e338b0de8999da031822b1 GIT binary patch literal 1203 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xd_B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxR5#hc&_u!9QqR!T z(8R(}N5ROz&{*HVSl`fC*U-qyz|zXlQ~?TIxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD$Tv3bSNU;+l1ennz|zM-B0$V)JVzP|XC=H|jx7ncO3BHWAB;NpiyW)Z+ZoqGVvir744~DzI`cN=+=uFAB-e&w+(vKt_H^esM;Afr7KMf`)Hma%LWg zuL;)R>ucqiS6q^qmz?V9Vygr+LN7Bj#mdOh+0fG2&Be*m%*4>p)xy!#+1$d!$=T7_ z#n8yq$pxm@B|o_|H#M&WrZ)wl*A=H;P+G_>0NU)5T9jFqn&MWJpQ`}&vsET;w>aT6 z52`l>w_BWX>eUB2MjsTjNHGl)0wy026P|8?9C*r4%>yR)B4E0nT)Zrjfq_xY)5S5Q z;#Shb=pXmH8XFVU1Wp@IV3T7iv{Js%Anwp+!Cd)3Rd|9xvVwd^BhL?~M#lIV5*n-r z41Ro(=eTD7_;TI(Pxl+93E~a24l+y;vS<8zoIB{tLv@u82O3YbeNgw{Il{iu zQH;Ime1g6LX9KU}vc#O6M;jcTEL4#E*uYca+Q_)xA&z5_iZwHf1cPjHdv)7Kb4O4y N;_2$=vd$@?2>=tDlC}T< literal 0 HcmV?d00001 diff --git a/src/main/ui/static/images/royalpay_sign_ln.png b/src/main/ui/static/images/royalpay_sign_ln.png new file mode 100644 index 0000000000000000000000000000000000000000..72178aee3c77710dc4c5818afa021185dbbeaeeb GIT binary patch literal 1504 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+n3Xd_B1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxR5#hc&_u!9QqR!T z(8R(}N5ROz&{*HVSl`fC*U-qyz|zXlQ~?TIxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD$Tv3bSNU;+l1ennz|zM-B0$V)JVzP|XC=H|jx7ncO3BHWAB;NpiyW)Z+ZoqGVvir744~DzI`cN=+=uFAB-e&w+(vKt_H^esM;Afr7KMf`)Hma%LWg zuL;)R>ucqiS6q^qmz?V9Vygr+LN7Bj#mdOh+0fG2&Cp)xy!#+1$d!$=T7_ z#n8yq$pxm@B|o_|H#M&WrZ)wl*Ab^)P+G_>0NU)5T9jFqn&MWJpQ`}&vsET;x0vHJ z52`l>w_7Z5>eUB2MjsTjNHGl)0wy026P|8?9C*r4%>yR)B4D~s|F8v^ru;@JFZtFF2;5+aXRA9RXx+%VyWptO7-_kRcTH91?PJ6#U#6O4_Vcw<6I zBd?g4opR>oNtrHEhNo6&N?tX*t;tmuv4*)Tn-(Pg=Gt)V{mN_U%XJ%XXI0d*YacxM`O>o3NgsKZ z+FyE6`|@b8=DB+56)xHfRW$_et+V_+dkWuokGS&Z(WM8{PbSyTyb`seNwDeq!h($|waPp8 z8nXV5*xV9%bpE9p!3E10p6yebDRi>W(8=J+`KY@`*jSgH+<4n2xVoT}rJ_A6k;EHO{8YVNX2EtgXIei%>`jd*v}}iHkb}`L>1G_X{2Q z^VQ^;RJirMBimM-EB27xr=5F4v)A^>mdrcf50;(r-_>!(`k7OB!jWBRTp7zM@7qL| z7f1byPq?bBb91X+(2NJWAI;J(Is4?+%?szIwK#>We!nm3y5xK3gXYoMS9}7k|BEIt Yr2aef|A=YAKTw(L>FVdQ&MBb@0JpV7ivR!s literal 0 HcmV?d00001 From a8a1abda94c2664ddfcb7710d35257ed202ce168 Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 26 Sep 2018 14:23:29 +0800 Subject: [PATCH 069/103] pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index adaacec07..cfb6e206d 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ au.com.royalpay.payment payment-parent - 0.2.0 + 0.2.0-dev 4.0.0 From aa2e4bc37eaa1abd3f644a38a176f531135aab7d Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 26 Sep 2018 14:30:53 +0800 Subject: [PATCH 070/103] fix select_nap --- .../payment/manage/analysis/mappers/OrderAnalysisMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/OrderAnalysisMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/OrderAnalysisMapper.xml index 81cee3fb0..6c3265277 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/OrderAnalysisMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/OrderAnalysisMapper.xml @@ -204,7 +204,7 @@ LEFT JOIN sys_customer_relation r on r.globalpay_openid = o.customer_id - + LEFT JOIN sys_customer_relation r on r.wechat_openid = o.customer_id From 4f4306ba33d5a72f595170e6362192ad8c037552 Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 26 Sep 2018 14:31:48 +0800 Subject: [PATCH 071/103] fix select_nap --- .../payment/manage/analysis/mappers/OrderAnalysisMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/OrderAnalysisMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/OrderAnalysisMapper.xml index 81cee3fb0..6c3265277 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/OrderAnalysisMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/analysis/mappers/OrderAnalysisMapper.xml @@ -204,7 +204,7 @@ LEFT JOIN sys_customer_relation r on r.globalpay_openid = o.customer_id - + LEFT JOIN sys_customer_relation r on r.wechat_openid = o.customer_id From 562840cedaa43534a0dfbb5cfd98dee9ea7e71f4 Mon Sep 17 00:00:00 2001 From: hellolujian <1370256381@qq.com> Date: Wed, 26 Sep 2018 16:21:51 +0800 Subject: [PATCH 072/103] =?UTF-8?q?[fix]=E5=95=86=E6=88=B7=E7=AB=AF?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E7=A7=98=E9=92=A5=E6=94=AF=E6=8C=81=E5=88=B7?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/ui/static/payment/partner/partner.js | 22 +++++++++++++++++-- .../templates/client_payment_info.html | 10 ++++++++- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/src/main/ui/static/payment/partner/partner.js b/src/main/ui/static/payment/partner/partner.js index e4cdb0451..7096890c6 100644 --- a/src/main/ui/static/payment/partner/partner.js +++ b/src/main/ui/static/payment/partner/partner.js @@ -560,7 +560,7 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], funct }; }]); - app.controller('clientPaymentInfoCtrl', ['$scope', '$http', 'commonDialog', function ($scope, $http, commonDialog) { + app.controller('clientPaymentInfoCtrl', ['$scope', '$http', '$state', 'commonDialog', function ($scope, $http, $state, commonDialog) { $scope.paymentInfo = $scope.partner; $scope.old_customer_surcharge_rate = angular.copy($scope.partner.customer_surcharge_rate); $scope.qrConfig = {currency: 'AUD'}; @@ -829,7 +829,25 @@ define(['angular', 'decimal', 'uiRouter', 'ngBootSwitch', 'ngFileUpload'], funct $scope.bankshow = false; }; - + // 新增需求,商户端刷新支付秘钥 + $scope.refreshCredential = function () { + commonDialog.confirm({ + title: 'Warning', + content: 'Refresh Credential will expire the current one, ' + + 'which will cause the current payment service disabled. ' + + 'Are you sure going on?' + }).then(function () { + $http.put('/sys/partners/' + $scope.partner.client_moniker + '/credential_code').then(function () { + $state.reload(); + }, function (resp) { + commonDialog.alert({ + title: 'Error', + content: resp.data.message, + type: 'error' + }) + }) + }) + }; }]); app.controller('clientPaymentMaterialCtrl', ['$scope', '$http', 'partner', function ($scope, $http, partner) { diff --git a/src/main/ui/static/payment/partner/templates/client_payment_info.html b/src/main/ui/static/payment/partner/templates/client_payment_info.html index 534d6ca61..ad9158a14 100644 --- a/src/main/ui/static/payment/partner/templates/client_payment_info.html +++ b/src/main/ui/static/payment/partner/templates/client_payment_info.html @@ -87,7 +87,15 @@
    -

    +

    + + + + +

    From 566ffb244608258cb5916323b101e66ae712f82d Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 26 Sep 2018 16:24:01 +0800 Subject: [PATCH 073/103] add modify sur --- .../dev/core/impl/ManualServiceimpl.java | 9 +++++++ .../core/impls/ClientManagerImpl.java | 7 ++++++ .../manage/task/PostponeClientTask.java | 10 +++++++- .../partner/templates/partner_new_rate.html | 24 ------------------- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/ManualServiceimpl.java b/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/ManualServiceimpl.java index 501daac17..7f1236a4e 100644 --- a/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/ManualServiceimpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/ManualServiceimpl.java @@ -1,7 +1,9 @@ package au.com.royalpay.payment.manage.dev.core.impl; +import au.com.royalpay.payment.channels.rpay.runtime.RpayApi; import au.com.royalpay.payment.manage.dev.core.ManualService; import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper; +import au.com.royalpay.payment.manage.mappers.system.ClientMapper; import au.com.royalpay.payment.manage.mappers.system.ClientRateMapper; import au.com.royalpay.payment.manage.merchants.core.ClientModifySupport; import au.com.royalpay.payment.manage.merchants.entity.impls.SwitchPermissionModify; @@ -40,6 +42,10 @@ public class ManualServiceimpl implements ManualService { private SynchronizedScheduler synchronizedScheduler; @Resource private ClientModifySupport clientModifySupport; + @Resource + private RpayApi rpayApi; + @Resource + private ClientMapper clientMapper; @Override public void clientPostpone() { @@ -82,6 +88,9 @@ public class ManualServiceimpl implements ManualService { record.put("manager_name", "System"); record.put("remark", "费率到期系统自动延期1年"); clientRateMapper.saveRate(record); + if ("Rpay".equals(o.getString("rate_name"))) { + rpayApi.modifySurchargeConfig(clientMapper.findClient(client_id)); + } }); clientModifySupport.processClientConfigModify(new SwitchPermissionModify(null, p.getString("client_moniker"), "tax_in_surcharge", false)); 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 1785bb42e..6d9da4f29 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 @@ -84,6 +84,7 @@ import au.com.royalpay.payment.manage.support.sms.SmsSender; import au.com.royalpay.payment.manage.system.core.ClientContractService; import au.com.royalpay.payment.manage.system.core.MailGunService; import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery; +import au.com.royalpay.payment.tools.CommonConsts; import au.com.royalpay.payment.tools.connections.attachment.core.AttachmentClient; import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi; import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider; @@ -1610,6 +1611,8 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid configNewClientRate(config, clientId, "hf", "hf_rate_value", org, "min_hf_rate"); configNewClientRate(config, clientId, "Rpay", "Rpay_rate_value", org, "min_Rpay_rate"); + rpayApi.modifySurchargeConfig(client); + } private void configNewClientRate(JSONObject config, int clientId, String channel, String rateKey, JSONObject org, String rateValueKey) { @@ -1651,6 +1654,9 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid configJson.put("manager_name", manager.getString("username")); configJson.put("update_time", new Date()); clientRateMapper.updateConfig(configJson); + if ("Rpay".equals(configJson.getString("rate_name"))) { + rpayApi.modifySurchargeConfig(client); + } int clientId = client.getIntValue("client_id"); JSONObject changeRate = merchantInfoProvider.clientCurrentRate(clientId, new Date(), "Wechat"); int cleanDays = changeRate.getIntValue("clean_days"); @@ -3195,6 +3201,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid throw new InvalidShortIdException(); } clientModifySupport.processClientConfigModify(new SwitchPermissionModify(account, clientMoniker, "skip_clearing", skip_clearing)); + rpayApi.switchMerchantSettle(client); } @Override diff --git a/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java b/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java index 18a98a6d7..9b76c96d6 100644 --- a/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java +++ b/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java @@ -1,6 +1,8 @@ package au.com.royalpay.payment.manage.task; +import au.com.royalpay.payment.channels.rpay.runtime.RpayApi; import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper; +import au.com.royalpay.payment.manage.mappers.system.ClientMapper; import au.com.royalpay.payment.manage.mappers.system.ClientRateMapper; import au.com.royalpay.payment.manage.mappers.system.ManagerMapper; import au.com.royalpay.payment.manage.merchants.core.ClientManager; @@ -52,6 +54,10 @@ public class PostponeClientTask { private SynchronizedScheduler synchronizedScheduler; @Resource private ClientModifySupport clientModifySupport; + @Resource + private RpayApi rpayApi; + @Resource + private ClientMapper clientMapper; @Scheduled(cron = "0 30 8 * * ?") public void postponeClient() { @@ -93,7 +99,9 @@ public class PostponeClientTask { record.put("manager_name", "System"); record.put("remark", "费率到期系统自动延期1年"); clientRateMapper.saveRate(record); - + if ("Rpay".equals(o.getString("rate_name"))) { + rpayApi.modifySurchargeConfig(clientMapper.findClient(client_id)); + } }); clientModifySupport.processClientConfigModify(new SwitchPermissionModify(null, p.getString("client_moniker"), "tax_in_surcharge", false)); adminAccounts.forEach(o -> { diff --git a/src/main/ui/static/payment/partner/templates/partner_new_rate.html b/src/main/ui/static/payment/partner/templates/partner_new_rate.html index 19267e23d..fe0aa512f 100644 --- a/src/main/ui/static/payment/partner/templates/partner_new_rate.html +++ b/src/main/ui/static/payment/partner/templates/partner_new_rate.html @@ -160,30 +160,6 @@ -
    - -
    -
    - -
    %
    -
    -
    -
    - No more than 2.2% -
    -
    - No less than 0.6% -
    -
    - Required Field -
    -
    - -
    -
    -
    From 6c616d57958e12de9f1f2256ad42174d6108d1b2 Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 26 Sep 2018 17:23:37 +0800 Subject: [PATCH 074/103] fix modify sur --- .../payment/manage/merchants/core/impls/ClientManagerImpl.java | 2 ++ 1 file changed, 2 insertions(+) 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 6d9da4f29..ebe26c005 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 @@ -1576,6 +1576,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } @Override + @Transactional public void newConfigRate(JSONObject manager, String clientMoniker, JSONObject config) { JSONObject client = getClientInfoByMoniker(clientMoniker); if (client == null) { @@ -1636,6 +1637,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } @Override + @Transactional public void modifyRateConfig(JSONObject manager, String clientMoniker, int rateId, ClientRateConfig config) { JSONObject client = getClientInfoByMoniker(clientMoniker); if (client == null) { From 9d0fb270fe4072cfef9d16b0a4834409f94f7523 Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 26 Sep 2018 17:27:09 +0800 Subject: [PATCH 075/103] fix modify sur --- .../dev/core/impl/ManualServiceimpl.java | 45 ++++++++++++------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/ManualServiceimpl.java b/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/ManualServiceimpl.java index 7f1236a4e..c5f08f985 100644 --- a/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/ManualServiceimpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/ManualServiceimpl.java @@ -17,6 +17,7 @@ import org.apache.commons.lang3.time.DateUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.util.Date; @@ -76,27 +77,37 @@ public class ManualServiceimpl implements ManualService { cleanDays = wechatRate.getIntValue("c_clean_days"); } int finalCleanDays = cleanDays; - clientRates.forEach(o -> { - JSONObject record = clientRateMapper.latestExpiryConfig(client_id, o.getString("rate_name")); - record.remove("client_rate_id"); - record.put("active_time", now); - record.put("manager_id", 0); - record.put("expiry_time", yearTomorrow); - record.put("create_time", now); - record.put("update_time", now); - record.put("clean_days", finalCleanDays); - record.put("manager_name", "System"); - record.put("remark", "费率到期系统自动延期1年"); - clientRateMapper.saveRate(record); - if ("Rpay".equals(o.getString("rate_name"))) { - rpayApi.modifySurchargeConfig(clientMapper.findClient(client_id)); - } - }); - clientModifySupport.processClientConfigModify(new SwitchPermissionModify(null, p.getString("client_moniker"), "tax_in_surcharge", false)); + modifyClientRates(finalCleanDays,clientRates,client_id,p.getString("client_moniker")); + }); }); logger.info("end doing client postpone"); } + + @Transactional + public void modifyClientRates(int finalCleanDays,List clientRates,int client_id,String client_moniker) { + Date now = new Date(); + Date tomorrow = DateUtils.addDays(now, 1); + Date yearTomorrow = DateUtils.addYears(tomorrow, 1); + clientRates.forEach(o -> { + JSONObject record = clientRateMapper.latestExpiryConfig(client_id, o.getString("rate_name")); + record.remove("client_rate_id"); + record.put("active_time", now); + record.put("manager_id", 0); + record.put("expiry_time", yearTomorrow); + record.put("create_time", now); + record.put("update_time", now); + record.put("clean_days", finalCleanDays); + record.put("manager_name", "System"); + record.put("remark", "费率到期系统自动延期1年"); + clientRateMapper.saveRate(record); + if ("Rpay".equals(o.getString("rate_name"))) { + rpayApi.modifySurchargeConfig(clientMapper.findClient(client_id)); + } + + }); + clientModifySupport.processClientConfigModify(new SwitchPermissionModify(null, client_moniker, "tax_in_surcharge", false)); + } } From aa006c3562fdd36938ef1cf19c7e8274eb99e9ad Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 26 Sep 2018 17:30:41 +0800 Subject: [PATCH 076/103] fix modify sur --- .../payment/manage/merchants/core/impls/ClientManagerImpl.java | 1 + 1 file changed, 1 insertion(+) 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 ebe26c005..809d5896c 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 @@ -3197,6 +3197,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } @Override + @Transactional public void setSkipClearing(JSONObject account, String clientMoniker, Boolean skip_clearing) { JSONObject client = getClientInfoByMoniker(clientMoniker); if (client == null) { From 815603d853f375a1c0409913719ccedce8412429 Mon Sep 17 00:00:00 2001 From: "taylor.dang" Date: Wed, 26 Sep 2018 17:37:27 +0800 Subject: [PATCH 077/103] pom --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cfb6e206d..adaacec07 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ au.com.royalpay.payment payment-parent - 0.2.0-dev + 0.2.0 4.0.0 From 58fb928ef2d338233ccda9d0066bcebc4f2e0c45 Mon Sep 17 00:00:00 2001 From: kira <164851225@qq.com> Date: Wed, 26 Sep 2018 17:44:08 +0800 Subject: [PATCH 078/103] update --- .../manage/task/PostponeClientTask.java | 97 ++++++++++--------- 1 file changed, 50 insertions(+), 47 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java b/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java index 9b76c96d6..22dea8cc4 100644 --- a/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java +++ b/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java @@ -22,13 +22,13 @@ import org.slf4j.LoggerFactory; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; +import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import org.springframework.util.StringUtils; import java.util.Date; -import java.util.HashMap; +import java.util.LinkedList; import java.util.List; -import java.util.Map; import javax.annotation.Resource; @@ -67,51 +67,60 @@ public class PostponeClientTask { Date yearTomorrow = DateUtils.addYears(tomorrow, 1); String expireDate = DateFormatUtils.format(yearTomorrow, "yyyy-MM-dd"); List expiryClient = clientRateMapper.getAllExpiry(now); - + StringBuilder sb = new StringBuilder(); + List successClients = new LinkedList<>(); if (CollectionUtils.isEmpty(expiryClient)) { return; } - Map expiryClients = new HashMap<>(); - expiryClient.forEach(p -> { - expiryClients.put(p.getInteger("client_id"), p); - }); - expiryClients.values().forEach(p -> { - int client_id = p.getIntValue("client_id"); - List adminAccounts = clientAccountMapper.listAdminAccounts(client_id); - List clientRates = clientRateMapper.maxChannelExpiryTime(client_id, null); - JSONObject wechatRate = clientRateMapper.latestChannelCleanDays("Wechat", p.getIntValue("client_id")); - int cleanDays = 1; - if (wechatRate.getInteger("clean_days") != null) { - cleanDays = wechatRate.getIntValue("clean_days"); - } else { - cleanDays = wechatRate.getIntValue("c_clean_days"); + for (JSONObject p : expiryClient) { + try { + modifyRate(now, yearTomorrow, expireDate, p, sb); + } catch (Exception ignore) { + continue; } - int finalCleanDays = cleanDays; - clientRates.forEach(o -> { - JSONObject record = clientRateMapper.latestExpiryConfig(client_id, o.getString("rate_name")); - record.remove("client_rate_id"); - record.put("active_time", now); - record.put("manager_id", 0); - record.put("expiry_time", yearTomorrow); - record.put("create_time", now); - record.put("update_time", now); - record.put("clean_days", finalCleanDays); - record.put("manager_name", "System"); - record.put("remark", "费率到期系统自动延期1年"); - clientRateMapper.saveRate(record); - if ("Rpay".equals(o.getString("rate_name"))) { - rpayApi.modifySurchargeConfig(clientMapper.findClient(client_id)); - } - }); - clientModifySupport.processClientConfigModify(new SwitchPermissionModify(null, p.getString("client_moniker"), "tax_in_surcharge", false)); - adminAccounts.forEach(o -> { - sendClientPostponeNotify(o, expireDate); - }); - }); - sendComplianceNotify(expiryClients, expireDate); + } + sb.deleteCharAt(sb.length() - 1); + sendComplianceNotify(sb, expireDate); }); } + @Transactional + public void modifyRate(Date now, Date yearTomorrow, String expireDate, JSONObject p, StringBuilder sb) { + int client_id = p.getIntValue("client_id"); + List adminAccounts = clientAccountMapper.listAdminAccounts(client_id); + List clientRates = clientRateMapper.maxChannelExpiryTime(client_id, null); + JSONObject wechatRate = clientRateMapper.latestChannelCleanDays("Wechat", p.getIntValue("client_id")); + int cleanDays = 1; + if (wechatRate.getInteger("clean_days") != null) { + cleanDays = wechatRate.getIntValue("clean_days"); + } else { + cleanDays = wechatRate.getIntValue("c_clean_days"); + } + int finalCleanDays = cleanDays; + clientRates.forEach(o -> { + JSONObject record = clientRateMapper.latestExpiryConfig(client_id, o.getString("rate_name")); + record.remove("client_rate_id"); + record.put("active_time", now); + record.put("manager_id", 0); + record.put("expiry_time", yearTomorrow); + record.put("create_time", now); + record.put("update_time", now); + record.put("clean_days", finalCleanDays); + record.put("manager_name", "System"); + record.put("remark", "费率到期系统自动延期1年"); + clientRateMapper.saveRate(record); + if ("Rpay".equals(o.getString("rate_name"))) { + rpayApi.modifySurchargeConfig(clientMapper.findClient(client_id)); + } + }); + clientModifySupport.processClientConfigModify(new SwitchPermissionModify(null, p.getString("client_moniker"), "tax_in_surcharge", false)); + adminAccounts.forEach(o -> { + sendClientPostponeNotify(o, expireDate); + }); + sb.append(p.getString("client_moniker")); + sb.append("、"); + } + private void sendClientPostponeNotify(JSONObject account, String newExpireDate) { JSONObject client = clientManager.getClientInfo(account.getIntValue("client_id")); @@ -132,13 +141,7 @@ public class PostponeClientTask { } } - private void sendComplianceNotify(Map clients, String newExpireDate) { - StringBuffer sb = new StringBuffer(); - clients.values().forEach(p -> { - sb.append(p.getString("client_moniker")); - sb.append("、"); - }); - sb.deleteCharAt(sb.length() - 1); + private void sendComplianceNotify(StringBuilder sb, String newExpireDate) { List compliance = managerMapper.listOpenIdsOfCompliances(); compliance.forEach(p -> { MpWechatApi api = mpWechatApiProvider.getApiFromOpenId(p); From 701e1ceb807fb4136b34ccc8f00c6239be2d6e16 Mon Sep 17 00:00:00 2001 From: kira <164851225@qq.com> Date: Wed, 26 Sep 2018 17:45:51 +0800 Subject: [PATCH 079/103] update --- .../manage/task/PostponeClientTask.java | 50 +++++++++---------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java b/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java index 22dea8cc4..aeea8c9eb 100644 --- a/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java +++ b/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java @@ -8,7 +8,6 @@ import au.com.royalpay.payment.manage.mappers.system.ManagerMapper; import au.com.royalpay.payment.manage.merchants.core.ClientManager; import au.com.royalpay.payment.manage.merchants.core.ClientModifySupport; import au.com.royalpay.payment.manage.merchants.entity.impls.SwitchPermissionModify; -import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi; import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider; import au.com.royalpay.payment.tools.connections.mpsupport.beans.TemplateMessage; import au.com.royalpay.payment.tools.scheduler.SynchronizedScheduler; @@ -24,10 +23,8 @@ import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; -import org.springframework.util.StringUtils; import java.util.Date; -import java.util.LinkedList; import java.util.List; import javax.annotation.Resource; @@ -68,7 +65,6 @@ public class PostponeClientTask { String expireDate = DateFormatUtils.format(yearTomorrow, "yyyy-MM-dd"); List expiryClient = clientRateMapper.getAllExpiry(now); StringBuilder sb = new StringBuilder(); - List successClients = new LinkedList<>(); if (CollectionUtils.isEmpty(expiryClient)) { return; } @@ -122,32 +118,32 @@ public class PostponeClientTask { } private void sendClientPostponeNotify(JSONObject account, String newExpireDate) { - JSONObject client = clientManager.getClientInfo(account.getIntValue("client_id")); - - try { - if (StringUtils.isEmpty(account.getString("wechat_openid"))) { - return; - } - MpWechatApi api = mpWechatApiProvider.getApiFromOpenId(account.getString("wechat_openid")); - if (api != null) { - String templateId = api.getTemplateId("client-postpone"); - if (templateId != null) { - TemplateMessage notice = initClientMessage(client, newExpireDate, account.getString("wechat_openid"), templateId); - api.sendTemplateMessage(notice); - } - } - } catch (Exception e) { - logger.error("Sending Notify failure", e); - } +// JSONObject client = clientManager.getClientInfo(account.getIntValue("client_id")); +// +// try { +// if (StringUtils.isEmpty(account.getString("wechat_openid"))) { +// return; +// } +// MpWechatApi api = mpWechatApiProvider.getApiFromOpenId(account.getString("wechat_openid")); +// if (api != null) { +// String templateId = api.getTemplateId("client-postpone"); +// if (templateId != null) { +// TemplateMessage notice = initClientMessage(client, newExpireDate, account.getString("wechat_openid"), templateId); +// api.sendTemplateMessage(notice); +// } +// } +// } catch (Exception e) { +// logger.error("Sending Notify failure", e); +// } } private void sendComplianceNotify(StringBuilder sb, String newExpireDate) { - List compliance = managerMapper.listOpenIdsOfCompliances(); - compliance.forEach(p -> { - MpWechatApi api = mpWechatApiProvider.getApiFromOpenId(p); - TemplateMessage notice = initComplianceMessage(sb.toString(), newExpireDate, p, api.getTemplateId("client-postpone")); - api.sendTemplateMessage(notice); - }); +// List compliance = managerMapper.listOpenIdsOfCompliances(); +// compliance.forEach(p -> { +// MpWechatApi api = mpWechatApiProvider.getApiFromOpenId(p); +// TemplateMessage notice = initComplianceMessage(sb.toString(), newExpireDate, p, api.getTemplateId("client-postpone")); +// api.sendTemplateMessage(notice); +// }); } From 4507310f8b31995ddb211cdafd74213069b18d1e Mon Sep 17 00:00:00 2001 From: luoyang Date: Wed, 26 Sep 2018 19:37:29 +0800 Subject: [PATCH 080/103] fix modify sur --- src/document/cn/apis.js | 55 +-------------------------------------- src/document/en/apis.js | 57 +---------------------------------------- 2 files changed, 2 insertions(+), 110 deletions(-) diff --git a/src/document/cn/apis.js b/src/document/cn/apis.js index bec207b8a..5642c6f87 100644 --- a/src/document/cn/apis.js +++ b/src/document/cn/apis.js @@ -106,60 +106,7 @@ * @apiError (ERROR_CODE) ORDER_NOT_EXIST 订单不存在 * @apiError (ERROR_CODE) ORDER_MISMATCH 订单号与商户不匹配 */ -/** - * @api {PUT} /api/v1.0/h5_payment/partners/{partner_code}/orders/{order_id} 创建H5支付单 - * @apiName NewMobileH5Pay - * @apiGroup MobileH5 - * @apiVersion 1.0.0 - * @apiDescription - * 注意:微信H5支付接口必须单独申请,腾讯批复后方可使用,有需要的商户请联系RoyalPay客服,支付宝无此限制
    - * H5支付适用场景为移动端App或者手机自带浏览器进行支付,用户下单后浏览器跳转至微信支付页面并自动拉起微信/支付宝客户端完成支付。
    - * 返回值包括跳转支付地址,跳转支付页需要带上签名信息。 - * 货币类型如果是CNY,注意通过汇率转换后不得低于0.01AUD,否则订单可以创建成功,但支付时会报金额不合法错误
    - * - * @apiHeader Accept application/json - * @apiHeader Content-Type application/json - * @apiParam (PathVariable) {String} partner_code 必填,商户编码,由4位大写字母或数字构成 - * @apiParam (PathVariable) {String} order_id 必填,商户支付订单号,要求同一商户唯一 - * @apiUse Sign - * @apiParam (JSON) {String} description 必填,订单标题(最大长度128字符,超出自动截取) - * @apiParam (JSON) {int} price 必填,金额,单位为货币最小单位,例如使用100表示AUD1.00 - * @apiParam (JSON) {String=AUD,CNY} currency=AUD 币种代码 - * @apiParam (JSON) {String=Alipay,Wechat} channel 支付渠道,大小写敏感 - * @apiParam (JSON) {String} notify_url 支付通知url,详见支付通知api,不填则不会推送支付通知 - * @apiParam (JSON) {String} operator 操作人员标识 - * - * @apiSuccess {String} return_code 执行结果 - * @apiSuccess {String} result_code SUCCESS表示创建订单成功,EXISTS表示订单已存在 - * @apiSuccess {String} partner_code 商户编码 - * @apiSuccess {String} channel 支付渠道 - * @apiSuccess {String} full_name 商户注册全名 - * @apiSuccess {String} partner_name 商户名称 - * @apiSuccess {String} order_id RoyalPay订单ID,同时也是微信订单ID,最终支付成功的订单ID可能不同 - * @apiSuccess {String} partner_order_id 商户订单ID - * @apiSuccess {String} pay_url 跳转URL - * - * @apiUse GlobalError - * @apiError (ERROR_CODE) ORDER_MISMATCH 订单号与商户不匹配 - * @apiError (ERROR_CODE) ORDER_PAID 订单已支付 - * - */ -/** - * @api {GET} /api/v1.0/h5_payment/partners/{partner_code}/orders/{order_id}/pay H5支付跳转页 - * @apiName MobileH5Pay - * @apiDescription 必须先调用创建H5支付订单接口再进行跳转。 - * 建议在用户回调到对应页时通过后台查询订单状态接口确认订单的支付状态。 - * @apiVersion 1.0.0 - * @apiGroup MobileH5 - * @apiParam (PathVariable) {String} partner_code 必填,商户编码,由4位大写字母或数字构成 - * @apiParam (PathVariable) {String} order_id 必填,商户支付订单号,要求已预先创建 - * @apiUse Sign - * @apiParam (QueryParam) {String} redirect 必填,支付成功后跳转页面,回调时会带上签名参数用于校验 - * - * @apiUse GlobalError - * @apiError (ERROR_CODE) ORDER_NOT_EXIST 订单不存在 - * @apiError (ERROR_CODE) ORDER_MISMATCH 订单号与商户不匹配 - */ + /** * @api {PUT} /api/v1.0/jsapi_gateway/partners/{partner_code}/orders/{order_id} 创建JSAPI订单 diff --git a/src/document/en/apis.js b/src/document/en/apis.js index a09a8949e..7abb83c7d 100644 --- a/src/document/en/apis.js +++ b/src/document/en/apis.js @@ -109,62 +109,7 @@ * @apiError (ERROR_CODE) ORDER_NOT_EXIST Order does not exist * @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner */ -/** - * @api {PUT} /api/v1.0/h5_payment/partners/{partner_code}/orders/{order_id} Create H5 Payment - * @apiName NewMobileH5Pay - * @apiGroup MobileH5 - * @apiVersion 1.0.0 - * @apiDescription - * Warning:H5 Payment socket requires application separately and requires agreement from Tencent. Merchants who needs this socket please contact RoyalPay first. - * Alipay has no limit at the moment.
    - * H5 Payment is used for payment in Webpage or App on mobile outside WeChat or Alipay App. The browser would redirect to a webpage from WeChat or Alipay and call the App to finish the payment.
    - * Return value contains a payment page. Partners shall guide users to redirect to this page. Sign params are required. - * If the currency is CNY, equivalent AUD amount shall never less than 0.01AUD, - * otherwise user will get Invalid Amount Error from WeChat when making the payment.
    - * - * @apiHeader Accept application/json - * @apiHeader Content-Type application/json - * @apiParam (PathVariable) {String} partner_code Required, Partner code - * @apiParam (PathVariable) {String} order_id Required, Partner order id - * @apiUse Sign - * @apiParam (JSON) {String} description Required, Order description - * @apiParam (JSON) {int} price Required, Price of the order. Use the base unit of the currency. - * @apiParam (JSON) {String=AUD,CNY} currency=AUD currency - * @apiParam (JSON) {String=Alipay,Wechat} channel Payment channel, case sensitive - * @apiParam (JSON) {String} notify_url System will call the notify url if provided when the payment succeeds - * @apiParam (JSON) {String} operator Note for the operator who created this order. - * - * @apiSuccess {String} return_code Execution result - * @apiSuccess {String} result_code SUCCESS means order created successfully, EXISTS means order has already existed. - * @apiSuccess {String} partner_code Partner code - * @apiSuccess {String} channel Payment channel - * @apiSuccess {String} full_name Partner's full company name when registered - * @apiSuccess {String} partner_name Partner's name - * @apiSuccess {String} order_id Order id in RoyalPay, which is also WeChat order id. - * @apiSuccess {String} partner_order_id Partner order id - * @apiSuccess {String} pay_url Payment page in RoyalPay. - * - * @apiUse GlobalError - * @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner - * @apiError (ERROR_CODE) ORDER_PAID Order has already been paid - * - */ -/** - * @api {GET} /api/v1.0/h5_payment/partners/{partner_code}/orders/{order_id}/pay H5 Payment Page - * @apiName MobileH5Pay - * @apiDescription This page mush be called after payment order has been created. - * When jumping back to redirection URL, it is recommended to call the order query API to make sure the payment has succeeded. - * @apiVersion 1.0.0 - * @apiGroup MobileH5 - * @apiParam (PathVariable) {String} partner_code Required, Partner code - * @apiParam (PathVariable) {String} order_id Required, Partner order id. It shall have already been created - * @apiUse Sign - * @apiParam (QueryParam) {String} redirect Required, Redirect url when payment succeeded. Contain sign parameters for validation. - * - * @apiUse GlobalError - * @apiError (ERROR_CODE) ORDER_NOT_EXIST Order does not exist - * @apiError (ERROR_CODE) ORDER_MISMATCH Order is not belong to this partner - */ + /** * @api {PUT} /api/v1.0/jsapi_gateway/partners/{partner_code}/orders/{order_id} Create JSAPI Payment Order From d6c53c115b7b85419e503570351b9e3749eee3db Mon Sep 17 00:00:00 2001 From: kira <164851225@qq.com> Date: Wed, 26 Sep 2018 20:32:33 +0800 Subject: [PATCH 081/103] postpone client rate --- .../manage/merchants/core/ClientManager.java | 2 + .../core/impls/ClientManagerImpl.java | 73 +++++++++++++- .../manage/task/PostponeClientTask.java | 99 ++----------------- .../mappers/system/ClientRateMapper.xml | 2 +- 4 files changed, 84 insertions(+), 92 deletions(-) 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 377d370cf..a1da2958b 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 @@ -23,6 +23,7 @@ import org.springframework.web.bind.annotation.PathVariable; import java.io.IOException; import java.io.OutputStream; import java.math.BigDecimal; +import java.util.Date; import java.util.List; import javax.servlet.http.HttpServletResponse; @@ -340,4 +341,5 @@ public interface ClientManager { void updateAllPartnerPassword(String clientMoniker, List emails); + void postponeClientRate(Date now, Date yearTomorrow, String expireDate, JSONObject p, StringBuilder sb); } 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 6d9da4f29..ddb9a9738 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 @@ -84,7 +84,6 @@ import au.com.royalpay.payment.manage.support.sms.SmsSender; import au.com.royalpay.payment.manage.system.core.ClientContractService; import au.com.royalpay.payment.manage.system.core.MailGunService; import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery; -import au.com.royalpay.payment.tools.CommonConsts; import au.com.royalpay.payment.tools.connections.attachment.core.AttachmentClient; import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi; import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider; @@ -124,6 +123,7 @@ import com.github.miemiedev.mybatis.paginator.domain.PageList; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.RandomStringUtils; +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; @@ -3976,6 +3976,77 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } + private void sendClientPostponeNotify(JSONObject account, String newExpireDate) { + JSONObject client = getClientInfo(account.getIntValue("client_id")); + + try { + if (StringUtils.isEmpty(account.getString("wechat_openid"))) { + return; + } + MpWechatApi api = mpWechatApiProvider.getApiFromOpenId(account.getString("wechat_openid")); + if (api != null) { + String templateId = api.getTemplateId("client-postpone"); + if (templateId != null) { + TemplateMessage notice = initClientMessage(client, newExpireDate, account.getString("wechat_openid"), templateId); + api.sendTemplateMessage(notice); + } + } + } catch (Exception e) { + logger.error("Sending Notify failure", e); + } + } + + @Override + @Transactional + public void postponeClientRate(Date now, Date yearTomorrow, String expireDate, JSONObject p, StringBuilder sb) { + int client_id = p.getIntValue("client_id"); + List adminAccounts = clientAccountMapper.listAdminAccounts(client_id); + List clientRates = clientRateMapper.maxChannelExpiryTime(client_id, null); + JSONObject wechatRate = clientRateMapper.latestChannelCleanDays("Wechat", p.getIntValue("client_id")); + int cleanDays = 1; + if (wechatRate.getInteger("clean_days") != null) { + cleanDays = wechatRate.getIntValue("clean_days"); + } else { + cleanDays = wechatRate.getIntValue("c_clean_days"); + } + int finalCleanDays = cleanDays; + for (JSONObject o : clientRates) { + JSONObject record = clientRateMapper.latestExpiryConfig(client_id, o.getString("rate_name")); + record.remove("client_rate_id"); + record.put("active_time", now); + record.put("manager_id", 0); + record.put("expiry_time", yearTomorrow); + record.put("create_time", now); + record.put("update_time", now); + record.put("clean_days", finalCleanDays); + record.put("manager_name", "System"); + record.put("remark", "费率到期系统自动延期1年"); + clientRateMapper.saveRate(record); + if ("Rpay".equals(o.getString("rate_name"))) { + rpayApi.modifySurchargeConfig(clientMapper.findClient(client_id)); + + } + } + clientModifySupport.processClientConfigModify(new SwitchPermissionModify(null, p.getString("client_moniker"), "tax_in_surcharge", false)); + adminAccounts.forEach(o -> { + sendClientPostponeNotify(o, expireDate); + }); + sb.append(p.getString("client_moniker")); + sb.append("、"); + } + + + + private TemplateMessage initClientMessage(JSONObject client, String newExpiryDate, String wechatOpenid, String templateId) { + TemplateMessage notice = new TemplateMessage(wechatOpenid, templateId, null); + notice.put("first", "您好,您的合同费率已到期,根据合同协议系统已自动为您延期1年。", "#ff0000"); + notice.put("keyword1", client.getString("short_name") + "(" + client.getString("client_moniker") + ")", "#ff0000"); + notice.put("keyword2", newExpiryDate, "#0000ff"); + notice.put("remark", "如有疑问请联系RoyalPay", "#000000"); + return notice; + } + + private void sendTestMerchantPassword(List accounts, List emails) { Context ctx = new Context(); ctx.setVariable("accounts", accounts); diff --git a/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java b/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java index aeea8c9eb..f0cc4f098 100644 --- a/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java +++ b/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java @@ -1,13 +1,9 @@ package au.com.royalpay.payment.manage.task; -import au.com.royalpay.payment.channels.rpay.runtime.RpayApi; -import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper; -import au.com.royalpay.payment.manage.mappers.system.ClientMapper; import au.com.royalpay.payment.manage.mappers.system.ClientRateMapper; import au.com.royalpay.payment.manage.mappers.system.ManagerMapper; import au.com.royalpay.payment.manage.merchants.core.ClientManager; -import au.com.royalpay.payment.manage.merchants.core.ClientModifySupport; -import au.com.royalpay.payment.manage.merchants.entity.impls.SwitchPermissionModify; +import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApi; import au.com.royalpay.payment.tools.connections.mpsupport.MpWechatApiProvider; import au.com.royalpay.payment.tools.connections.mpsupport.beans.TemplateMessage; import au.com.royalpay.payment.tools.scheduler.SynchronizedScheduler; @@ -21,7 +17,6 @@ import org.slf4j.LoggerFactory; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; -import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.util.Date; @@ -44,17 +39,9 @@ public class PostponeClientTask { @Resource private ClientManager clientManager; @Resource - private ClientAccountMapper clientAccountMapper; - @Resource private ManagerMapper managerMapper; @Resource private SynchronizedScheduler synchronizedScheduler; - @Resource - private ClientModifySupport clientModifySupport; - @Resource - private RpayApi rpayApi; - @Resource - private ClientMapper clientMapper; @Scheduled(cron = "0 30 8 * * ?") public void postponeClient() { @@ -70,9 +57,9 @@ public class PostponeClientTask { } for (JSONObject p : expiryClient) { try { - modifyRate(now, yearTomorrow, expireDate, p, sb); + clientManager.postponeClientRate(now, yearTomorrow, expireDate, p, sb); } catch (Exception ignore) { - continue; + logger.info("a",ignore); } } sb.deleteCharAt(sb.length() - 1); @@ -80,82 +67,15 @@ public class PostponeClientTask { }); } - @Transactional - public void modifyRate(Date now, Date yearTomorrow, String expireDate, JSONObject p, StringBuilder sb) { - int client_id = p.getIntValue("client_id"); - List adminAccounts = clientAccountMapper.listAdminAccounts(client_id); - List clientRates = clientRateMapper.maxChannelExpiryTime(client_id, null); - JSONObject wechatRate = clientRateMapper.latestChannelCleanDays("Wechat", p.getIntValue("client_id")); - int cleanDays = 1; - if (wechatRate.getInteger("clean_days") != null) { - cleanDays = wechatRate.getIntValue("clean_days"); - } else { - cleanDays = wechatRate.getIntValue("c_clean_days"); - } - int finalCleanDays = cleanDays; - clientRates.forEach(o -> { - JSONObject record = clientRateMapper.latestExpiryConfig(client_id, o.getString("rate_name")); - record.remove("client_rate_id"); - record.put("active_time", now); - record.put("manager_id", 0); - record.put("expiry_time", yearTomorrow); - record.put("create_time", now); - record.put("update_time", now); - record.put("clean_days", finalCleanDays); - record.put("manager_name", "System"); - record.put("remark", "费率到期系统自动延期1年"); - clientRateMapper.saveRate(record); - if ("Rpay".equals(o.getString("rate_name"))) { - rpayApi.modifySurchargeConfig(clientMapper.findClient(client_id)); - } - }); - clientModifySupport.processClientConfigModify(new SwitchPermissionModify(null, p.getString("client_moniker"), "tax_in_surcharge", false)); - adminAccounts.forEach(o -> { - sendClientPostponeNotify(o, expireDate); - }); - sb.append(p.getString("client_moniker")); - sb.append("、"); - } - - private void sendClientPostponeNotify(JSONObject account, String newExpireDate) { -// JSONObject client = clientManager.getClientInfo(account.getIntValue("client_id")); -// -// try { -// if (StringUtils.isEmpty(account.getString("wechat_openid"))) { -// return; -// } -// MpWechatApi api = mpWechatApiProvider.getApiFromOpenId(account.getString("wechat_openid")); -// if (api != null) { -// String templateId = api.getTemplateId("client-postpone"); -// if (templateId != null) { -// TemplateMessage notice = initClientMessage(client, newExpireDate, account.getString("wechat_openid"), templateId); -// api.sendTemplateMessage(notice); -// } -// } -// } catch (Exception e) { -// logger.error("Sending Notify failure", e); -// } - } - private void sendComplianceNotify(StringBuilder sb, String newExpireDate) { -// List compliance = managerMapper.listOpenIdsOfCompliances(); -// compliance.forEach(p -> { -// MpWechatApi api = mpWechatApiProvider.getApiFromOpenId(p); -// TemplateMessage notice = initComplianceMessage(sb.toString(), newExpireDate, p, api.getTemplateId("client-postpone")); -// api.sendTemplateMessage(notice); -// }); + List compliance = managerMapper.listOpenIdsOfCompliances(); + compliance.forEach(p -> { + MpWechatApi api = mpWechatApiProvider.getApiFromOpenId(p); + TemplateMessage notice = initComplianceMessage(sb.toString(), newExpireDate, p, api.getTemplateId("client-postpone")); + api.sendTemplateMessage(notice); + }); } - - private TemplateMessage initClientMessage(JSONObject client, String newExpiryDate, String wechatOpenid, String templateId) { - TemplateMessage notice = new TemplateMessage(wechatOpenid, templateId, null); - notice.put("first", "您好,您的合同费率已到期,根据合同协议系统已自动为您延期1年。", "#ff0000"); - notice.put("keyword1", client.getString("short_name") + "(" + client.getString("client_moniker") + ")", "#ff0000"); - notice.put("keyword2", newExpiryDate, "#0000ff"); - notice.put("remark", "如有疑问请联系RoyalPay", "#000000"); - return notice; - } - private TemplateMessage initComplianceMessage(String clients, String newExpiryDate, String wechatOpenid, String templateId) { TemplateMessage notice = new TemplateMessage(wechatOpenid, templateId, null); notice.put("first", "以下商户据合同费率已经自动延期1年", "#ff0000"); @@ -164,5 +84,4 @@ public class PostponeClientTask { notice.put("remark", " ", "#000000"); return notice; } - } diff --git a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientRateMapper.xml b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientRateMapper.xml index 8407cb6c3..545d64bdc 100644 --- a/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientRateMapper.xml +++ b/src/main/resources/au/com/royalpay/payment/manage/mappers/system/ClientRateMapper.xml @@ -113,7 +113,7 @@ sys_client_rates cr inner join sys_clients c on c.client_id = cr.client_id and c.is_valid = 1 and (c.approve_result = 1 or c.approve_result = 2) GROUP BY - cr.client_id ,cr.rate_name + cr.client_id ) a WHERE a.expiry_time < #{expiry_date} From 3a7241360f91e4d7aa934bc217cd6bb464e40dea Mon Sep 17 00:00:00 2001 From: kira <164851225@qq.com> Date: Wed, 26 Sep 2018 20:37:39 +0800 Subject: [PATCH 082/103] update --- .../payment/manage/merchants/core/ClientManager.java | 2 +- .../manage/merchants/core/impls/ClientManagerImpl.java | 10 ++++------ .../payment/manage/task/PostponeClientTask.java | 8 +++++--- .../payment/manage/task/PostponeClientTaskTest.java | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) 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 a1da2958b..8bcca2a11 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 @@ -341,5 +341,5 @@ public interface ClientManager { void updateAllPartnerPassword(String clientMoniker, List emails); - void postponeClientRate(Date now, Date yearTomorrow, String expireDate, JSONObject p, StringBuilder sb); + void postponeClientRate(Date now, Date yearTomorrow, String expireDate, JSONObject client); } 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 ddb9a9738..85af71677 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 @@ -3998,11 +3998,11 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid @Override @Transactional - public void postponeClientRate(Date now, Date yearTomorrow, String expireDate, JSONObject p, StringBuilder sb) { - int client_id = p.getIntValue("client_id"); + public void postponeClientRate(Date now, Date yearTomorrow, String expireDate, JSONObject client) { + int client_id = client.getIntValue("client_id"); List adminAccounts = clientAccountMapper.listAdminAccounts(client_id); List clientRates = clientRateMapper.maxChannelExpiryTime(client_id, null); - JSONObject wechatRate = clientRateMapper.latestChannelCleanDays("Wechat", p.getIntValue("client_id")); + JSONObject wechatRate = clientRateMapper.latestChannelCleanDays("Wechat", client.getIntValue("client_id")); int cleanDays = 1; if (wechatRate.getInteger("clean_days") != null) { cleanDays = wechatRate.getIntValue("clean_days"); @@ -4027,12 +4027,10 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } } - clientModifySupport.processClientConfigModify(new SwitchPermissionModify(null, p.getString("client_moniker"), "tax_in_surcharge", false)); + clientModifySupport.processClientConfigModify(new SwitchPermissionModify(null, client.getString("client_moniker"), "tax_in_surcharge", false)); adminAccounts.forEach(o -> { sendClientPostponeNotify(o, expireDate); }); - sb.append(p.getString("client_moniker")); - sb.append("、"); } diff --git a/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java b/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java index f0cc4f098..c03a84d31 100644 --- a/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java +++ b/src/main/java/au/com/royalpay/payment/manage/task/PostponeClientTask.java @@ -55,11 +55,13 @@ public class PostponeClientTask { if (CollectionUtils.isEmpty(expiryClient)) { return; } - for (JSONObject p : expiryClient) { + for (JSONObject client : expiryClient) { try { - clientManager.postponeClientRate(now, yearTomorrow, expireDate, p, sb); + clientManager.postponeClientRate(now, yearTomorrow, expireDate, client); + sb.append(client.getString("client_moniker")); + sb.append("、"); } catch (Exception ignore) { - logger.info("a",ignore); + continue; } } sb.deleteCharAt(sb.length() - 1); diff --git a/src/test/java/au/com/royalpay/payment/manage/task/PostponeClientTaskTest.java b/src/test/java/au/com/royalpay/payment/manage/task/PostponeClientTaskTest.java index 42b2f38e6..254f1ca27 100644 --- a/src/test/java/au/com/royalpay/payment/manage/task/PostponeClientTaskTest.java +++ b/src/test/java/au/com/royalpay/payment/manage/task/PostponeClientTaskTest.java @@ -10,9 +10,9 @@ import org.springframework.test.context.junit4.SpringRunner; import javax.annotation.Resource; -@SpringBootTest -@ActiveProfiles({ "local", "alipay", "wechat", "jd", "bestpay" }) -@RunWith(SpringRunner.class) + @SpringBootTest + @ActiveProfiles({ "local","rpay", "alipay", "wechat", "jd", "bestpay" }) + @RunWith(SpringRunner.class) public class PostponeClientTaskTest { @Resource private ClientRateMapper clientRateMapper; From aba4101dd72b47209eaf901f8230c117f3fd1034 Mon Sep 17 00:00:00 2001 From: luoyang Date: Thu, 27 Sep 2018 17:14:33 +0800 Subject: [PATCH 083/103] add --- .../manage/dev/core/HfUpdateService.java | 2 ++ .../manage/dev/core/impl/HfUpdateImpl.java | 13 ++++++++++++ .../manage/dev/web/TestController.java | 13 ++++++++++++ .../manage/mappers/system/ClientMapper.java | 2 ++ .../core/impls/ClientManagerImpl.java | 1 + .../manage/mappers/system/ClientMapper.xml | 4 ++++ .../ui/static/config/devtools/devtools.js | 20 +++++++++++++++++++ .../config/devtools/templates/hfupdate.html | 2 +- .../config/devtools/templates/root.html | 4 ++++ .../config/devtools/templates/rpayupdate.html | 15 ++++++++++++++ 10 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 src/main/ui/static/config/devtools/templates/rpayupdate.html diff --git a/src/main/java/au/com/royalpay/payment/manage/dev/core/HfUpdateService.java b/src/main/java/au/com/royalpay/payment/manage/dev/core/HfUpdateService.java index bc5cf8b27..fb7611487 100644 --- a/src/main/java/au/com/royalpay/payment/manage/dev/core/HfUpdateService.java +++ b/src/main/java/au/com/royalpay/payment/manage/dev/core/HfUpdateService.java @@ -6,4 +6,6 @@ public interface HfUpdateService { String updateStatus(); + String rpayUpdate(); + } diff --git a/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/HfUpdateImpl.java b/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/HfUpdateImpl.java index 4d10674de..8db1c972a 100644 --- a/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/HfUpdateImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/HfUpdateImpl.java @@ -1,5 +1,6 @@ package au.com.royalpay.payment.manage.dev.core.impl; +import au.com.royalpay.payment.channels.rpay.runtime.RpayApi; import au.com.royalpay.payment.manage.dev.core.HfUpdateService; import au.com.royalpay.payment.manage.mappers.system.ClientConfigMapper; import au.com.royalpay.payment.manage.mappers.system.ClientMapper; @@ -23,6 +24,8 @@ public class HfUpdateImpl implements HfUpdateService { private MpWechatApiProvider mpWechatApiProvider; @Resource private ClientConfigMapper clientConfigMapper; + @Resource + private RpayApi rpayApi; @Override public String updateStatus() { @@ -41,4 +44,14 @@ public class HfUpdateImpl implements HfUpdateService { }); return "ok"; } + + @Override + public String rpayUpdate() { + List clientIds = clientMapper.findByrpayNotNull(); + clientIds.forEach(dbResult -> { + rpayApi.modifySurchargeConfig(dbResult); + + }); + return "ok"; + } } 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 c14326cc6..5d664eac8 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 @@ -4,6 +4,7 @@ import au.com.royalpay.payment.channels.alipay.config.AlipayEnvironment; import au.com.royalpay.payment.channels.alipay.runtime.AlipayClient; import au.com.royalpay.payment.channels.bestpay.runtime.BestPayClient; import au.com.royalpay.payment.channels.jd.runtime.JDClient; +import au.com.royalpay.payment.channels.rpay.runtime.RpayClient; import au.com.royalpay.payment.channels.wechat.runtime.WxPayClient; import au.com.royalpay.payment.core.PaymentApi; import au.com.royalpay.payment.core.exceptions.InvalidShortIdException; @@ -96,6 +97,8 @@ public class TestController implements ApplicationEventPublisherAware { @Resource private JDClient jdClient; @Resource + private RpayClient rpayClient; + @Resource private TradeLogService tradeLogService; @Resource private RetailAppService retailAppService; @@ -292,6 +295,11 @@ public class TestController implements ApplicationEventPublisherAware { xmlStr = XmlFormatUtils.formatXml(elem); res.put("xml", xmlStr); break; + case "Rpay": + JSONObject orderInfo = rpayClient.queryOrderStatus(orderId); + String rpayjson = JSON.toJSONString(orderInfo, SerializerFeature.PrettyFormat); + res.put("xml", rpayjson); + break; default: throw new BadRequestException("Not Support channel:" + channel); } @@ -403,4 +411,9 @@ public class TestController implements ApplicationEventPublisherAware { public String hfClearAmount() { return hfUpdateService.updateStatus(); } + + @ManagerMapping(value = "/rpayUpdate", method = RequestMethod.PUT, role = ManagerRole.DEVELOPER) + public String rpayUpdateClearing() { + return hfUpdateService.rpayUpdate(); + } } 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 f42b842c5..a1b6d4cb9 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 @@ -102,4 +102,6 @@ public interface ClientMapper { @AutoSql(type = SqlType.UPDATE) void updateRpayEnterpriseId(@Param("client_id") int clientId, @Param("rpay_enterprise_id") String rpayEnterpriseId); + List findByrpayNotNull(); + } 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 6ab73390b..244c5f03d 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 @@ -3204,6 +3204,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid throw new InvalidShortIdException(); } clientModifySupport.processClientConfigModify(new SwitchPermissionModify(account, clientMoniker, "skip_clearing", skip_clearing)); + client.put("skip_clearing", skip_clearing); rpayApi.switchMerchantSettle(client); } 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 ac92fbe79..815348b9d 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 @@ -365,4 +365,8 @@ + + \ No newline at end of file diff --git a/src/main/ui/static/config/devtools/devtools.js b/src/main/ui/static/config/devtools/devtools.js index e5dd667ed..009e3dcc5 100644 --- a/src/main/ui/static/config/devtools/devtools.js +++ b/src/main/ui/static/config/devtools/devtools.js @@ -63,6 +63,10 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) { url: '/hfupdate', templateUrl: '/static/config/devtools/templates/hfupdate.html', controller: 'hfupdateCtrl' + }).state('devtools.rpayupdate', { + url: '/rpayupdate', + templateUrl: '/static/config/devtools/templates/rpayupdate.html', + controller: 'rpayupdateCtrl' }) }]); app.controller('devManualRefundCtrl', ['$scope', '$http', 'commonDialog', function ($scope, $http, commonDialog) { @@ -384,6 +388,22 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) { }]); + app.controller('rpayupdateCtrl', ['$scope', '$http','$filter', function ($scope, $http,$filter) { + $scope.selecttotal = true; + $scope.update = function () { + $scope.totalhide = true; + $scope.selecttotal = false; + + $http.put('/dev/rpayUpdate').then(function (resp) { + $scope.totalhide = false; + $scope.selecttotal = true; + }, function (resp) { + alert(resp.data.message); + }) + } + + }]); + return app; }); \ No newline at end of file diff --git a/src/main/ui/static/config/devtools/templates/hfupdate.html b/src/main/ui/static/config/devtools/templates/hfupdate.html index aa428f774..aa834204e 100644 --- a/src/main/ui/static/config/devtools/templates/hfupdate.html +++ b/src/main/ui/static/config/devtools/templates/hfupdate.html @@ -1,5 +1,5 @@
    -

    更新HF短链接

    +

    更新HF短链接

    diff --git a/src/main/ui/static/config/devtools/templates/rpayupdate.html b/src/main/ui/static/config/devtools/templates/rpayupdate.html new file mode 100644 index 000000000..f91337e4f --- /dev/null +++ b/src/main/ui/static/config/devtools/templates/rpayupdate.html @@ -0,0 +1,15 @@ +
    +

    更新Rpay进件费率时间

    + +
    +
    +
    + +
    +
    \ No newline at end of file From 71bad3b7c3567b1376bce95b2018e33201337601 Mon Sep 17 00:00:00 2001 From: luoyang Date: Thu, 27 Sep 2018 17:31:32 +0800 Subject: [PATCH 084/103] add --- .../payment/manage/dev/core/impl/HfUpdateImpl.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/HfUpdateImpl.java b/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/HfUpdateImpl.java index 8db1c972a..e9fa6ccc4 100644 --- a/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/HfUpdateImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/dev/core/impl/HfUpdateImpl.java @@ -10,6 +10,8 @@ import au.com.royalpay.payment.tools.env.PlatformEnvironment; import com.alibaba.fastjson.JSONObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import java.util.List; @@ -27,6 +29,8 @@ public class HfUpdateImpl implements HfUpdateService { @Resource private RpayApi rpayApi; + private Logger logger = LoggerFactory.getLogger(getClass()); + @Override public String updateStatus() { List clientIds = clientMapper.findByhfPayUrlNotNull(); @@ -48,10 +52,15 @@ public class HfUpdateImpl implements HfUpdateService { @Override public String rpayUpdate() { List clientIds = clientMapper.findByrpayNotNull(); + StringBuffer sb = new StringBuffer(); clientIds.forEach(dbResult -> { - rpayApi.modifySurchargeConfig(dbResult); - + try { + rpayApi.modifySurchargeConfig(dbResult); + } catch (Exception e) { + sb.append("【" + dbResult.getString("client_moniker") + "】、"); + } }); + logger.info("test for update rpay clearing date,fail + " + sb.toString()); return "ok"; } } From f97047476e6db03707e4461b1691126ed71d75c6 Mon Sep 17 00:00:00 2001 From: luoyang Date: Fri, 28 Sep 2018 09:19:43 +0800 Subject: [PATCH 085/103] 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 086/103] =?UTF-8?q?=E9=87=8D=E7=BD=AEpine=E5=95=86?= =?UTF-8?q?=E6=88=B7=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 091/103] 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 dda02d8e317daa758e7d8d794b1a405855ef1845 Mon Sep 17 00:00:00 2001 From: luoyang Date: Sat, 29 Sep 2018 16:52:01 +0800 Subject: [PATCH 092/103] 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 093/103] =?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) + + + + --> - + From 7401a9e41445d5a55291581b14a3df16e89cfd6d Mon Sep 17 00:00:00 2001 From: hellolujian <1370256381@qq.com> Date: Sun, 30 Sep 2018 01:23:13 +0800 Subject: [PATCH 095/103] [fix] --- .../payment/manage/analysis/web/DashboardController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 a0000005a..87738f269 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 @@ -69,7 +69,8 @@ public class DashboardController { @RequestParam(defaultValue = "10") int limit) { JSONObject params = analysis.toParams(analysis.getTimezone()); orgManager.checkOrg(manager,params); - return dashboardService.getTopTradePartners(params, limit); + params.put("limit", limit); + return dashboardService.getTopTradePartners(params); } @ManagerMapping("/rank_trade_partners") From 447fea52e677628ad50cd134bc72001d78da0ed6 Mon Sep 17 00:00:00 2001 From: hellolujian <1370256381@qq.com> Date: Sun, 30 Sep 2018 01:30:46 +0800 Subject: [PATCH 096/103] [fix] --- .../manage/analysis/beans/AnalysisBean.java | 24 +++++++++---------- .../analysis/core/DashboardService.java | 2 +- .../core/impls/DashboardServiceImpl.java | 2 ++ 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/beans/AnalysisBean.java b/src/main/java/au/com/royalpay/payment/manage/analysis/beans/AnalysisBean.java index dc67aed73..65edd513b 100644 --- a/src/main/java/au/com/royalpay/payment/manage/analysis/beans/AnalysisBean.java +++ b/src/main/java/au/com/royalpay/payment/manage/analysis/beans/AnalysisBean.java @@ -62,7 +62,7 @@ public class AnalysisBean { if (bd_id != null){ params.put("bd_id",bd_id); } - if (org_id !=null){ + if (org_id != null){ params.put("org_id",org_id); } if (begin_month != null){ @@ -71,25 +71,25 @@ public class AnalysisBean { if (end_month != null){ params.put("end_month",end_month); } - if (customer_id!=null && !customer_id.isEmpty()){ - params.put("customer_id",customer_id.trim()); + if (customer_id != null && !customer_id.isEmpty()){ + params.put("customer_id", customer_id.trim()); } - if (rankType!=null){ - params.put("rankType",rankType); + if (rankType != null){ + params.put("rankType", rankType); } - if(channel!=null){ - params.put("channel",channel); + if(channel != null){ + params.put("channel", channel); } - if(bd_name!=null){ - params.put("bd_name",bd_name); + if(bd_name != null){ + params.put("bd_name", bd_name); } - if (client_moniker!=null){ + if (client_moniker != null){ params.put("client_moniker", client_moniker); } - if (amount_from!=null && amount_from.length()>0){ + if (amount_from != null && amount_from.length() > 0){ params.put("amount_from", new BigDecimal(amount_from)); } - if (amount_to!=null && amount_to.length()>0){ + if (amount_to != null && amount_to.length() > 0){ params.put("amount_to", new BigDecimal(amount_to)); } return params; diff --git a/src/main/java/au/com/royalpay/payment/manage/analysis/core/DashboardService.java b/src/main/java/au/com/royalpay/payment/manage/analysis/core/DashboardService.java index eb071d334..53202d7a1 100644 --- a/src/main/java/au/com/royalpay/payment/manage/analysis/core/DashboardService.java +++ b/src/main/java/au/com/royalpay/payment/manage/analysis/core/DashboardService.java @@ -22,7 +22,7 @@ public interface DashboardService { List getTradeInTypes(JSONObject params); - List getTopTradePartners(JSONObject params, int limit); + //List getTopTradePartners(JSONObject params, int limit); List getTopTradePartners(JSONObject params); 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 97ef7c216..5887c83ea 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 @@ -161,12 +161,14 @@ public class DashboardServiceImpl implements DashboardService,DashboardAnalysisT return transactionAnalysisMapper.getTradeAmountInTypes(params); } + /* @Override public List getTopTradePartners(JSONObject params, int limit) { params.put("rankType", "aud_fee"); params.put("limit", limit); return clientAnalysisMapper.listPartnersTradeAmount(params); } + */ @Override public List getTopTradePartners(JSONObject params) { From f0b17d85046e078f65c15b2bf5ae97c624200b41 Mon Sep 17 00:00:00 2001 From: hellolujian <1370256381@qq.com> Date: Sun, 30 Sep 2018 11:28:02 +0800 Subject: [PATCH 097/103] =?UTF-8?q?[fix]=E6=96=B0=E5=A2=9Etransaction=5Ffe?= =?UTF-8?q?e=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/partner_bankaccounts.html | 2 ++ .../partner/templates/partner_new_rate.html | 23 +++++++++++++++++ .../partner/templates/rate_config_dialog.html | 25 +++++++++++++++++++ 3 files changed, 50 insertions(+) diff --git a/src/main/ui/static/payment/partner/templates/partner_bankaccounts.html b/src/main/ui/static/payment/partner/templates/partner_bankaccounts.html index f1e00b160..b67d76a26 100644 --- a/src/main/ui/static/payment/partner/templates/partner_bankaccounts.html +++ b/src/main/ui/static/payment/partner/templates/partner_bankaccounts.html @@ -179,6 +179,7 @@
    + @@ -193,6 +194,7 @@ ng-class="{'text-bold':rate.current,'success':rate.active}"> + diff --git a/src/main/ui/static/payment/partner/templates/partner_new_rate.html b/src/main/ui/static/payment/partner/templates/partner_new_rate.html index fe0aa512f..98299cef6 100644 --- a/src/main/ui/static/payment/partner/templates/partner_new_rate.html +++ b/src/main/ui/static/payment/partner/templates/partner_new_rate.html @@ -160,6 +160,29 @@ + +
    + +
    +
    + +
    %
    +
    +
    +
    + No less than 0 +
    +
    + Required Field +
    +
    + +
    +
    + +
    diff --git a/src/main/ui/static/payment/partner/templates/rate_config_dialog.html b/src/main/ui/static/payment/partner/templates/rate_config_dialog.html index 421be18ab..d06a7eac6 100644 --- a/src/main/ui/static/payment/partner/templates/rate_config_dialog.html +++ b/src/main/ui/static/payment/partner/templates/rate_config_dialog.html @@ -35,6 +35,31 @@
    + +
    + +
    +
    + +
    %
    +
    +
    + + + +
    + No less than 0 +
    +
    + Required Field +
    +
    + +
    +
    +
    From d6fd5b06003b3706d7f6f3b3ef472b41def9919a Mon Sep 17 00:00:00 2001 From: luoyang Date: Sun, 30 Sep 2018 11:30:57 +0800 Subject: [PATCH 098/103] fix rpay+ merchant --- .../manage/mappers/system/SysRpayMerchantApplyMapper.java | 2 +- .../manage/merchants/core/impls/ClientManagerImpl.java | 7 +++++-- .../payment/partner/templates/sub_merchant_id_apply.html | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysRpayMerchantApplyMapper.java b/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysRpayMerchantApplyMapper.java index 898ac3661..23620f712 100644 --- a/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysRpayMerchantApplyMapper.java +++ b/src/main/java/au/com/royalpay/payment/manage/mappers/system/SysRpayMerchantApplyMapper.java @@ -21,6 +21,6 @@ public interface SysRpayMerchantApplyMapper { void insertRpayMerchantApply(JSONObject params); @AutoSql(type = SqlType.SELECT) - List listByShortName(@Param("client_id") int client_id,@Param("merchant_shortname") String shortName); + List listByShortName(@Param("merchant_shortname") String shortName); } 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 0bf26977a..e18ded9b0 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 @@ -3605,10 +3605,13 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid } checkOrgPermission(manager, client); - List listByshortName = sysRpayMerchantApplyMapper.listByShortName(client.getIntValue("client_id"),merchantInfo.getString("company_shortname")); + List listByshortName = sysRpayMerchantApplyMapper.listByShortName(merchantInfo.getString("company_shortname")); if (listByshortName.size()>0) { - throw new BadRequestException("请修改【" + clientMoniker + "】的Company shortName信息(请避免和Rpay+商务号列表内的Company Short Name重复)"); + throw new BadRequestException("请修改【" + clientMoniker + "】的Company shortName信息(Short Name 已被使用)"); + } + if (client.getString("rpay_enterprise_id") != null) { + throw new BadRequestException("您已申请成功子商务号,请勿重复申请"); } SubRpayMerchantInfo subRpayMerchantInfo = JSONObject.toJavaObject(merchantInfo, SubRpayMerchantInfo.class); diff --git a/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html b/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html index 66ebd8403..8deec83d1 100644 --- a/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html +++ b/src/main/ui/static/payment/partner/templates/sub_merchant_id_apply.html @@ -99,7 +99,7 @@ Rpay+ Sub Merchant Id : {{partner.rpay_enterprise_id}} -
    diff --git a/src/main/ui/static/payment/partner/templates/rate_config_dialog.html b/src/main/ui/static/payment/partner/templates/rate_config_dialog.html index d06a7eac6..d92b9ecf6 100644 --- a/src/main/ui/static/payment/partner/templates/rate_config_dialog.html +++ b/src/main/ui/static/payment/partner/templates/rate_config_dialog.html @@ -43,7 +43,7 @@
    -
    %
    +
    From 7fd4d515e07f7fc8ed024d50c1d1c1c515d23cea Mon Sep 17 00:00:00 2001 From: luoyang Date: Sun, 30 Sep 2018 17:46:26 +0800 Subject: [PATCH 103/103] =?UTF-8?q?=E6=9A=82=E6=97=B6=E5=85=B3=E9=97=ADcle?= =?UTF-8?q?aring=E8=87=AA=E5=8A=A8=E7=BB=AD=E7=BA=A6=E6=97=B6=E6=9B=B4?= =?UTF-8?q?=E6=96=B0Rpay+?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../payment/manage/merchants/core/impls/ClientManagerImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 e18ded9b0..15d9d6f59 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 @@ -4018,8 +4018,7 @@ public class ClientManagerImpl implements ClientManager, ManagerTodoNoticeProvid record.put("remark", "费率到期系统自动延期1年"); clientRateMapper.saveRate(record); if ("Rpay".equals(o.getString("rate_name"))) { - rpayApi.modifySurchargeConfig(clientMapper.findClient(client_id)); - + //rpayApi.modifySurchargeConfig(clientMapper.findClient(client_id)); } } clientModifySupport.processClientConfigModify(new SwitchPermissionModify(null, client.getString("client_moniker"), "tax_in_surcharge", false));
    Nick Name Customer openId Amount(AUD)
    + + + {{customer.nickname}} + + + + {{customer.nickname}} + + + + {{customer.nickname}} + + + + {{customer.nickname}} +
    Rate Name Rate ValueTransaction Fee Active Time Expire Time Clean Days T+{{rate.clean_days}}