refactor: 将 paytype 改为 sourcetype
diff --git a/payapi/src/main/resources/data.sql b/payapi/src/main/resources/data.sql
index fdec8f7..b3ea34b 100644
--- a/payapi/src/main/resources/data.sql
+++ b/payapi/src/main/resources/data.sql
@@ -36,7 +36,7 @@
INSERT INTO "tb_function" ("id", "createtime", "isleaf", "lastsaved", "menuicon", "menuurl", "name", "ordernum", "parentid", tenantid)
VALUES (17, NULL, 1, NULL, 'layui-icon-util', '/param/apiclientpara', '应用参数配置', 3, 10, '{tenantid}');
INSERT INTO "tb_function" ("id", "createtime", "isleaf", "lastsaved", "menuicon", "menuurl", "name", "ordernum", "parentid", tenantid)
-VALUES (18, NULL, 1, NULL, 'layui-icon-util', '/param/paytype', '支付能力配置', 4, 10, '{tenantid}');
+VALUES (18, NULL, 1, NULL, 'layui-icon-util', '/param/sourceType', '支付能力配置', 4, 10, '{tenantid}');
INSERT INTO "tb_function" ("id", "createtime", "isleaf", "lastsaved", "menuicon", "menuurl", "name", "ordernum", "parentid", tenantid)
VALUES (19, NULL, 0, NULL, 'layui-icon-user', '#', '用户中心', 5, -1, '{tenantid}');
INSERT INTO "tb_function" ("id", "createtime", "isleaf", "lastsaved", "menuicon", "menuurl", "name", "ordernum", "parentid", tenantid)
@@ -183,21 +183,21 @@
INSERT INTO "tb_resource" ("id", "code", "function_id", "name", "uri", tenantid)
VALUES (40, '', 17, '新增', '/param/addapiclientpara', '{tenantid}');
INSERT INTO "tb_resource" ("id", "code", "function_id", "name", "uri", tenantid)
-VALUES (41, '', 18, '查询', '/param/paytype', '{tenantid}');
+VALUES (41, '', 18, '查询', '/param/sourceType', '{tenantid}');
INSERT INTO "tb_resource" ("id", "code", "function_id", "name", "uri", tenantid)
VALUES (42, '', 21, '查询', '/user/list', '{tenantid}');
INSERT INTO "tb_resource" ("id", "code", "function_id", "name", "uri", tenantid)
-VALUES (43, '', 18, '新增跳转', '/param/load4addpaytype', '{tenantid}');
+VALUES (43, '', 18, '新增跳转', '/param/load4addsourcetype', '{tenantid}');
INSERT INTO "tb_resource" ("id", "code", "function_id", "name", "uri", tenantid)
-VALUES (44, '', 18, '切换状态', '/param/updatepaytypestate', '{tenantid}');
+VALUES (44, '', 18, '切换状态', '/param/updatesourcetypestate', '{tenantid}');
INSERT INTO "tb_resource" ("id", "code", "function_id", "name", "uri", tenantid)
-VALUES (45, '', 18, '修改', '/param/updatepaytypename', '{tenantid}');
+VALUES (45, '', 18, '修改', '/param/updatesourcetypename', '{tenantid}');
INSERT INTO "tb_resource" ("id", "code", "function_id", "name", "uri", tenantid)
-VALUES (46, '', 18, '删除', '/param/deletepaytype', '{tenantid}');
+VALUES (46, '', 18, '删除', '/param/deletesourcetype', '{tenantid}');
INSERT INTO "tb_resource" ("id", "code", "function_id", "name", "uri", tenantid)
-VALUES (48, '', 18, '配置跳转', '/param/load4paytypeconfig', '{tenantid}');
+VALUES (48, '', 18, '配置跳转', '/param/load4sourcetypeconfig', '{tenantid}');
INSERT INTO "tb_resource" ("id", "code", "function_id", "name", "uri", tenantid)
-VALUES (49, '', 18, '配置参数', '/param/addpaytypeconfig', '{tenantid}');
+VALUES (49, '', 18, '配置参数', '/param/addsourcetypeconfig', '{tenantid}');
INSERT INTO "tb_resource" ("id", "code", "function_id", "name", "uri", tenantid)
VALUES (50, '', 22, '查询', '/user/account', '{tenantid}');
INSERT INTO "tb_resource" ("id", "code", "function_id", "name", "uri", tenantid)
@@ -221,17 +221,17 @@
INSERT INTO "tb_resource" ("id", "code", "function_id", "name", "uri", tenantid)
VALUES (63, '', 25, '商户树', '/shop/config', '{tenantid}');
INSERT INTO "tb_resource" ("id", "code", "function_id", "name", "uri", tenantid)
-VALUES (64, '', 25, '查询', '/shop/shoppaytypelist', '{tenantid}');
+VALUES (64, '', 25, '查询', '/shop/shopsourcetypelist', '{tenantid}');
INSERT INTO "tb_resource" ("id", "code", "function_id", "name", "uri", tenantid)
-VALUES (65, '', 25, '切换状态', '/shop/updatepaytypestat', '{tenantid}');
+VALUES (65, '', 25, '切换状态', '/shop/updatesourcetypestat', '{tenantid}');
INSERT INTO "tb_resource" ("id", "code", "function_id", "name", "uri", tenantid)
-VALUES (66, '', 25, '新增跳转', '/shop/load4addpaytype', '{tenantid}');
+VALUES (66, '', 25, '新增跳转', '/shop/load4addsourcetype', '{tenantid}');
INSERT INTO "tb_resource" ("id", "code", "function_id", "name", "uri", tenantid)
-VALUES (67, '', 25, '新增', '/shop/addshoppaytype', '{tenantid}');
+VALUES (67, '', 25, '新增', '/shop/addshopsourcetype', '{tenantid}');
INSERT INTO "tb_resource" ("id", "code", "function_id", "name", "uri", tenantid)
-VALUES (68, '', 25, '配置跳转', '/shop/load4paytypepara', '{tenantid}');
+VALUES (68, '', 25, '配置跳转', '/shop/load4sourcetypepara', '{tenantid}');
INSERT INTO "tb_resource" ("id", "code", "function_id", "name", "uri", tenantid)
-VALUES (69, '', 25, '配置', '/shop/addpaytypepara', '{tenantid}');
+VALUES (69, '', 25, '配置', '/shop/addsourcetypepara', '{tenantid}');
INSERT INTO "tb_resource" ("id", "code", "function_id", "name", "uri", tenantid)
VALUES (70, '', 27, '查询', '/dtl/userdtl', '{tenantid}');
INSERT INTO "tb_resource" ("id", "code", "function_id", "name", "uri", tenantid)
@@ -243,7 +243,7 @@
INSERT INTO "tb_resource" ("id", "code", "function_id", "name", "uri", tenantid)
VALUES (74, '', 31, '查询', '/report/shopbusiness', '{tenantid}');
INSERT INTO "tb_resource" ("id", "code", "function_id", "name", "uri", tenantid)
-VALUES (76, '', 18, '新增', '/param/addpaytype', '{tenantid}');
+VALUES (76, '', 18, '新增', '/param/addsourcetype', '{tenantid}');
INSERT INTO "tb_permission" ("id", "resid", "role_func_id", "roleid", tenantid)
VALUES ('ff8080816b7947ed016b795577300036', 16, NULL, 'd1yctWs5+ks0iQN3m9bUvRHus6HbKbrs', '{tenantid}');
@@ -373,117 +373,123 @@
VALUES ('ff8080816bbb130c016bbb6ea2f600b3', 26, NULL, 'd1yctWs5+ks0iQN3m9bUvRHus6HbKbrs', '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('1001', 1, 'y', 1, NULL, 20190430, 1, '库存现金', 1, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('1002', 1, 'y', 1, NULL, 20190430, 1, '银行存款', 1, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('1121', 1, 'n', 0, NULL, 20190430, 1, '应收票据', 1, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('112101', 1, 'n', 1, '1121', 20190430, 2, '支票', 1, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('112102', 1, 'n', 1, '1121', 20190430, 2, '经费本', 1, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('1122', 1, 'y', 0, NULL, 20190430, 1, '应收账款', 1, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('112201', 1, 'y', 1, '1122', 20190430, 2, '现金充值款', 1, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('112209', 1, 'y', 1, '1122', 20190617, 2, '其他第三方充值款', 1, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('112210', 1, 'y', 1, '1122', 20190430, 2, '支付宝充值款', 1, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('112211', 1, 'y', 1, '1122', 20190430, 2, '微信充值款', 1, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('112212', 1, 'n', 1, '1122', 20190430, 2, '银联充值款', 1, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('112213', 1, 'y', 1, '1122', 20190430, 2, '一卡通充值款', 1, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('112230', 1, 'y', 1, '1122', 20190430, 2, '支付宝支付款', 1, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('112231', 1, 'y', 1, '1122', 20190430, 2, '微信支付款', 1, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('112232', 1, 'n', 1, '1122', 20190430, 2, '银联支付款', 1, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('112233', 1, 'y', 1, '1122', 20190430, 2, '一卡通支付款', 1, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('112234', 1, 'y', 1, '1122', NULL, 2, '市民卡支付款', 1, '{tenantid}');
--负债
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('2001', 2, 'n', 1, NULL, 20190430, 1, '用户押金', 2, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('2004', 2, 'y', 1, NULL, 20190430, 1, '商户营业款', 2, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('2202', 2, 'y', 0, NULL, 20190430, 1, '应付账款', 2, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('220201', 2, 'y', 1, '2202', 20190430, 2, '个人存款', 2, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('220211', 2, 'n', 1, '2202', 20190430, 2, '销户退款', 2, '{tenantid}');
--损益
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('6021', 2, 'y', 0, NULL, 20190430, 1, '手续费收入', 6, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('602101', 2, 'y', 1, '6021', 20190430, 2, '支付宝充值手续费', 6, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('602102', 2, 'y', 1, '6021', 20190430, 2, '微信充值手续费', 6, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('602103', 2, 'n', 1, '6021', 20190430, 2, '银联充值手续费', 6, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('6601', 2, 'y', 0, NULL, 20190430, 1, '销售费用', 6, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('660101', 2, 'y', 1, '6601', 20190430, 2, '折扣优惠款', 6, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('660102', 2, 'y', 1, '6601', 20190430, 2, '积分抵扣款', 6, '{tenantid}');
-INSERT INTO "tb_subject" ("subjno", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
+INSERT INTO "tb_subject" ("subjid", "balflag", "displayflag", "endflag", "fsubjno", "opendate", "subjlevel", "subjname", "subjtype", "tenantid")
VALUES ('6602', 2, 'y', 1, NULL, 20190430, 1, '管理费收入', 6, '{tenantid}');
-INSERT INTO "tb_sourcetype" ("sourcetype", "checkable", "paydesc", "enable", "charge_enable", "consume_enable", "anonymous_enable", "reversable", "tenantid")
-VALUES ('citizenCard', 't', '大理市民卡', 't', 'f', 't', 'f', 't', '{tenantid}');
-INSERT INTO "tb_sourcetype" ("sourcetype", "checkable", "paydesc", "enable", "charge_enable", "consume_enable", "anonymous_enable", "reversable", "tenantid")
-VALUES ('balance', 'f', '账户余额', 't', 'f', 't', 'f', 't', '{tenantid}');
-INSERT INTO "tb_sourcetype" ("sourcetype", "checkable", "paydesc", "enable", "charge_enable", "consume_enable", "anonymous_enable", "reversable", "tenantid")
-VALUES ('thirdpart', 'f', '其他第三方支付', 't', 't', 'f', 'f', 'f', '{tenantid}');
-INSERT INTO "tb_sourcetype" ("sourcetype", "checkable", "paydesc", "enable", "charge_enable", "consume_enable", "anonymous_enable", "reversable", "tenantid")
-VALUES ('yktpay', 't', '一卡通支付', 't', 't', 't', 't', 't', '{tenantid}');
-INSERT INTO "tb_sourcetype" ("sourcetype", "checkable", "paydesc", "enable", "charge_enable", "consume_enable", "anonymous_enable", "reversable", "tenantid")
-VALUES ('alipay', 't', '支付宝', 't', 't', 't', 't', 'f', '{tenantid}');
-INSERT INTO "tb_sourcetype" ("sourcetype", "checkable", "paydesc", "enable", "charge_enable", "consume_enable", "anonymous_enable", "reversable", "tenantid")
-VALUES ('wechat', 't', '微信支付', 't', 't', 't', 't', 'f', '{tenantid}');
+INSERT INTO "tb_sourcetype" ("sourcetype_id", "sourceType", "checkable", "paydesc", "enable", "charge_enable",
+"consume_enable", "anonymous_enable", "reversable", "tenantid")
+VALUES ('D3820D49DACA49199E36537F6719665F', 'citizenCard', 't', '大理市民卡', 't', 'f', 't', 'f', 't', '{tenantid}');
+INSERT INTO "tb_sourcetype" ("sourcetype_id", "sourceType", "checkable", "paydesc", "enable", "charge_enable",
+"consume_enable", "anonymous_enable", "reversable", "tenantid")
+VALUES ('0997477F40904AD1A2E37FD15345CE00', 'balance', 'f', '账户余额', 't', 'f', 't', 'f', 't', '{tenantid}');
+INSERT INTO "tb_sourcetype" ("sourcetype_id", "sourceType", "checkable", "paydesc", "enable", "charge_enable",
+"consume_enable", "anonymous_enable", "reversable", "tenantid")
+VALUES ('F0CA47ADC0F24DFCA0D95DF4136CC2D0', 'thirdpart', 'f', '其他第三方支付', 't', 't', 'f', 'f', 'f', '{tenantid}');
+INSERT INTO "tb_sourcetype" ("sourcetype_id", "sourceType", "checkable", "paydesc", "enable", "charge_enable",
+"consume_enable", "anonymous_enable", "reversable", "tenantid")
+VALUES ('F5B344726FA24BD896E70DEE3D3F46CA', 'yktpay', 't', '一卡通支付', 't', 't', 't', 't', 't', '{tenantid}');
+INSERT INTO "tb_sourcetype" ("sourcetype_id", "sourceType", "checkable", "paydesc", "enable", "charge_enable",
+"consume_enable", "anonymous_enable", "reversable", "tenantid")
+VALUES ('28EE54CD3B044CC197D6C5B0E309F8B8', 'alipay', 't', '支付宝', 't', 't', 't', 't', 'f', '{tenantid}');
+INSERT INTO "tb_sourcetype" ("sourcetype_id", "sourceType", "checkable", "paydesc", "enable", "charge_enable",
+"consume_enable", "anonymous_enable", "reversable", "tenantid")
+VALUES ('DAEF88B54B684347B2B83940C38C7671', 'wechat', 't', '微信支付', 't', 't', 't', 't', 'f', '{tenantid}');
-- 支付方式
-INSERT INTO TB_PAYTYPE_CONFIG (PAYTYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
-VALUES ('yktpay','appid',null,'100005', 't', '{tenantid}');
-INSERT INTO TB_PAYTYPE_CONFIG (PAYTYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
-VALUES ('yktpay','appkey',null,'adc4ac6822fd462780f878b86cb94688', 't', '{tenantid}');
-INSERT INTO TB_PAYTYPE_CONFIG (PAYTYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
-VALUES ('yktpay','orderurl',null,'http://172.28.201.101:9116/epayapi/services/thirdparty/common/pay', 't', '{tenantid}');
-INSERT INTO TB_PAYTYPE_CONFIG (PAYTYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
-VALUES ('yktpay','reverseurl',null,'http://172.28.201.101:9116/epayapi/services/thirdparty/common/payreverse', 't', '{tenantid}');
-INSERT INTO TB_PAYTYPE_CONFIG (PAYTYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
-VALUES ('alipay', 'alipay.gateway', '支付宝网关地址', 'https://openapi.alipay.com/gateway.do', 't', '{tenantid}');
-INSERT INTO TB_PAYTYPE_CONFIG (PAYTYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
-VALUES ('alipay', 'enable.paymethod', '支付渠道', 'balance,moneyFund,debitCardExpress,bankPay,pcredit', 'f', '{tenantid}');
-INSERT INTO TB_PAYTYPE_CONFIG (PAYTYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
-VALUES ('alipay', 'notify.url', '异步通知地址', 'http://ykt.supwisdom.com:9116/epay/zfb/newnotify', 't', '{tenantid}');
-INSERT INTO TB_PAYTYPE_CONFIG (PAYTYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
-VALUES ('alipay', 'timeout.express', '支付超时时间', '5m', 't', '{tenantid}');
-INSERT INTO TB_PAYTYPE_CONFIG (PAYTYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
-VALUES ('alipay', 'alipay.public.key', '支付宝商户应用的支付宝公钥', NULL, 'f', '{tenantid}');
-INSERT INTO TB_PAYTYPE_CONFIG (PAYTYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
-VALUES ('alipay', 'alipay.rsa.private.key', '支付宝商户应用RSA私钥', NULL, 'f', '{tenantid}');
-INSERT INTO TB_PAYTYPE_CONFIG (PAYTYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
-VALUES ('alipay', 'alipay.rsa.public.key', '支付宝商户应用RSA公钥', NULL, 'f', '{tenantid}');
-INSERT INTO TB_PAYTYPE_CONFIG (PAYTYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
-VALUES ('alipay', 'appid', '支付宝应用APPID', NULL, 'f', '{tenantid}');
-INSERT INTO TB_PAYTYPE_CONFIG (PAYTYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
-VALUES ('citizenCard', 'socket.ip', 'socket的IP', NULL, 't', '{tenantid}');
-INSERT INTO TB_PAYTYPE_CONFIG (PAYTYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
-VALUES ('citizenCard', 'socket.port', 'socket的端口', NULL, 't', '{tenantid}');
-INSERT INTO TB_PAYTYPE_CONFIG (PAYTYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
-VALUES ('citizenCard', 'bankcardno', '商户银行卡号', NULL, 'f', '{tenantid}');
-INSERT INTO TB_PAYTYPE_CONFIG (PAYTYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
-VALUES ('citizenCard', 'bankaccname', '银行开户名', NULL, 'f', '{tenantid}');
+INSERT INTO TB_SOURCETYPE_CONFIG (ID, SOURCETYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
+VALUES ('1', 'yktpay','appid','模板','100005', 't', '{tenantid}');
+INSERT INTO TB_SOURCETYPE_CONFIG (ID, SOURCETYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
+VALUES ('2', 'yktpay','appkey','模板','adc4ac6822fd462780f878b86cb94688', 't', '{tenantid}');
+INSERT INTO TB_SOURCETYPE_CONFIG (ID, SOURCETYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
+VALUES ('3', 'yktpay','orderurl','模板','http://172.28.201.101:9116/epayapi/services/thirdparty/common/pay', 't', '{tenantid}');
+INSERT INTO TB_SOURCETYPE_CONFIG (ID, SOURCETYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
+VALUES ('4', 'yktpay','reverseurl','模板','http://172.28.201.101:9116/epayapi/services/thirdparty/common/payreverse', 't', '{tenantid}');
+INSERT INTO TB_SOURCETYPE_CONFIG (ID, SOURCETYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
+VALUES ('5', 'alipay', 'alipay.gateway', '支付宝网关地址', 'https://openapi.alipay.com/gateway.do', 't', '{tenantid}');
+INSERT INTO TB_SOURCETYPE_CONFIG (ID, SOURCETYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
+VALUES ('6', 'alipay', 'enable.paymethod', '支付渠道', 'balance,moneyFund,debitCardExpress,bankPay,pcredit', 'f', '{tenantid}');
+INSERT INTO TB_SOURCETYPE_CONFIG (ID, SOURCETYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
+VALUES ('7', 'alipay', 'notify.url', '异步通知地址', 'http://ykt.supwisdom.com:9116/epay/zfb/newnotify', 't', '{tenantid}');
+INSERT INTO TB_SOURCETYPE_CONFIG (ID, SOURCETYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
+VALUES ('8', 'alipay', 'timeout.express', '支付超时时间', '5m', 't', '{tenantid}');
+INSERT INTO TB_SOURCETYPE_CONFIG (ID, SOURCETYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
+VALUES ('9', 'alipay', 'alipay.public.key', '支付宝商户应用的支付宝公钥', NULL, 'f', '{tenantid}');
+INSERT INTO TB_SOURCETYPE_CONFIG (ID, SOURCETYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
+VALUES ('10', 'alipay', 'alipay.rsa.private.key', '支付宝商户应用RSA私钥', NULL, 'f', '{tenantid}');
+INSERT INTO TB_SOURCETYPE_CONFIG (ID, SOURCETYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
+VALUES ('11', 'alipay', 'alipay.rsa.public.key', '支付宝商户应用RSA公钥', NULL, 'f', '{tenantid}');
+INSERT INTO TB_SOURCETYPE_CONFIG (ID, SOURCETYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
+VALUES ('12', 'alipay', 'appid', '支付宝应用APPID', NULL, 'f', '{tenantid}');
+INSERT INTO TB_SOURCETYPE_CONFIG (ID, SOURCETYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
+VALUES ('13', 'citizenCard', 'socket.ip', 'socket的IP', NULL, 't', '{tenantid}');
+INSERT INTO TB_SOURCETYPE_CONFIG (ID, SOURCETYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
+VALUES ('14', 'citizenCard', 'socket.port', 'socket的端口', NULL, 't', '{tenantid}');
+INSERT INTO TB_SOURCETYPE_CONFIG (ID, SOURCETYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
+VALUES ('15', 'citizenCard', 'bankcardno', '商户银行卡号', NULL, 'f', '{tenantid}');
+INSERT INTO TB_SOURCETYPE_CONFIG (ID, SOURCETYPE,CONFIGID,CONFIG_NAME,CONFIG_VALUE,GLOBALFLAG, "tenantid")
+VALUES ('16', 'citizenCard', 'bankaccname', '银行开户名', NULL, 'f', '{tenantid}');
INSERT INTO "tb_syspara" ("paraid", "displayflag", "editflag", "lastsaved", "paraname", "paraunit", "paraval", "remark", "valuetype", "tenantid")
VALUES (1, 'yes', 1, '20190514165658', '账户最大余额默认值', '元', '10001', '账户开户时的默认账户最大余额', 'amount', '{tenantid}');
diff --git a/payapi/src/main/resources/templates/system/dtl/shopdtl.html b/payapi/src/main/resources/templates/system/dtl/shopdtl.html
index a83361b..ecebe4e 100644
--- a/payapi/src/main/resources/templates/system/dtl/shopdtl.html
+++ b/payapi/src/main/resources/templates/system/dtl/shopdtl.html
@@ -27,7 +27,7 @@
<div class="layui-inline">
<label class="layui-form-label">支付方式</label>
<div class="layui-input-block" style="height: 38px;">
- <select name="sourcetype" id="shopdtl-search-sourcetype" class="layui-select">
+ <select name="sourceType" id="shopdtl-search-sourceType" class="layui-select">
<option value=""> 全部</option>
<option th:each="pt:${paytypelist}" th:value="${pt.sourceType}"
th:text="${pt.paydesc}"></option>
@@ -184,7 +184,7 @@
endTransdate: $("#shopdtl-search-endTransdate").val(),
personname: $("#shopdtl-search-personname").val(),
shopaccno: $("#shopdtl-search-shopaccno").val(),
- sourcetype: $("#shopdtl-search-sourcetype").val(),
+ sourceType: $("#shopdtl-search-sourceType").val(),
tradeflag: $("#shopdtl-search-tradeflag").val(),
transcode: $("#shopdtl-search-transcode").val(),
transStatus: $("#shopdtl-search-transStatus").val()
@@ -200,7 +200,7 @@
"endTransdate": "",
"shopname": "",
"shopaccno": "",
- "sourcetype": "",
+ "sourceType": "",
"tradeflag": "",
"transcode": "",
"transStatus": ""
diff --git a/payapi/src/main/resources/templates/system/dtl/userdtl.html b/payapi/src/main/resources/templates/system/dtl/userdtl.html
index ead6ab2..85c7665 100644
--- a/payapi/src/main/resources/templates/system/dtl/userdtl.html
+++ b/payapi/src/main/resources/templates/system/dtl/userdtl.html
@@ -35,7 +35,7 @@
<div class="layui-inline">
<label class="layui-form-label">支付方式</label>
<div class="layui-input-block" style="height: 38px;">
- <select name="sourcetype" id="userdtl-search-sourcetype" class="layui-select">
+ <select name="sourceType" id="userdtl-search-sourceType" class="layui-select">
<option value=""> 全部</option>
<option th:each="pt:${paytypelist}" th:value="${pt.sourceType}"
th:text="${pt.paydesc}"></option>
@@ -148,7 +148,7 @@
endTransdate: $("#userdtl-search-endTransdate").val(),
personname: $("#userdtl-search-personname").val(),
cardno: $("#userdtl-search-cardno").val(),
- sourcetype: $("#userdtl-search-sourcetype").val(),
+ sourceType: $("#userdtl-search-sourceType").val(),
tradeflag: $("#userdtl-search-tradeflag").val(),
transcode: $("#userdtl-search-transcode").val(),
transStatus: $("#userdtl-search-transStatus").val()
@@ -164,7 +164,7 @@
"endTransdate": "",
"personname": "",
"cardno": "",
- "sourcetype": "",
+ "sourceType": "",
"tradeflag": "",
"transcode": "",
"transStatus": ""
diff --git a/payapi/src/main/resources/templates/system/param/paytype.html b/payapi/src/main/resources/templates/system/param/sourcetype.html
similarity index 86%
rename from payapi/src/main/resources/templates/system/param/paytype.html
rename to payapi/src/main/resources/templates/system/param/sourcetype.html
index 8c5d102..a288eea 100644
--- a/payapi/src/main/resources/templates/system/param/paytype.html
+++ b/payapi/src/main/resources/templates/system/param/sourcetype.html
@@ -18,7 +18,7 @@
<button id="btn-reset-param" class="layui-btn layui-btn-primary" data-type="reset"><i class="layui-icon"></i>清 空
</button>
</div>
- <table class="layui-table" id="paytypeTable" lay-filter="paytypeTable-filter"></table>
+ <table class="layui-table" id="sourcetypeTable" lay-filter="sourcetypeTable-filter"></table>
</div>
</div>
@@ -86,8 +86,8 @@
var admin = layui.admin;
// 渲染表格
table.render({
- elem: '#paytypeTable',
- url: '[[@{/param/paytypelist}]]',
+ elem: '#sourcetypeTable',
+ url: '[[@{/param/sourcetypelist}]]',
page: true,
cols: [
[
@@ -131,7 +131,7 @@
},
{
align: 'center', title: '操作', width: 150, fixed: 'right', templet: function (item) {
- if (item.sourceType != 'balance') {
+ if (item.sourceType !== 'balance') {
return '<a class="layui-btn layui-btn-xs" lay-event="config">配置</a> <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>';
}
return '';
@@ -143,15 +143,15 @@
// 搜索按钮点击事件
$('#btn-search-param').click(function () {
var sourceType = $("#search-global-sourceType").val();
- table.reload('paytypeTable', {where: {paytype: sourceType}, page: {curr: 1}});
+ table.reload('sourcetypeTable', {where: {sourceType: sourceType}, page: {curr: 1}});
});
$('#btn-add-param').click(function () {
admin.popupCenter({
title: "新增支付能力",
- path: '[[@{/param/load4addpaytype}]]',
+ path: '[[@{/param/load4addsourcetype}]]',
finish: function () {
- table.reload('paytypeTable');
+ table.reload('sourcetypeTable');
}
});
});
@@ -163,19 +163,18 @@
// 修改总状态
form.on('switch(enable-tpl-state)', function (obj) {
var token = $("meta[name='_csrf_token']").attr("value");
- admin.go('[[@{/param/updatepaytypestate}]]', {
- paytype: obj.elem.value,
+ admin.go('[[@{/param/updatesourcetypestate}]]', {
+ sourceType: obj.elem.value,
state: obj.elem.checked,
_csrf: token
}, function (data) {
- if (data.code == 200) {
+ if (data.code === 200) {
layer.msg(data.msg, {icon: 1, time:1000});
- table.reload('paytypeTable');
- } else if (data.code == 401) {
+ table.reload('sourcetypeTable');
+ } else if (data.code === 401) {
layer.msg(data.msg, {icon: 2, time: 1500}, function () {
location.replace('[[@{/login}]]');
}, 1000);
- return;
} else {
layer.msg(data.msg, {icon: 2});
$(obj.elem).prop('checked', !obj.elem.checked);
@@ -215,19 +214,18 @@
function updatePaytypeState(obj, optype, token) {
- admin.go('[[@{/param/updatepaytypestate}]]', {
- paytype: obj.elem.value,
+ admin.go('[[@{/param/updatesourcetypestate}]]', {
+ sourceType: obj.elem.value,
state: obj.elem.checked,
optype: optype,
_csrf: token
}, function (data) {
- if (data.code == 200) {
+ if (data.code === 200) {
layer.msg(data.msg, {icon: 1, time: 1000});
- } else if (data.code == 401) {
+ } else if (data.code === 401) {
layer.msg(data.msg, {icon: 2, time: 1500}, function () {
location.replace('[[@{/login}]]');
}, 1000);
- return;
} else {
layer.msg(data.msg, {icon: 2});
$(obj.elem).prop('checked', !obj.elem.checked);
@@ -240,46 +238,45 @@
});
}
- table.on('edit(paytypeTable-filter)', function (obj) {
+ table.on('edit(sourcetypeTable-filter)', function (obj) {
var row = obj.data; //得到所在行所有键值
var newval = obj.value; //得到修改后的值
- admin.go('[[@{/param/updatepaytypename}]]', {
- paytype: row.sourceType,
+ admin.go('[[@{/param/updatesourcetypename}]]', {
+ sourceType: row.sourceType,
paydesc: newval,
- _csrf: $("meta[name='_csrf_token']").attr("value"),
+ _csrf: $("meta[name='_csrf_token']").attr("value")
}, function (data) {
- if (data.code == 200) {
+ if (data.code === 200) {
layer.msg("修改成功", {icon: 1, time: 1000});
- } else if (data.code == 401) {
+ } else if (data.code === 401) {
layer.msg(data.msg, {icon: 2, time: 1500}, function () {
location.replace('[[@{/login}]]');
}, 1000);
- return;
} else {
layer.msg(data.msg, {icon: 2});
- table.reload('paytypeTable');
+ table.reload('sourcetypeTable');
}
},function () {
layer.msg('修改失败了,请稍后再试', {icon: 2});
- table.reload('paytypeTable');
+ table.reload('sourcetypeTable');
});
})
//监听单元格
- table.on('tool(paytypeTable-filter)', function (obj) {
+ table.on('tool(sourcetypeTable-filter)', function (obj) {
var data = obj.data;
- if('del' == obj.event){
+ if('del' === obj.event){
if (confirm("确定要删除支付方式[" + data.sourceType + "_" + data.paydesc + "]吗?")) {
layer.load(2);
- admin.go('[[@{/param/deletepaytype}]]', {
- paytype: data.sourceType,
+ admin.go('[[@{/param/deletesourcetype}]]', {
+ sourceType: data.sourceType,
_csrf: $("meta[name='_csrf_token']").attr("value")
}, function (data) {
console.log(data.code);
layer.closeAll('loading');
- if (data.code == 200) {
+ if (data.code === 200) {
layer.msg(data.msg, {icon: 1, time: 1000});
- } else if (data.code == 401) {
+ } else if (data.code === 401) {
layer.msg(data.msg, {icon: 2, time: 1500}, function () {
location.replace('[[@{/login}]]');
}, 1000);
@@ -287,20 +284,20 @@
} else {
layer.msg(data.msg, {icon: 2});
}
- table.reload('paytypeTable');
+ table.reload('sourcetypeTable');
}, function (ret) {
console.log(ret);
layer.closeAll('loading');
layer.msg('请求失败了,请稍后再试', {icon: 2});
});
}
- }else if('config' ==obj.event){
+ }else if('config' ===obj.event){
admin.popupCenter({
title: "配置参数【" + data.sourceType + "_" + data.paydesc + "】",
- path: '[[@{/param/load4paytypeconfig}]]?paytype='+data.sourceType,
+ path: '[[@{/param/load4sourcetypeconfig}]]?sourceType='+data.sourceType,
area: '800px',
finish: function () {
- table.reload('paytypeTable');
+ table.reload('sourcetypeTable');
}
});
}
diff --git a/payapi/src/main/resources/templates/system/param/paytypeconfig.html b/payapi/src/main/resources/templates/system/param/sourcetypeconfig.html
similarity index 85%
rename from payapi/src/main/resources/templates/system/param/paytypeconfig.html
rename to payapi/src/main/resources/templates/system/param/sourcetypeconfig.html
index ad6c9cf..502a3be 100644
--- a/payapi/src/main/resources/templates/system/param/paytypeconfig.html
+++ b/payapi/src/main/resources/templates/system/param/sourcetypeconfig.html
@@ -1,6 +1,6 @@
<form id="sourceType-config-form" lay-filter="sourceType-config-form" class="layui-form model-form">
<div class="layui-form-item" style="display: none;">
- <input type="hidden" class="layui-input" id="hid_paytype" th:value="${paytype}"/>
+ <input type="hidden" class="layui-input" id="hid_sourcetype" th:value="${sourceType}"/>
</div>
<div class="layui-form-item" style="text-align: center;" th:if="${configlist.size()} le 0">
@@ -32,35 +32,34 @@
form.on('submit(form-submit)', function (data) {
layer.load(2);
var vdata = data.field;
- if(JSON.stringify(vdata)=="{}"){
+ if(JSON.stringify(vdata)==="{}"){
layer.closeAll('loading');
admin.closePopupCenter();
return; //无配置项,直接关闭
}
var token=$("meta[name='_csrf_token']").attr("value");
- vdata["hid_paytype"] = $("#hid_paytype").val();
- console.log('addpaytype:',vdata);
+ vdata["hid_sourcetype"] = $("#hid_sourcetype").val();
+ console.log('addsourcetype:',vdata);
debugger
$.ajax({
type : "POST",
dataType : "json",
- url : '[[@{/param/addpaytypeconfig}]]',
+ url : '[[@{/param/addsourcetypeconfig}]]',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
- 'X-CSRF-TOKEN':token,
+ 'X-CSRF-TOKEN':token
},
data : JSON.stringify(vdata),
success : function(result) {
layer.closeAll('loading');
- if (result.code == 200) {
+ if (result.code === 200) {
layer.msg(result.msg, {icon: 1});
admin.finishPopupCenter();
- } else if (result.code == 401) {
+ } else if (result.code === 401) {
layer.msg(result.msg, {icon: 2, time: 1500}, function () {
location.replace('[[@{/login}]]');
}, 1000);
- return;
} else {
console.log('err:' + result.code);
layer.msg(result.msg, {icon: 2});
diff --git a/payapi/src/main/resources/templates/system/param/paytypeform.html b/payapi/src/main/resources/templates/system/param/sourcetypeform.html
similarity index 75%
rename from payapi/src/main/resources/templates/system/param/paytypeform.html
rename to payapi/src/main/resources/templates/system/param/sourcetypeform.html
index 1ec0c3d..f3650db 100644
--- a/payapi/src/main/resources/templates/system/param/paytypeform.html
+++ b/payapi/src/main/resources/templates/system/param/sourcetypeform.html
@@ -2,7 +2,7 @@
<div class="layui-form-item">
<label class="layui-form-label">支付方式</label>
<div class="layui-input-block">
- <input name="paytype" placeholder="请输入支付方式代码" type="text" class="layui-input" maxlength="20"
+ <input name="sourceType" placeholder="请输入支付方式代码" type="text" class="layui-input" maxlength="20"
lay-verify="required|sourceType" required/>
</div>
</div>
@@ -16,48 +16,54 @@
<div class="layui-form-item">
<label class="layui-form-label">状态</label>
<div class="layui-input-block">
- <input name="enable" type="checkbox" lay-skin="switch" lay-text="启用|关闭" value="yes" lay-verify="required" checked/>
+ <input name="enable" type="checkbox" lay-skin="switch" lay-text="启用|关闭" value="yes"
+ lay-verify="required" checked/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">能否充值</label>
<div class="layui-input-block">
- <input name="chargeEnable" type="checkbox" lay-skin="switch" lay-text="启用|关闭" value="yes" lay-verify="required" checked/>
+ <input name="chargeEnable" type="checkbox" lay-skin="switch" lay-text="启用|关闭" value="yes"
+ lay-verify="required" checked/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">能否消费</label>
<div class="layui-input-block">
- <input name="consumeEnable" type="checkbox" lay-skin="switch" lay-text="启用|关闭" value="yes" lay-verify="required" checked/>
+ <input name="consumeEnable" type="checkbox" lay-skin="switch" lay-text="启用|关闭" value="yes"
+ lay-verify="required" checked/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">匿名消费</label>
<div class="layui-input-block">
- <input name="anonymousEnable" type="checkbox" lay-skin="switch" lay-text="启用|关闭" value="yes" lay-verify="required" checked/>
+ <input name="anonymousEnable" type="checkbox" lay-skin="switch" lay-text="启用|关闭" value="yes"
+ lay-verify="required" checked/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">能否冲正</label>
<div class="layui-input-block">
- <input name="reversable" type="checkbox" lay-skin="switch" lay-text="启用|关闭" value="yes" lay-verify="required" checked/>
+ <input name="reversable" type="checkbox" lay-skin="switch" lay-text="启用|关闭" value="yes"
+ lay-verify="required" checked/>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">是否清算</label>
<div class="layui-input-block">
- <input name="checkable" type="checkbox" lay-skin="switch" lay-text="启用|关闭" value="yes" lay-verify="required" checked/>
+ <input name="checkable" type="checkbox" lay-skin="switch" lay-text="启用|关闭" value="yes"
+ lay-verify="required" checked/>
</div>
</div>
<div class="layui-form-item model-form-footer">
<button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button>
- <button class="layui-btn" lay-filter="form-submit" lay-submit id="submitbtn">保存</button>
+ <button class="layui-btn" lay-filter="form-submit" lay-submit id="submitbtn">保存</button>
</div>
</form>
@@ -73,13 +79,13 @@
var msg = "";
$.ajax({
type: "GET",
- url: '[[@{/param/checkpaytype}]]',
+ url: '[[@{/param/checksourcetype}]]',
async: false,
data: {
- paytype: e
+ sourceType: e
},
success: function (result) {
- if (result.code != 200) {
+ if (result.code !== 200) {
msg = result.msg;
}
},
@@ -87,7 +93,7 @@
msg = "请求服务器校验支付方式失败";
}
});
- if (msg != "") {
+ if (msg !== "") {
return msg;
}
}
@@ -99,26 +105,25 @@
var vdata = data.field;
vdata["_csrf"] = $("meta[name='_csrf_token']").attr("value");
$.ajax({
- type : "POST",
- dataType : "json",
- url : '[[@{/param/addpaytype}]]',
- data : vdata,
- success : function(result) {
+ type: "POST",
+ dataType: "json",
+ url: '[[@{/param/addsourcetype}]]',
+ data: vdata,
+ success: function (result) {
layer.closeAll('loading');
- if (result.code == 200) {
+ if (result.code === 200) {
layer.msg(result.msg, {icon: 1});
admin.finishPopupCenter();
- } else if (result.code == 401) {
+ } else if (result.code === 401) {
layer.msg(result.msg, {icon: 2, time: 1500}, function () {
location.replace('[[@{/login}]]');
}, 1000);
- return;
} else {
console.log('err:' + result.code);
layer.msg(result.msg, {icon: 2});
}
},
- error : function(err){
+ error: function (err) {
admin.errorBack(err);
}
});
diff --git a/payapi/src/main/resources/templates/system/report/subjectday.html b/payapi/src/main/resources/templates/system/report/subjectday.html
index 41cdf17..bcff987 100644
--- a/payapi/src/main/resources/templates/system/report/subjectday.html
+++ b/payapi/src/main/resources/templates/system/report/subjectday.html
@@ -78,7 +78,7 @@
title: '科目汇总表',
treeColIndex: 0,
treeSpid: '-1',
- treeIdName: 'subjno',
+ treeIdName: 'subjid',
treePidName: 'fsubjno',
treeDefaultClose: false,
treeLinkage: false,
@@ -90,7 +90,7 @@
toolbar:'#subjectday-toolbar',
cols: [
[
- {field: 'subjno', title: '科目号', align: 'left', rowspan: 2},
+ {field: 'subjid', title: '科目号', align: 'left', rowspan: 2},
{
field: 'subjname', title: '科目名称', align: 'left', rowspan: 2, templet: function (d) {
if (d.subjlevel == 1) {
@@ -115,7 +115,7 @@
],
// cols: [
// [
- // {field: 'subjno', title: '科目号', align: 'left'},
+ // {field: 'subjid', title: '科目号', align: 'left'},
// {
// field: 'subjname', title: '科目名称', align: 'left', templet: function (d) {
// if (d.subjlevel == 1) {
diff --git a/payapi/src/main/resources/templates/system/report/subjectdetail.html b/payapi/src/main/resources/templates/system/report/subjectdetail.html
index 7776301..b8956f2 100644
--- a/payapi/src/main/resources/templates/system/report/subjectdetail.html
+++ b/payapi/src/main/resources/templates/system/report/subjectdetail.html
@@ -26,7 +26,7 @@
<div class="layui-inline">
<label class="layui-form-label">选择科目</label>
<div class="layui-input-block">
- <input type="text" name="subjno" id="subjectdetail-search-subjno" placeholder="选择科目" lay-filter="subjectdetail-search-subjno-filter"
+ <input type="text" name="subjid" id="subjectdetail-search-subjid" placeholder="选择科目" lay-filter="subjectdetail-search-subjid-filter"
autocomplete="off" class="layui-input"/>
</div>
</div>
@@ -70,7 +70,7 @@
});
treeSelect.render({
- elem: '#subjectdetail-search-subjno',
+ elem: '#subjectdetail-search-subjid',
data: '[[@{/report/subjectselecttree}]]',
type: 'get',
placeholder: '选择科目',
@@ -89,8 +89,8 @@
console.log(treeNode);
if(treeNode.accno == '0'){
layer.msg("请选择末级科目", {icon: 2, time:1500});
- $("#subjectdetail-search-subjno").val("");
- treeSelect.revokeNode('subjectdetail-search-subjno-filter');
+ $("#subjectdetail-search-subjid").val("");
+ treeSelect.revokeNode('subjectdetail-search-subjid-filter');
return false;
}
return true;
@@ -139,14 +139,14 @@
renderTable({
startdate: $('#subjectdetail-search-startdate').val(),
enddate: $('#subjectdetail-search-enddate').val(),
- subjno: null
+ subjid: null
})
$('#subjectdetail-search-btn').click(function () {
var startdate = $("#subjectdetail-search-startdate").val();
var enddate = $("#subjectdetail-search-enddate").val();
- var subjno = $("#subjectdetail-search-subjno").val();
+ var subjid = $("#subjectdetail-search-subjid").val();
if (null == startdate || "" == $.trim(startdate)) {
layer.msg('请选择起始日期', {icon: 2, time: 1500});
return;
@@ -155,7 +155,7 @@
layer.msg('请选择截止日期', {icon: 2, time: 1500});
return;
}
- if (null == subjno || "" == $.trim(subjno)) {
+ if (null == subjid || "" == $.trim(subjid)) {
layer.msg('请选择科目', {icon: 2, time: 1500});
return;
}
@@ -163,7 +163,7 @@
renderTable({
startdate: startdate,
enddate: enddate,
- subjno: subjno
+ subjid: subjid
})
});
diff --git a/payapi/src/main/resources/templates/system/shop/config.html b/payapi/src/main/resources/templates/system/shop/config.html
index 56400e7..b8acc1d 100644
--- a/payapi/src/main/resources/templates/system/shop/config.html
+++ b/payapi/src/main/resources/templates/system/shop/config.html
@@ -28,12 +28,12 @@
<option th:each="pt:${paytypelist}" th:value="${pt.sourceType}"
th:text="${pt.paydesc}"></option>
</select> 
- <button id="btn-search-shoppaytype" class="layui-btn icon-btn" data-type="search"><i class="layui-icon"></i>搜索
+ <button id="btn-search-shopsourcetype" class="layui-btn icon-btn" data-type="search"><i class="layui-icon"></i>搜索
</button>
- <button id="btn-add-shoppaytype" class="layui-btn icon-btn" data-type="add"><i class="layui-icon"></i>新
+ <button id="btn-add-shopsourcetype" class="layui-btn icon-btn" data-type="add"><i class="layui-icon"></i>新
增
</button>
- <button id="btn-reset-shoppaytype" class="layui-btn layui-btn-primary" data-type="reset"><i
+ <button id="btn-reset-shopsourcetype" class="layui-btn layui-btn-primary" data-type="reset"><i
class="layui-icon"></i>清 空
</button>
</div>
@@ -47,22 +47,22 @@
<!-- 表格状态列 -->
<script type="text/html" id="shop-consumeenable-tpl-state">
- <input type="checkbox" lay-filter="shop-consumeenable-tpl-state" value="{{d.shopaccno}}" def-sourceType="{{d.paytype}}" lay-skin="switch" lay-text="启用|关闭"
+ <input type="checkbox" lay-filter="shop-consumeenable-tpl-state" value="{{d.shopaccno}}" def-sourceType="{{d.sourceType}}" lay-skin="switch" lay-text="启用|关闭"
{{d.consumeEnable==true?'checked':''}}/>
</script>
<script type="text/html" id="shop-anonymousenable-tpl-state">
{{# if(d.consumeEnable == true ){ }}
- <input type="checkbox" lay-filter="shop-anonymousenable-tpl-state" value="{{d.shopaccno}}" def-sourceType="{{d.paytype}}" lay-skin="switch"
+ <input type="checkbox" lay-filter="shop-anonymousenable-tpl-state" value="{{d.shopaccno}}" def-sourceType="{{d.sourceType}}" lay-skin="switch"
lay-text="启用|关闭"
{{(d.consumeEnable==true && d.anonymousEnable==true)?'checked':''}}/>
{{# }else{ }}
- <input type="checkbox" lay-filter="shop-anonymousenable-tpl-state" value="{{d.shopaccno}}" def-sourceType="{{d.paytype}}" lay-skin="switch"
+ <input type="checkbox" lay-filter="shop-anonymousenable-tpl-state" value="{{d.shopaccno}}" def-sourceType="{{d.sourceType}}" lay-skin="switch"
lay-text="启用|关闭"
{{(d.consumeEnable==true && d.anonymousEnable==true)?'checked':''}} disabled/>
{{# } }}
</script>
<script type="text/html" id="shop-reverseenable-tpl-state">
- <input type="checkbox" lay-filter="shop-reverseenable-tpl-state" value="{{d.shopaccno}}" def-sourceType="{{d.paytype}}" lay-skin="switch" lay-text="启用|关闭"
+ <input type="checkbox" lay-filter="shop-reverseenable-tpl-state" value="{{d.shopaccno}}" def-sourceType="{{d.sourceType}}" lay-skin="switch" lay-text="启用|关闭"
{{d.reverseEnable==true?'checked':''}}/>
</script>
@@ -106,13 +106,13 @@
layer.msg('查询商户树失败了,请稍后再试', {icon: 2});
});
- $('#btn-reset-shoppaytype').click(function () {
+ $('#btn-reset-shopsourcetype').click(function () {
$("#search-sourceType").val("");
form.render('select');
});
- $('#btn-search-shoppaytype').click(function(){
+ $('#btn-search-shopsourcetype').click(function(){
var ptype = $("#search-sourceType").val();
- table.reload('shopPaytypeTable', {where: {paytype: ptype, shopaccno:""}, page: {curr: 1}});
+ table.reload('shopPaytypeTable', {where: {sourceType: ptype, shopaccno:""}, page: {curr: 1}});
});
function ondblclick(event, treeId, treeNode) {
@@ -121,13 +121,13 @@
return;
}
var ptype = $("#search-sourceType").val();
- table.reload('shopPaytypeTable', {where: {paytype: ptype, shopaccno: treeNode.shopaccno}, page: {curr: 1}});
+ table.reload('shopPaytypeTable', {where: {sourceType: ptype, shopaccno: treeNode.shopaccno}, page: {curr: 1}});
}
// 渲染表格
table.render({
elem: '#shopPaytypeTable',
- url: '[[@{/shop/shoppaytypelist}]]',
+ url: '[[@{/shop/shopsourcetypelist}]]',
page: true,
width: 1010,
cols: [
@@ -160,7 +160,7 @@
sort: true
},
{align: 'center', title: '操作', width: 90, fixed: 'right', templet: function (item) {
- if (item.paytype !== 'balance') {
+ if (item.sourceType !== 'balance') {
return '<a class="layui-btn layui-btn-xs" lay-event="config">配置</a>';
}
return '<span style="font-size: 12px;color: #D3D4D3;">无配置</span>';
@@ -173,9 +173,9 @@
// 修改总状态
form.on('switch(shop-consumeenable-tpl-state)', function (obj) {
var token = $("meta[name='_csrf_token']").attr("value");
- admin.go('[[@{/shop/updatepaytypestat}]]', {
+ admin.go('[[@{/shop/updatesourcetypestat}]]', {
shopaccno: obj.elem.value,
- paytype: $(obj.elem).attr("def-sourceType"),
+ sourceType: $(obj.elem).attr("def-sourceType"),
optype: "consume",
state: obj.elem.checked ? 'yes' : 'no',
_csrf: token
@@ -210,9 +210,9 @@
});
function updateShopPaytypeState(obj, optype, token) {
- admin.go('[[@{/shop/updatepaytypestat}]]', {
+ admin.go('[[@{/shop/updatesourcetypestat}]]', {
shopaccno: obj.elem.value,
- paytype: $(obj.elem).attr("def-sourceType"),
+ sourceType: $(obj.elem).attr("def-sourceType"),
state: obj.elem.checked ? 'yes' : 'no',
optype: optype,
_csrf: token
@@ -235,7 +235,7 @@
});
}
- $('#btn-add-shoppaytype').click(function () {
+ $('#btn-add-shopsourcetype').click(function () {
var ztree = $.fn.zTree.getZTreeObj("shopacctree");
var shopNodes = ztree.getSelectedNodes();
if (undefined === shopNodes || null == shopNodes || shopNodes.length < 1) {
@@ -247,16 +247,16 @@
layer.msg("请选择结算商户!", {icon: 2, time: 1000});
return;
}
- admin.putTempData('t_addshoppaytype', {
+ admin.putTempData('t_addshopsourcetype', {
shopaccno:shopNode.shopaccno,
shopname: shopNode.name.slice(shopNode.id.length+1) //23_第一食堂,截取商户名称
});
admin.popupCenter({
title: "新增支付能力",
- path: '[[@{/shop/load4addpaytype}]]',
+ path: '[[@{/shop/load4addsourcetype}]]',
finish: function () {
table.reload('shopPaytypeTable', {
- where: {paytype: "", shopaccno: shopNode.shopaccno},
+ where: {sourceType: "", shopaccno: shopNode.shopaccno},
page: {curr: 1}
});
}
@@ -269,7 +269,7 @@
if ('config' === obj.event) {
admin.popupCenter({
title: "配置参数【" + data.shopname + "_" + data.paydesc + "】",
- path: '[[@{/shop/load4paytypepara}]]?shopaccno=' + data.shopaccno + '&paytype=' + data.paytype,
+ path: '[[@{/shop/load4sourcetypepara}]]?shopaccno=' + data.shopaccno + '&sourceType=' + data.sourceType,
area: '800px',
finish: function () {
table.reload('shopPaytypeTable');
diff --git a/payapi/src/main/resources/templates/system/shop/configform.html b/payapi/src/main/resources/templates/system/shop/configform.html
index e0bd620..0532b6a 100644
--- a/payapi/src/main/resources/templates/system/shop/configform.html
+++ b/payapi/src/main/resources/templates/system/shop/configform.html
@@ -14,7 +14,7 @@
<div class="layui-form-item">
<label class="layui-form-label">支付方式</label>
<div class="layui-input-block">
- <select name="paytype" lay-verify="required">
+ <select name="sourceType" lay-verify="required">
<option th:each="pt:${paytypelist}" th:value="${pt.sourceType}"
th:text="${pt.paydesc}"></option>
</select> 
@@ -57,7 +57,7 @@
form.render('checkbox');
form.render('select');
// 回显数据
- var shop = admin.getTempData('t_addshoppaytype');
+ var shop = admin.getTempData('t_addshopsourcetype');
if (shop) {
form.val('shop-sourceType-form', {
shopaccno: shop.shopaccno,
@@ -73,18 +73,17 @@
$.ajax({
type : "POST",
dataType : "json",
- url : '[[@{/shop/addshoppaytype}]]',
+ url : '[[@{/shop/addshopsourcetype}]]',
data : vdata,
success : function(result) {
layer.closeAll('loading');
- if (result.code == 200) {
+ if (result.code === 200) {
layer.msg(result.msg, {icon: 1});
admin.finishPopupCenter();
- } else if (result.code == 401) {
+ } else if (result.code === 401) {
layer.msg(result.msg, {icon: 2, time: 1500}, function () {
location.replace('[[@{/login}]]');
}, 1000);
- return;
} else {
console.log('err:', result);
layer.msg(result.msg, {icon: 2});
diff --git a/payapi/src/main/resources/templates/system/shop/configpara.html b/payapi/src/main/resources/templates/system/shop/configpara.html
index 6e77151..dcaeb05 100644
--- a/payapi/src/main/resources/templates/system/shop/configpara.html
+++ b/payapi/src/main/resources/templates/system/shop/configpara.html
@@ -1,7 +1,8 @@
-<form id="shop-sourceType-config-form" lay-filter="shop-sourceType-config-form" class="layui-form model-form">
+<form id="shop-sourceType-config-form" lay-filter="shop-sourceType-config-form" class="layui-form model-form"
+ xmlns:th="http://www.w3.org/1999/xhtml">
<div class="layui-form-item" style="display: none;">
<input type="hidden" class="layui-input" id="hid_shopaccno" th:value="${shopaccno}"/>
- <input type="hidden" class="layui-input" id="hid_paytype" th:value="${paytype}"/>
+ <input type="hidden" class="layui-input" id="hid_sourcetype" th:value="${sourcetype}"/>
</div>
<div class="layui-form-item" style="text-align: center;" th:if="${configlist.size()} le 0">
@@ -33,36 +34,35 @@
form.on('submit(form-submit)', function (data) {
layer.load(2);
var vdata = data.field;
- if(JSON.stringify(vdata)=="{}"){
+ if(JSON.stringify(vdata)==="{}"){
layer.closeAll('loading');
admin.closePopupCenter();
return; //无配置项,直接关闭
}
var token = $("meta[name='_csrf_token']").attr("value");
- vdata["hid_paytype"] = $("#hid_paytype").val();
+ vdata["hid_sourcetype"] = $("#hid_sourcetype").val();
vdata["hid_shopaccno"] = $("#hid_shopaccno").val();
console.log('addShopPaytype:', vdata);
debugger
$.ajax({
type : "POST",
dataType : "json",
- url : '[[@{/shop/addpaytypepara}]]',
+ url : '[[@{/shop/addsourcetypepara}]]',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
- 'X-CSRF-TOKEN':token,
+ 'X-CSRF-TOKEN':token
},
data : JSON.stringify(vdata),
success : function(result) {
layer.closeAll('loading');
- if (result.code == 200) {
+ if (result.code === 200) {
layer.msg(result.msg, {icon: 1});
admin.finishPopupCenter();
- } else if (result.code == 401) {
+ } else if (result.code === 401) {
layer.msg(result.msg, {icon: 2, time: 1500}, function () {
location.replace('[[@{/login}]]');
}, 1000);
- return;
} else {
console.log('err:' + result.code);
layer.msg(result.msg, {icon: 2});