From e598d77925643251334d1fa5ed9f79f33bfd43cb Mon Sep 17 00:00:00 2001 From: yuan <1551130722@qq.com> Date: Mon, 2 Jul 2018 14:39:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0hfindustry?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/db/modify.sql | 4 +- .../merchants/beans/ClientRegisterInfo.java | 9 + .../static/commons/filters/commonFilters.js | 34 ++ src/main/ui/static/data/hfindustry.json | 348 ++++++++++++++++++ .../static/payment/partner/partner-manage.js | 45 ++- .../partner/templates/add_partner.html | 16 +- .../templates/add_sub_partner_dialog.html | 18 +- .../templates/client_payment_info.html | 15 + .../partner/templates/partner_detail.html | 17 +- .../partner/templates/partner_edit.html | 16 +- 10 files changed, 506 insertions(+), 16 deletions(-) create mode 100644 src/main/ui/static/data/hfindustry.json diff --git a/src/db/modify.sql b/src/db/modify.sql index b106938b6..95209e9e8 100644 --- a/src/db/modify.sql +++ b/src/db/modify.sql @@ -602,4 +602,6 @@ CREATE TABLE `pre_apply_handle_log` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; ALTER TABLE `sys_client_pre_apply` -ADD COLUMN `status` tinyint(2) NULL DEFAULT 0 COMMENT '0:未处理,1:处理中,2:处理完成'; \ No newline at end of file +ADD COLUMN `status` tinyint(2) NULL DEFAULT 0 COMMENT '0:未处理,1:处理中,2:处理完成'; + +alter table sys_clients add column hfindustry varchar(10) DEFAULT NULL COMMENT 'HF行业'; \ No newline at end of file diff --git a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java index 8c0f45cd5..c7ab49079 100644 --- a/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java +++ b/src/main/java/au/com/royalpay/payment/manage/merchants/beans/ClientRegisterInfo.java @@ -63,6 +63,7 @@ public class ClientRegisterInfo { private String timezone; private String jdindustry; private String royalpayindustry; + private String hfindustry; private String referrer_id; private String referrer_name; @@ -367,4 +368,12 @@ public class ClientRegisterInfo { public void setMerchant_video_url(String merchant_video_url) { this.merchant_video_url = merchant_video_url; } + + public String getHfindustry() { + return hfindustry; + } + + public void setHfindustry(String hfindustry) { + this.hfindustry = hfindustry; + } } diff --git a/src/main/ui/static/commons/filters/commonFilters.js b/src/main/ui/static/commons/filters/commonFilters.js index 5b3ddbd2c..609130527 100644 --- a/src/main/ui/static/commons/filters/commonFilters.js +++ b/src/main/ui/static/commons/filters/commonFilters.js @@ -34,6 +34,17 @@ define(['../app', 'jquery'], function (app, $) { } }); + var hfindustry = []; + $.ajax({ + url: '/static/data/hfindustry.json', + method: 'GET', + async: false, + dataType: 'json', + success: function (data) { + hfindustry = data; + + } + }); app.filter('partner_state', ['stateMap', function (stateMap) { return function (stateValue) { @@ -106,6 +117,29 @@ define(['../app', 'jquery'], function (app, $) { } }]); + app.filter('partner_hf_industry', ['$http', function ($http) { + return function (industryCode) { + var industryLabel = ''; + angular.forEach(hfindustry, function (category) { + if (category.mccCode == industryCode) { + industryLabel = category.label; + } + angular.forEach(category.children, function (categoryChildren1) { + if (categoryChildren1.mccCode == industryCode) { + industryLabel = categoryChildren1.label; + } + angular.forEach(categoryChildren1.children, function (categoryChildren2) { + if (categoryChildren2.mccCode == industryCode) { + industryLabel = categoryChildren2.label; + } + }); + }); + }); + return industryLabel; + } + + }]); + app.filter('partner_royalpay_industry', ['$http', function ($http) { return function (industryCode) { var industryLabel = ''; diff --git a/src/main/ui/static/data/hfindustry.json b/src/main/ui/static/data/hfindustry.json new file mode 100644 index 000000000..cdc36eb95 --- /dev/null +++ b/src/main/ui/static/data/hfindustry.json @@ -0,0 +1,348 @@ +[ + { + "children": [ + { + "children": [], + "label": "护肤品", + "mccCode": "100003" + }, + { + "children": [], + "label": "洗发护发", + "mccCode": "100004" + }, + { + "children": [], + "label": "身体护理", + "mccCode": "100005" + }, + { + "children": [], + "label": "口腔护理", + "mccCode": "100006" + }, + { + "children": [], + "label": "包包", + "mccCode": "100007" + }, + { + "children": [], + "label": "女装", + "mccCode": "100008" + }, + { + "children": [], + "label": "男装", + "mccCode": "100009" + }, + { + "children": [], + "label": "童装", + "mccCode": "100010" + }, + { + "children": [], + "label": "内衣", + "mccCode": "100011" + }, + { + "children": [], + "label": "睡衣", + "mccCode": "100012" + }, + { + "children": [], + "label": "袜品", + "mccCode": "100013" + }, + { + "children": [], + "label": "配饰", + "mccCode": "100014" + } , + { + "children": [], + "label": "香水", + "mccCode": "100015" + } , + { + "children": [], + "label": "彩妆", + "mccCode": "100016" + } , + { + "children": [], + "label": "奶粉", + "mccCode": "100017" + } , + { + "children": [], + "label": "母婴营养保健", + "mccCode": "100018" + } , + { + "children": [], + "label": "婴儿辅食", + "mccCode": "100019" + } , + { + "children": [], + "label": "尿裤纸巾", + "mccCode": "100020" + } , + { + "children": [], + "label": "男鞋", + "mccCode": "100021" + } , + { + "children": [], + "label": "女鞋", + "mccCode": "100022" + } , + { + "children": [], + "label": "运动鞋", + "mccCode": "100023" + } , + { + "children": [], + "label": "户外鞋", + "mccCode": "100024" + } , + { + "children": [], + "label": "运动服", + "mccCode": "100025" + } , + { + "children": [], + "label": "休闲服装", + "mccCode": "100026" + } , + { + "children": [], + "label": "家纺/床品", + "mccCode": "100027" + } , + { + "children": [], + "label": "生活日用", + "mccCode": "100028" + } , + { + "children": [], + "label": "厨房电器", + "mccCode": "100029" + } , + { + "children": [], + "label": "家装软饰", + "mccCode": "100030" + } , + { + "children": [], + "label": "生活电器", + "mccCode": "100031" + } , + { + "children": [], + "label": "手机", + "mccCode": "100032" + } , + { + "children": [], + "label": "手机配件", + "mccCode": "100033" + } , + { + "children": [], + "label": "数码相机", + "mccCode": "100034" + } , + { + "children": [], + "label": "单反相机", + "mccCode": "100035" + } , + { + "children": [], + "label": "摄像机", + "mccCode": "100036" + } , + { + "children": [], + "label": "镜头", + "mccCode": "100037" + } , + { + "children": [], + "label": "耳机/耳麦", + "mccCode": "100038" + } , + { + "children": [], + "label": "音箱/音响", + "mccCode": "100039" + } , + { + "children": [], + "label": "数码配件", + "mccCode": "100040" + } , + { + "children": [], + "label": "智能手环", + "mccCode": "100041" + } , + { + "children": [], + "label": "影音娱乐", + "mccCode": "100042" + } , + { + "children": [], + "label": "笔记本", + "mccCode": "100043" + } , + { + "children": [], + "label": "进口食品", + "mccCode": "100044" + } , + { + "children": [], + "label": "休闲食品", + "mccCode": "100045" + } , + { + "children": [], + "label": "营养品", + "mccCode": "100046" + } , + { + "children": [], + "label": "地方特产", + "mccCode": "100047" + } + ], + "label": "实物类-网络购物", + "mccCode": "122030" + }, + { + "children": [ + { + "children": [], + "label": "游戏点卡", + "mccCode": "200003" + }, + { + "children": [], + "label": "游戏周边", + "mccCode": "200004" + }, + { + "children": [], + "label": "网页游戏", + "mccCode": "200005" + }, + { + "children": [], + "label": "手机游戏", + "mccCode": "200006" + }, + { + "children": [], + "label": "电脑杀毒软件", + "mccCode": "200007" + }, + { + "children": [], + "label": "电脑安装软件", + "mccCode": "200008" + }, + { + "children": [], + "label": "虚拟服务租赁", + "mccCode": "200009" + }, + { + "children": [], + "label": "物理服务器租赁", + "mccCode": "200010" + }, + { + "children": [], + "label": "国际线路租赁", + "mccCode": "200011" + }, + { + "children": [], + "label": "域名", + "mccCode": "200012" + }, + { + "children": [], + "label": "网页设计", + "mccCode": "200013" + }, + { + "children": [], + "label": "软件设计", + "mccCode": "200014" + } + ], + "label": "虚拟物品类-计算机服务", + "mccCode": "227020" + }, + { + "children": [ + { + "children": [], + "label": "留学学费", + "mccCode": "300003" + } + ], + "label": "教育类-留学及教育相关旅行(一年以上)", + "mccCode": "223022" + }, + { + "children": [ + { + "children": [], + "label": "出国夏令营费用", + "mccCode": "300004" + } + ], + "label": "教育类-留学及教育相关旅行(一年及一年以下)", + "mccCode": "223023" + }, + { + "children": [ + { + "children": [], + "label": "机票", + "mccCode": "400003" + } + ], + "label": "旅游类-空运客运", + "mccCode": "222024" + }, + { + "children": [ + { + "children": [], + "label": "酒店", + "mccCode": "400004" + }, + { + "children": [], + "label": "当地旅游费用", + "mccCode": "400005" + } + ], + "label": "旅游类-其他私人旅行", + "mccCode": "223029" + } +] \ No newline at end of file diff --git a/src/main/ui/static/payment/partner/partner-manage.js b/src/main/ui/static/payment/partner/partner-manage.js index e0b90af65..955138266 100644 --- a/src/main/ui/static/payment/partner/partner-manage.js +++ b/src/main/ui/static/payment/partner/partner-manage.js @@ -321,6 +321,13 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }; $scope.loadRoyalpayindustry(); + $scope.loadHfindustry = function () { + $http.get('/static/data/hfindustry.json').then(function (resp) { + $scope.hfindustry = resp.data; + }) + }; + $scope.loadHfindustry(); + $scope.onAlipayMccSelect = function (selectedItem) { $scope.partner.alipay_category = selectedItem.label; $scope.partner.alipayindustry = selectedItem.mccCode; @@ -331,6 +338,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.partner.royalpayindustry = selectedItem.mccCode; }; + $scope.onHfIndustrySelect = function (selectedItem) { + $scope.partner.hf_label = selectedItem.label; + $scope.partner.hfindustry = selectedItem.mccCode; + }; + // $scope.t2city_map = angular.copy(t2city_map); $scope.timezones = timezone.configs(); @@ -506,6 +518,12 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }; $scope.showFile(); $scope.passClient = function () { + if ($scope.partner.enable_hf) { + if($scope.partner.hfindustry == null){ + alert("已开启HF支付通道,HF行业不可为空!"); + return; + } + } if (!$rootScope.complianceCheck) { alert("please check first"); return; @@ -522,7 +540,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter alert("Bank Account not checked"); return; } - commonDialog.confirm({ + /* commonDialog.confirm({ title: 'Audit Partner', content: 'Are you sure to mark partner ' + $scope.partner.company_name + ' audited?' }).then(function () { @@ -545,7 +563,7 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }, function (resp) { commonDialog.alert({title: 'Error', content: resp.data.message, type: 'error'}); }) - }); + });*/ }; $scope.pass2GreenChannel = function () { commonDialog.confirm({ @@ -915,6 +933,13 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }; $scope.loadRoyalpayindustry(); + $scope.loadHfindustry = function () { + $http.get('/static/data/hfindustry.json').then(function (resp) { + $scope.hfindustry = resp.data; + }) + }; + $scope.loadHfindustry(); + $scope.onAlipayMccSelect = function (selectedItem) { $scope.partner.alipay_category = selectedItem.label; $scope.partner.alipayindustry = selectedItem.mccCode; @@ -923,6 +948,10 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.partner.royalpay_label = selectedItem.label; $scope.partner.royalpayindustry = selectedItem.mccCode; }; + $scope.onHfIndustrySelect = function (selectedItem) { + $scope.partner.hf_label = selectedItem.label; + $scope.partner.hfindustry = selectedItem.mccCode; + }; $scope.updatePartner = function (form) { @@ -1852,6 +1881,13 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter }; $scope.loadRoyalpayindustry(); + $scope.loadHfindustry = function () { + $http.get('/static/data/hfindustry.json').then(function (resp) { + $scope.hfindustry = resp.data; + }) + }; + $scope.loadHfindustry(); + $scope.onAlipayMccSelect = function (selectedItem) { $scope.partner.alipay_category = selectedItem.label; @@ -1862,6 +1898,11 @@ define(['angular', 'decimal', 'static/commons/commons', 'uiBootstrap', 'uiRouter $scope.partner.royalpayindustry = selectedItem.mccCode; }; + $scope.onHfIndustrySelect = function (selectedItem) { + $scope.partner.hf_label = selectedItem.label; + $scope.partner.hfindustry = selectedItem.mccCode; + }; + // $scope.t2city_map = angular.copy(t2city_map); $scope.timezones = timezone.configs(); diff --git a/src/main/ui/static/payment/partner/templates/add_partner.html b/src/main/ui/static/payment/partner/templates/add_partner.html index df9fa4b0f..7d48d93d0 100644 --- a/src/main/ui/static/payment/partner/templates/add_partner.html +++ b/src/main/ui/static/payment/partner/templates/add_partner.html @@ -819,9 +819,9 @@ -
-
- +
+ +
+ +
+
diff --git a/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html b/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html index 9976059e9..03a84cf08 100644 --- a/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html +++ b/src/main/ui/static/payment/partner/templates/add_sub_partner_dialog.html @@ -698,14 +698,14 @@ -
-
- +
+ +
+ +
+
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 a9b00fb40..61756b345 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 @@ -75,6 +75,21 @@
+
+
HF Pay Link +
+
+
+
+ +
+

+
+
+
+
+
+
Paying Surcharge
diff --git a/src/main/ui/static/payment/partner/templates/partner_detail.html b/src/main/ui/static/payment/partner/templates/partner_detail.html index 3fc473afc..3cb268a2f 100644 --- a/src/main/ui/static/payment/partner/templates/partner_detail.html +++ b/src/main/ui/static/payment/partner/templates/partner_detail.html @@ -706,20 +706,31 @@
+

{{partner.alipayindustry|partner_alipay_industry}} -    ({{partner.alipayindustry}}) +    ({{partner.alipayindustry}})

- - +
+ +
+

+ {{partner.hfindustry| partner_hf_industry}} +    ({{partner.hfindustry}}) +

+ +
+
+ diff --git a/src/main/ui/static/payment/partner/templates/partner_edit.html b/src/main/ui/static/payment/partner/templates/partner_edit.html index ace8a6272..7db1b3e29 100644 --- a/src/main/ui/static/payment/partner/templates/partner_edit.html +++ b/src/main/ui/static/payment/partner/templates/partner_edit.html @@ -608,9 +608,9 @@ -
-
- +
+ +
+ +
+