mirror of
https://gitee.com/dromara/dax-pay.git
synced 2025-10-13 13:20:23 +00:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
## 🍈项目介绍
|
||||
|
||||
> DaxPay是一套开源支付网关系统,已经对接支付宝、微信支付、云闪付相关的接口。可以独立部署,提供接口供业务系统进行调用,不对原有系统产生影响。
|
||||
> 同时与商业版使用同样的底层代码,可以方便的升级为商业版。
|
||||
> 同时与商业版使用同样的底层代码,保证统一接口尽量兼容,可以方便的升级为商业版。
|
||||
|
||||
## 🧭 特色功能
|
||||
- 封装各类支付通道的接口为统一的接口,方便业务系统进行调用,简化对接多种支付方式的复杂度
|
||||
@@ -53,7 +53,7 @@
|
||||
### 开源版:
|
||||
> 注:演示账号部分功能权限未开放。
|
||||
|
||||
地址:https://single.web.daxpay.cn
|
||||
地址:https://admin.web.daxpay.cn
|
||||
|
||||
账号:daxpay
|
||||
|
||||
|
@@ -1,4 +1,5 @@
|
||||
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for base_area
|
||||
-- ----------------------------
|
||||
@@ -629,14 +630,12 @@ INSERT INTO "public"."iam_perm_menu" VALUES (1822975425229004800, 18113656158154
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1813456708833087488, 1811365615815487488, '2024-07-17 14:12:26.440633', 1811365615815487488, '2024-09-20 11:05:46.469139', 4, 'f', 1812113823376666624, 'dax-pay-admin', '基础配置', '', '', 'f', 'f', 'Layout', '/pay/config/basic', '', -1, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1822975777026252800, 1811365615815487488, '2024-08-12 20:37:49.152472', 1811365615815487488, '2024-08-12 20:37:49.154031', 0, 'f', 1822975425229004800, 'dax-pay-admin', '存储平台', 'FilePlatformList', '', 'f', 'f', '/baseapi/file/platform/FilePlatformList', '/system/file/platform', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1822975970266226688, 1811365615815487488, '2024-08-12 20:38:35.224183', 1811365615815487488, '2024-08-12 20:38:35.226288', 0, 'f', 1822975425229004800, 'dax-pay-admin', '文件管理', 'FileUploadList', '', 'f', 'f', '/baseapi/file/upload/FileUploadList', '/system/file/info', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1812114959231938560, 1811365615815487488, '2024-07-13 21:20:48.405236', 1811365615815487488, '2025-01-04 15:43:45.730211', 1, 'f', NULL, 'dax-pay-admin', '对账管理', 'Reconcile', 'ant-design:arrows-alt-outlined', 'f', 'f', 'Layout', '/pay/reconcile', '', 80, 't', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1812114725651148800, 1811365615815487488, '2024-07-13 21:19:52.715548', 1811365615815487488, '2025-01-04 15:43:51.978676', 2, 'f', NULL, 'dax-pay-admin', '分账管理', 'Allocation', 'ant-design:sliders-twotone', 't', 'f', 'Layout', '/pay/allocation', '', 70, 't', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1824779660136001536, 1811365615815487488, '2024-08-17 20:05:48.400494', 1811365615815487488, '2024-08-17 20:05:48.402062', 0, 'f', 1812114725651148800, 'dax-pay-admin', '分账接收者', '', '', 'f', 'f', '', '/pay/allocation', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1824779695900831744, 1811365615815487488, '2024-08-17 20:05:56.927619', 1811365615815487488, '2024-08-17 20:05:56.928667', 0, 'f', 1812114725651148800, 'dax-pay-admin', '分账组', '', '', 'f', 'f', '', '/pay/allocation', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1828321321655308288, 1811365615815487488, '2024-08-27 14:39:06.307149', 1811365615815487488, '2024-08-27 14:39:06.309784', 0, 'f', NULL, 'dax-pay-merchant', '系统管理', 'System', 'ant-design:setting-outlined', 'f', 'f', 'Layout', '/system', '', 0, 't', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1828329559561965568, 1811365615815487488, '2024-08-27 15:11:50.377235', 1811365615815487488, '2024-08-27 15:11:50.378788', 0, 'f', NULL, 'dax-pay-merchant', '支付配置', 'PayConfig', 'ant-design:property-safety-twotone', 'f', 'f', 'Layout', '/pay/config', '', 0, 't', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1828329734523162624, 1811365615815487488, '2024-08-27 15:12:32.091286', 1811365615815487488, '2024-08-27 15:12:32.093374', 0, 'f', NULL, 'dax-pay-merchant', '订单管理', 'PayOrder', 'ant-design:wallet-outlined', 'f', 'f', 'Layout', '/pay/order', '', 0, 't', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1828329876961726464, 1811365615815487488, '2024-08-27 15:13:06.051401', 1811365615815487488, '2024-08-27 15:13:06.053461', 0, 'f', NULL, 'dax-pay-merchant', '交易记录', 'PayRecord', 'ant-design:container-outlined', 'f', 'f', 'Layout', '/pay/record', '', 0, 't', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1824779660136001536, 1811365615815487488, '2024-08-17 20:05:48.400494', 1811365615815487488, '2025-05-07 08:54:32.042177', 0, 't', 1812114725651148800, 'dax-pay-admin', '分账接收者', '', '', 'f', 'f', '', '/pay/allocation', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1812114959231938560, 1811365615815487488, '2024-07-13 21:20:48.405236', 1811365615815487488, '2025-05-07 08:54:49.424734', 1, 't', NULL, 'dax-pay-admin', '对账管理', 'Reconcile', 'ant-design:arrows-alt-outlined', 'f', 'f', 'Layout', '/pay/reconcile', '', 80, 't', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1828330011066208256, 1811365615815487488, '2024-08-27 15:13:38.024196', 1811365615815487488, '2024-08-27 15:13:38.026907', 0, 'f', NULL, 'dax-pay-merchant', '商户通知', 'PayNotic', 'ant-design:notification-twotone', 'f', 'f', 'Layout', '/pay/notice', '', 0, 't', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1828341845420773376, 1811365615815487488, '2024-08-27 16:00:39.554398', 1811365615815487488, '2024-08-27 16:00:39.557168', 0, 'f', 1828321321655308288, 'dax-pay-merchant', '请求权限', 'PermPathList', '', 'f', 'f', 'iam/perm/path/PermPathList', '/system/path', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1828329089900580864, 1811365615815487488, '2024-08-27 15:09:58.401939', 1811365615815487488, '2024-08-27 16:01:05.442085', 1, 'f', 1828321321655308288, 'dax-pay-merchant', '角色管理', 'RoleList', '', 'f', 'f', 'iam/role/RoleList.vue', '/system/role', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
@@ -649,8 +648,6 @@ INSERT INTO "public"."iam_perm_menu" VALUES (1828345482972860416, 18113656158154
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1828345770836332544, 1811365615815487488, '2024-08-27 16:16:15.446234', 1811365615815487488, '2024-08-27 16:16:15.448516', 0, 'f', 1828343958704066560, 'dax-pay-merchant', '订阅通知', 'NotifyConstList', '', 'f', 'f', '/daxpay/common/constant/notify/NotifyConstList', '/pay/config/base/notify', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1816064593371066368, 1811365615815487488, '2024-07-24 18:55:14.565671', 1811365615815487488, '2024-08-27 19:11:47.317719', 4, 'f', 1812114347454951424, 'dax-pay-admin', '关闭记录(支付)', 'PayCloseRecordList', '', 'f', 'f', '/daxpay/common/record/close/PayCloseRecordList', '/pay/record/close', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1824779945365450752, 1811365615815487488, '2024-08-17 20:06:56.404481', 1811365615815487488, '2024-08-27 19:11:51.292144', 2, 'f', 1812114347454951424, 'dax-pay-admin', '同步记录', 'TradeSyncRecordList', '', 'f', 'f', '/daxpay/common/record/sync/TradeSyncRecordList', '/pay/record/sync', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1820468413097746432, 1811365615815487488, '2024-08-05 22:34:27.007057', 1811365615815487488, '2024-08-27 19:12:34.654805', 2, 'f', 1812114959231938560, 'dax-pay-admin', '差异记录', 'ReconcileDiscrepancyList', '', 'f', 'f', '/daxpay/common/reconcile/discrepancy/ReconcileDiscrepancyList', '/pay/reconcile/discrepancy', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1820467934552825856, 1811365615815487488, '2024-08-05 22:32:32.913035', 1811365615815487488, '2024-08-27 19:12:40.133331', 2, 'f', 1812114959231938560, 'dax-pay-admin', '对账单', 'ReconcileStatementList', '', 'f', 'f', '/daxpay/common/reconcile/statement/ReconcileStatementList', '/pay/reconcile/statement', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1828391238714904576, 1811365615815487488, '2024-08-27 19:16:55.833768', 1811365615815487488, '2024-08-27 19:16:55.835858', 0, 'f', 1828329734523162624, 'dax-pay-merchant', '支付订单', 'PayOrderList', '', 'f', 'f', '/daxpay/common/order/pay/PayOrderList', '/pay/order/pay', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1828391326023536640, 1811365615815487488, '2024-08-27 19:17:16.649616', 1811365615815487488, '2024-08-27 19:17:16.652853', 0, 'f', 1828329734523162624, 'dax-pay-merchant', '退款订单', 'RefundOrderList', '', 'f', 'f', '/daxpay/common/order/refund/RefundOrderList', '/pay/order/refund', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1828391418604408832, 1811365615815487488, '2024-08-27 19:17:38.723375', 1811365615815487488, '2024-08-27 19:17:38.726373', 0, 'f', 1828329734523162624, 'dax-pay-merchant', '转账订单', 'TransferOrderList', '', 'f', 'f', '/daxpay/common/order/transfer/TransferOrderList', '/pay/order/transfer', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
@@ -675,6 +672,8 @@ INSERT INTO "public"."iam_perm_menu" VALUES (1836248839544733696, 18113656158154
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1838832057238274048, 1811365615815487488, '2024-09-25 14:45:00.952476', 1811365615815487488, '2024-09-25 14:46:49.48474', 1, 'f', 1812115119471128576, 'dax-pay-admin', '认证调试', 'ChannelAuth', '', 'f', 'f', '/daxpay/common/develop/auth/ChannelAuth', '/pay/demo/channelAuth', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1856162201900429312, 1811365615815487488, '2024-11-12 10:28:49.417797', 1811365615815487488, '2024-11-12 10:28:49.419797', 0, 'f', 1810910433264762880, 'dax-pay-admin', '行政区划', 'ChinaRegion', '', 'f', 'f', '/baseapi/region/ChinaRegion', '/system/config/region', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1824779750208679936, 1811365615815487488, '2024-08-17 20:06:09.875297', 1811365615815487488, '2024-12-21 11:55:37.943795', 2, 'f', 1812114224679284736, 'dax-pay-admin', '分账单', 'AllocOrderList', '', 'f', 'f', '/daxpay/common/allocation/order/AllocOrderList', '/pay/order/allocation', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1820468413097746432, 1811365615815487488, '2024-08-05 22:34:27.007057', 1811365615815487488, '2025-05-07 08:54:40.919178', 2, 't', 1812114959231938560, 'dax-pay-admin', '差异记录', 'ReconcileDiscrepancyList', '', 'f', 'f', '/daxpay/common/reconcile/discrepancy/ReconcileDiscrepancyList', '/pay/reconcile/discrepancy', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1820467934552825856, 1811365615815487488, '2024-08-05 22:32:32.913035', 1811365615815487488, '2025-05-07 08:54:45.843714', 2, 't', 1812114959231938560, 'dax-pay-admin', '对账单', 'ReconcileStatementList', '', 'f', 'f', '/daxpay/common/reconcile/statement/ReconcileStatementList', '/pay/reconcile/statement', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1812115119471128576, 1811365615815487488, '2024-07-13 21:21:26.609834', 1811365615815487488, '2025-01-04 15:43:37.546388', 4, 'f', NULL, 'dax-pay-admin', '演示模块', 'Demo', 'ant-design:appstore-twotone', 'f', 'f', 'Layout', '/pay/demo', '', 98, 't', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1883149346789183488, 1811365615815487488, '2025-01-25 21:46:06.154587', 1811365615815487488, '2025-01-25 21:46:06.154587', 0, 'f', 1883148939727785984, 'dax-pay-admin', '微信', '', '', 'f', 'f', 'Layout', '/pay/channel/wechat', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1883149275196608512, 1811365615815487488, '2025-01-25 21:45:49.086541', 1811365615815487488, '2025-01-25 21:46:24.127782', 1, 'f', 1883148939727785984, 'dax-pay-admin', '支付宝', '', '', 'f', 'f', 'Layout', '/pay/channel/alipay', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
@@ -685,7 +684,6 @@ INSERT INTO "public"."iam_perm_menu" VALUES (1812118635229016064, 18113656158154
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1883722667859677184, 1811365615815487488, '2025-01-27 11:44:16.551262', 1811365615815487488, '2025-02-17 20:40:18.405954', 1, 'f', 1883149275196608512, 'dax-pay-admin', '分账接收方管理', 'AlipayReceiverBindList', '', 'f', 'f', '/daxpay/common/channel/alipay/receiver/bind/AlipayReceiverBindList', '/pay/channel/alipay/alloc/receiver', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1883149475705311232, 1811365615815487488, '2025-01-25 21:46:36.890326', 1811365615815487488, '2025-02-19 19:07:13.981572', 1, 'f', 1883148939727785984, 'dax-pay-admin', '云闪付', '', '', 't', 'f', 'Layout', '/pay/channel/union', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1883722723325153280, 1811365615815487488, '2025-01-27 11:44:29.7731', 1811365615815487488, '2025-02-19 19:08:03.568342', 1, 'f', 1883149346789183488, 'dax-pay-admin', '分账接收方管理', 'WechatReceiverBindList', '', 'f', 'f', '/daxpay/common/channel/wechat/receiver/bind/WechatReceiverBindList', '/pay/channel/wechat/alloc/receiver', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1899771948020867072, 1811365615815487488, '2025-03-12 18:38:23.121945', 1811365615815487488, '2025-03-12 18:38:23.121945', 0, 'f', 1812116779807338496, 'dax-pay-admin', '终端报送类型', 'TerminalConstList', '', 'f', 'f', '/daxpay/common/constant/terminal/TerminalConstList', '/pay/config/base/terminal', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1907420295485571072, 1811365615815487488, '2025-04-02 21:10:11.259186', 1811365615815487488, '2025-04-02 21:10:11.259186', 0, 'f', 1828392717093818368, 'dax-pay-merchant', '交易调试', 'DevelopTrade', '', 'f', 'f', '/daxpay/common/develop/trade/DevelopTrade', '/pay/demo/develop', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1907421058936979456, 1811365615815487488, '2025-04-02 21:13:13.277956', 1811365615815487488, '2025-04-02 21:13:13.277956', 0, 'f', 1828392717093818368, 'dax-pay-merchant', '认证调试', 'ChannelAuth', '', 'f', 'f', '/daxpay/common/develop/auth/ChannelAuth', '/pay/demo/channelAuth', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1911706396408745984, 1811365615815487488, '2025-04-14 17:01:37.348397', 1811365615815487488, '2025-04-14 17:01:37.348397', 0, 'f', 1828343958704066560, 'dax-pay-merchant', '终端报送类型', 'TerminalConstList', '', 'f', 'f', '/daxpay/common/constant/terminal/TerminalConstList', '/pay/config/base/terminal', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
@@ -702,10 +700,14 @@ INSERT INTO "public"."iam_perm_menu" VALUES (1911720890363088896, 18113656158154
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1911720990229467136, 1811365615815487488, '2025-04-14 17:59:36.786069', 1811365615815487488, '2025-04-14 17:59:36.786069', 0, 'f', 1911714157901189120, 'dax-pay-merchant', '分账接收方管理', 'WechatReceiverBindList', '', 'f', 'f', '/daxpay/common/channel/wechat/receiver/bind/WechatReceiverBindList', '/pay/channel/wechat/alloc/receiver', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1911721140293275648, 1811365615815487488, '2025-04-14 18:00:12.564897', 1811365615815487488, '2025-04-14 18:00:12.564897', 0, 'f', 1911714477968527360, 'dax-pay-merchant', '分账接收方管理', 'LeshuaReceiverBindList', '', 'f', 'f', '/daxpay/common/channel/leshua/receiver/bind/LeshuaReceiverBindList', '/pay/channel/leshua/alloc/receiver/bind', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1911721245096349696, 1811365615815487488, '2025-04-14 18:00:37.551624', 1811365615815487488, '2025-04-14 18:00:37.551624', 0, 'f', 1911714643085692928, 'dax-pay-merchant', '分账接收方管理', '', '', 'f', 'f', '', '/pay/channel/vbill/alloc/receiver', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1899771948020867072, 1811365615815487488, '2025-03-12 18:38:23.121945', 1811365615815487488, '2025-05-07 14:39:35.226925', 0, 't', 1812116779807338496, 'dax-pay-admin', '终端报送类型', 'TerminalConstList', '', 'f', 'f', '/daxpay/common/constant/terminal/TerminalConstList', '/pay/config/base/terminal', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1911721379628650496, 1811365615815487488, '2025-04-14 18:01:09.626762', 1811365615815487488, '2025-04-14 18:01:09.626762', 0, 'f', 1911714710303608832, 'dax-pay-merchant', '分账接收方(个人)', 'AdapayAllocPersonReceiverList', '', 'f', 'f', '/daxpay/common/channel/adapay/receiver/perso/AdapayAllocPersonReceiverList', '/pay/channel/adapay/alloc/receiver/person', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1911721480505856000, 1811365615815487488, '2025-04-14 18:01:33.677943', 1811365615815487488, '2025-04-14 18:01:47.51821', 1, 'f', 1911714710303608832, 'dax-pay-merchant', '分账接收方(企业)', 'AdaPayAllocCorpReceiverList', '', 'f', 'f', '/daxpay/common/channel/adapay/receiver/corp/AdapayAllocCorpReceiverList', '/pay/channel/adapay/alloc/receiver/corp', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1911721663163600896, 1811365615815487488, '2025-04-14 18:02:17.226079', 1811365615815487488, '2025-04-14 18:02:17.226079', 0, 'f', 1911714710303608832, 'dax-pay-merchant', '分账结算账户', 'AdapaySettleAccountList', '', 'f', 'f', '/daxpay/common/channel/adapay/settle/AdapaySettleAccountList', '/pay/channel/adapay/alloc/settle', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1911708592894447616, 1811365615815487488, '2025-04-14 17:10:21.031024', 1811365615815487488, '2025-04-14 18:03:16.596981', 1, 'f', NULL, 'dax-pay-merchant', '支付通道', 'Channel', 'ant-design:transaction-outlined', 'f', 'f', 'Layout', '/pay/channel', '', 0, 't', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1824779695900831744, 1811365615815487488, '2024-08-17 20:05:56.927619', 1811365615815487488, '2025-05-07 08:54:27.399456', 0, 't', 1812114725651148800, 'dax-pay-admin', '分账组', '', '', 'f', 'f', '', '/pay/allocation', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1812114725651148800, 1811365615815487488, '2024-07-13 21:19:52.715548', 1811365615815487488, '2025-05-07 08:54:36.157514', 2, 't', NULL, 'dax-pay-admin', '分账管理', 'Allocation', 'ant-design:sliders-twotone', 't', 'f', 'Layout', '/pay/allocation', '', 70, 't', 't', 'f', 'f', NULL);
|
||||
INSERT INTO "public"."iam_perm_menu" VALUES (1917045943678099456, 1811365615815487488, '2025-04-29 10:39:04.623467', 1811365615815487488, '2025-04-29 10:39:04.624466', 0, 'f', 1810910433264762880, 'dax-pay-admin', '缓存管理', 'CacheClear', '', 'f', 'f', '/baseapi/cache/CacheClear', '/system/config/cache', '', 0, 'f', 't', 'f', 'f', NULL);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for iam_perm_path
|
||||
@@ -1716,55 +1718,6 @@ COMMENT ON TABLE "public"."pay_channel_reconcile_trade" IS '通道对账交易
|
||||
-- Records of pay_channel_reconcile_trade
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for pay_channel_terminal
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS "public"."pay_channel_terminal";
|
||||
CREATE TABLE "public"."pay_channel_terminal" (
|
||||
"id" int8 NOT NULL,
|
||||
"creator" int8,
|
||||
"create_time" timestamp(6),
|
||||
"last_modifier" int8,
|
||||
"last_modified_time" timestamp(6),
|
||||
"version" int4 NOT NULL,
|
||||
"deleted" bool NOT NULL,
|
||||
"mch_no" varchar(32) COLLATE "pg_catalog"."default",
|
||||
"app_id" varchar(32) COLLATE "pg_catalog"."default",
|
||||
"name" varchar(64) COLLATE "pg_catalog"."default",
|
||||
"terminal_id" int8,
|
||||
"terminal_no" varchar(64) COLLATE "pg_catalog"."default",
|
||||
"channel" varchar(32) COLLATE "pg_catalog"."default",
|
||||
"status" varchar(32) COLLATE "pg_catalog"."default",
|
||||
"out_terminal_no" varchar(64) COLLATE "pg_catalog"."default",
|
||||
"error_msg" varchar(500) COLLATE "pg_catalog"."default",
|
||||
"extra" varchar(5000) COLLATE "pg_catalog"."default",
|
||||
"type" varchar(32) COLLATE "pg_catalog"."default"
|
||||
)
|
||||
;
|
||||
COMMENT ON COLUMN "public"."pay_channel_terminal"."id" IS '主键';
|
||||
COMMENT ON COLUMN "public"."pay_channel_terminal"."creator" IS '创建者ID';
|
||||
COMMENT ON COLUMN "public"."pay_channel_terminal"."create_time" IS '创建时间';
|
||||
COMMENT ON COLUMN "public"."pay_channel_terminal"."last_modifier" IS '最后修者ID';
|
||||
COMMENT ON COLUMN "public"."pay_channel_terminal"."last_modified_time" IS '最后修改时间';
|
||||
COMMENT ON COLUMN "public"."pay_channel_terminal"."version" IS '乐观锁';
|
||||
COMMENT ON COLUMN "public"."pay_channel_terminal"."deleted" IS '删除标志';
|
||||
COMMENT ON COLUMN "public"."pay_channel_terminal"."mch_no" IS '商户号';
|
||||
COMMENT ON COLUMN "public"."pay_channel_terminal"."app_id" IS '应用号';
|
||||
COMMENT ON COLUMN "public"."pay_channel_terminal"."name" IS '终端名称';
|
||||
COMMENT ON COLUMN "public"."pay_channel_terminal"."terminal_id" IS '终端ID';
|
||||
COMMENT ON COLUMN "public"."pay_channel_terminal"."terminal_no" IS '终端编码';
|
||||
COMMENT ON COLUMN "public"."pay_channel_terminal"."channel" IS '通道';
|
||||
COMMENT ON COLUMN "public"."pay_channel_terminal"."status" IS '状态';
|
||||
COMMENT ON COLUMN "public"."pay_channel_terminal"."out_terminal_no" IS '通道终端号';
|
||||
COMMENT ON COLUMN "public"."pay_channel_terminal"."error_msg" IS '错误信息';
|
||||
COMMENT ON COLUMN "public"."pay_channel_terminal"."extra" IS '扩展信息';
|
||||
COMMENT ON COLUMN "public"."pay_channel_terminal"."type" IS '报送类型';
|
||||
COMMENT ON TABLE "public"."pay_channel_terminal" IS '通道终端设备上报记录';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of pay_channel_terminal
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for pay_close_record
|
||||
-- ----------------------------
|
||||
@@ -2368,143 +2321,6 @@ COMMENT ON TABLE "public"."pay_platform_config" IS '管理平台配置';
|
||||
-- ----------------------------
|
||||
-- Records of pay_platform_config
|
||||
-- ----------------------------
|
||||
INSERT INTO "public"."pay_platform_config" VALUES (1, 1811365615815487488, '2025-04-27 19:35:43.283482', 1811365615815487488, '2025-04-27 19:35:43.283482', 0, 'f', 'http://127.0.0.1:19999', NULL, 'http://127.0.0.1:9100', NULL, 200.00);
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of pay_platform_config
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for pay_reconcile_discrepancy
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS "public"."pay_reconcile_discrepancy";
|
||||
CREATE TABLE "public"."pay_reconcile_discrepancy" (
|
||||
"id" int8 NOT NULL,
|
||||
"creator" int8,
|
||||
"create_time" timestamp(6),
|
||||
"mch_no" varchar(32) COLLATE "pg_catalog"."default",
|
||||
"app_id" varchar(32) COLLATE "pg_catalog"."default",
|
||||
"reconcile_id" int8,
|
||||
"reconcile_no" varchar(32) COLLATE "pg_catalog"."default",
|
||||
"reconcile_date" date,
|
||||
"channel" varchar(20) COLLATE "pg_catalog"."default",
|
||||
"discrepancy_type" varchar(20) COLLATE "pg_catalog"."default",
|
||||
"trade_no" varchar(32) COLLATE "pg_catalog"."default",
|
||||
"biz_trade_no" varchar(100) COLLATE "pg_catalog"."default",
|
||||
"trade_type" varchar(100) COLLATE "pg_catalog"."default",
|
||||
"trade_amount" numeric(13,2),
|
||||
"trade_status" varchar(32) COLLATE "pg_catalog"."default",
|
||||
"trade_time" timestamp(0),
|
||||
"channel_trade_no" varchar COLLATE "pg_catalog"."default",
|
||||
"channel_trade_type" varchar(32) COLLATE "pg_catalog"."default",
|
||||
"channel_trade_amount" numeric(13,2),
|
||||
"channel_trade_status" varchar(32) COLLATE "pg_catalog"."default",
|
||||
"channel_trade_time" timestamp(6),
|
||||
"out_trade_no" varchar(100) COLLATE "pg_catalog"."default",
|
||||
"channel_out_trade_no" varchar(100) COLLATE "pg_catalog"."default",
|
||||
"isv_no" varchar(64) COLLATE "pg_catalog"."default"
|
||||
)
|
||||
;
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."id" IS '主键';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."creator" IS '创建者ID';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."create_time" IS '创建时间';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."mch_no" IS '商户号';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."app_id" IS '应用号';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."reconcile_id" IS '对账单ID';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."reconcile_no" IS '对账号';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."reconcile_date" IS '对账日期';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."channel" IS '支付通道';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."discrepancy_type" IS '差异类型';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."trade_no" IS '平台交易号';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."biz_trade_no" IS '商户订单号';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."trade_type" IS '交易类型';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."trade_amount" IS '交易金额';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."trade_status" IS '交易状态';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."trade_time" IS '交易时间';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."channel_trade_no" IS '通道交易号';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."channel_trade_type" IS '通道交易类型';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."channel_trade_amount" IS '通道交易金额';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."channel_trade_status" IS '通道交易状态';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."channel_trade_time" IS '通道交易时间';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."out_trade_no" IS '平台订单关联通道订单号';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."channel_out_trade_no" IS '通道关联订单号';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_discrepancy"."isv_no" IS '所属服务商';
|
||||
COMMENT ON TABLE "public"."pay_reconcile_discrepancy" IS '对账差异记录';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of pay_reconcile_discrepancy
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for pay_reconcile_statement
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS "public"."pay_reconcile_statement";
|
||||
CREATE TABLE "public"."pay_reconcile_statement" (
|
||||
"creator" int8,
|
||||
"create_time" timestamp(6),
|
||||
"last_modifier" int8,
|
||||
"last_modified_time" timestamp(6),
|
||||
"version" int4 NOT NULL,
|
||||
"deleted" bool NOT NULL,
|
||||
"mch_no" varchar(32) COLLATE "pg_catalog"."default",
|
||||
"app_id" varchar(32) COLLATE "pg_catalog"."default",
|
||||
"name" varchar(255) COLLATE "pg_catalog"."default",
|
||||
"reconcile_no" varchar(32) COLLATE "pg_catalog"."default",
|
||||
"date" date,
|
||||
"channel" varchar(32) COLLATE "pg_catalog"."default",
|
||||
"down_or_upload" bool,
|
||||
"compare" bool,
|
||||
"order_count" varchar(8) COLLATE "pg_catalog"."default",
|
||||
"order_amount" numeric(13,2),
|
||||
"refund_count" varchar(8) COLLATE "pg_catalog"."default",
|
||||
"refund_amount" numeric(13,2),
|
||||
"channel_order_count" varchar(8) COLLATE "pg_catalog"."default",
|
||||
"channel_order_amount" numeric(13,2),
|
||||
"channel_refund_count" varchar(8) COLLATE "pg_catalog"."default",
|
||||
"channel_refund_amount" numeric(13,2),
|
||||
"result" varchar(32) COLLATE "pg_catalog"."default",
|
||||
"channel_file_url" varchar(500) COLLATE "pg_catalog"."default",
|
||||
"platform_file_url" varchar(500) COLLATE "pg_catalog"."default",
|
||||
"error_code" varchar(100) COLLATE "pg_catalog"."default",
|
||||
"error_msg" varchar(500) COLLATE "pg_catalog"."default",
|
||||
"id" int8 NOT NULL,
|
||||
"isv_no" varchar(64) COLLATE "pg_catalog"."default"
|
||||
)
|
||||
;
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."creator" IS '创建者ID';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."create_time" IS '创建时间';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."last_modifier" IS '最后修改ID';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."last_modified_time" IS '最后修改时间';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."version" IS '版本号';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."deleted" IS '删除标志';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."mch_no" IS '商户号';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."app_id" IS '应用号';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."name" IS '名称';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."reconcile_no" IS '对账号';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."date" IS '日期';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."channel" IS '通道';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."down_or_upload" IS '交易对账文件是否下载或上传成功';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."compare" IS '交易对账文件是否比对完成';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."order_count" IS '支付订单数';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."order_amount" IS '支付交易金额';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."refund_count" IS '退款订单数';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."refund_amount" IS '退款交易金额';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."channel_order_count" IS '通道支付订单数';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."channel_order_amount" IS '通道支付交易金额';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."channel_refund_count" IS '通道退款订单数';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."channel_refund_amount" IS '通道退款交易金额';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."result" IS '交易对账结果';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."channel_file_url" IS '原始通道对账单文件url';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."platform_file_url" IS '生成平台对账单文件url';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."error_code" IS '错误码';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."error_msg" IS '错误信息';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."id" IS '主键';
|
||||
COMMENT ON COLUMN "public"."pay_reconcile_statement"."isv_no" IS '所属服务商';
|
||||
COMMENT ON TABLE "public"."pay_reconcile_statement" IS '对账报告';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of pay_reconcile_statement
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for pay_refund_order
|
||||
@@ -2581,31 +2397,6 @@ COMMENT ON TABLE "public"."pay_refund_order" IS '退款订单';
|
||||
-- Records of pay_refund_order
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for pay_terminal_const
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS "public"."pay_terminal_const";
|
||||
CREATE TABLE "public"."pay_terminal_const" (
|
||||
"id" int8 NOT NULL,
|
||||
"channel" varchar(32) COLLATE "pg_catalog"."default" NOT NULL,
|
||||
"type" varchar(32) COLLATE "pg_catalog"."default" NOT NULL,
|
||||
"name" varchar(32) COLLATE "pg_catalog"."default" NOT NULL,
|
||||
"enable" bool NOT NULL,
|
||||
"remark" varchar(200) COLLATE "pg_catalog"."default"
|
||||
)
|
||||
;
|
||||
COMMENT ON COLUMN "public"."pay_terminal_const"."id" IS '主键';
|
||||
COMMENT ON COLUMN "public"."pay_terminal_const"."channel" IS '通道编码';
|
||||
COMMENT ON COLUMN "public"."pay_terminal_const"."type" IS '终端报送类型';
|
||||
COMMENT ON COLUMN "public"."pay_terminal_const"."name" IS '终端报送名称';
|
||||
COMMENT ON COLUMN "public"."pay_terminal_const"."enable" IS '是否启用';
|
||||
COMMENT ON COLUMN "public"."pay_terminal_const"."remark" IS '备注';
|
||||
COMMENT ON TABLE "public"."pay_terminal_const" IS '通道终端报送类型';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of pay_terminal_const
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for pay_terminal_device
|
||||
-- ----------------------------
|
||||
@@ -3298,11 +3089,6 @@ ALTER TABLE "public"."pay_channel_const" ADD CONSTRAINT "pay_channel_const_pkey"
|
||||
-- ----------------------------
|
||||
ALTER TABLE "public"."pay_channel_reconcile_trade" ADD CONSTRAINT "pay_channel_reconcile_trade_pkey" PRIMARY KEY ("id");
|
||||
|
||||
-- ----------------------------
|
||||
-- Primary Key structure for table pay_channel_terminal
|
||||
-- ----------------------------
|
||||
ALTER TABLE "public"."pay_channel_terminal" ADD CONSTRAINT "pay_channel_terminal_pkey" PRIMARY KEY ("id");
|
||||
|
||||
-- ----------------------------
|
||||
-- Indexes structure for table pay_close_record
|
||||
-- ----------------------------
|
||||
@@ -3393,16 +3179,6 @@ ALTER TABLE "public"."pay_order" ADD CONSTRAINT "pay_order_pkey" PRIMARY KEY ("i
|
||||
-- ----------------------------
|
||||
ALTER TABLE "public"."pay_platform_config" ADD CONSTRAINT "pay_platform_config_pkey" PRIMARY KEY ("id");
|
||||
|
||||
-- ----------------------------
|
||||
-- Primary Key structure for table pay_reconcile_discrepancy
|
||||
-- ----------------------------
|
||||
ALTER TABLE "public"."pay_reconcile_discrepancy" ADD CONSTRAINT "pay_reconcile_discrepancy_pkey" PRIMARY KEY ("id");
|
||||
|
||||
-- ----------------------------
|
||||
-- Primary Key structure for table pay_reconcile_statement
|
||||
-- ----------------------------
|
||||
ALTER TABLE "public"."pay_reconcile_statement" ADD CONSTRAINT "pay_reconcile_statement_pkey" PRIMARY KEY ("id");
|
||||
|
||||
-- ----------------------------
|
||||
-- Indexes structure for table pay_refund_order
|
||||
-- ----------------------------
|
||||
@@ -3440,11 +3216,6 @@ COMMENT ON INDEX "public"."refund_refund_no" IS '退款号索引';
|
||||
-- ----------------------------
|
||||
ALTER TABLE "public"."pay_refund_order" ADD CONSTRAINT "pay_refund_order_pkey" PRIMARY KEY ("id");
|
||||
|
||||
-- ----------------------------
|
||||
-- Primary Key structure for table pay_terminal_const
|
||||
-- ----------------------------
|
||||
ALTER TABLE "public"."pay_terminal_const" ADD CONSTRAINT "pay_terminal_type_const_pkey" PRIMARY KEY ("id");
|
||||
|
||||
-- ----------------------------
|
||||
-- Primary Key structure for table pay_terminal_device
|
||||
-- ----------------------------
|
||||
|
@@ -13,5 +13,4 @@
|
||||
<description>项目配置</description>
|
||||
|
||||
|
||||
|
||||
</project>
|
||||
|
@@ -8,7 +8,7 @@ import lombok.Getter;
|
||||
* 业务异常基类
|
||||
* @see BizErrorException 致命异常 error级别警告
|
||||
* @see BizWarnException 业务异常 warn级别
|
||||
* @see BizInfoException 哦月异常 info级别
|
||||
* @see BizInfoException 业务异常 info级别
|
||||
*/
|
||||
@Getter
|
||||
public class BizException extends RuntimeException {
|
||||
|
@@ -12,6 +12,7 @@ import cn.bootx.platform.iam.entity.permission.PermPath;
|
||||
import cn.bootx.platform.iam.service.client.ClientCodeService;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.crypto.SecureUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
@@ -23,6 +24,7 @@ import org.springframework.web.servlet.mvc.method.RequestMappingInfo;
|
||||
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -106,15 +108,18 @@ public class PermPathSyncService {
|
||||
// 重建树结构 删除指定终端的非子节点
|
||||
permPathManager.deleteNotChild(clientCode);
|
||||
// 生成模块信息
|
||||
var moduleMap = this.builderModule(requestPathBos);
|
||||
var moduleList = this.builderModule(requestPathBos);
|
||||
// 生成分组信息
|
||||
var groupMap = this.builderGroup(requestPathBos);
|
||||
var groupList = this.builderGroup(requestPathBos);
|
||||
// 合并进行保存
|
||||
ArrayList<PermPath> list = new ArrayList<>();
|
||||
list.addAll(moduleMap);
|
||||
list.addAll(groupMap);
|
||||
list.addAll(moduleList);
|
||||
list.addAll(groupList);
|
||||
// 设置终端编码
|
||||
list.forEach(o -> o.setClientCode(clientCode));
|
||||
// 根据编码生成ID, 保证每次同步时的模块和分组ID不变
|
||||
list.forEach(o -> o.setId(this.genPathId(o.getParentCode()+o.getClientCode()+o.getCode())));
|
||||
// 保存
|
||||
permPathManager.saveAll(list);
|
||||
}
|
||||
|
||||
@@ -297,4 +302,19 @@ public class PermPathSyncService {
|
||||
.collect(toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 给分组和模块生成ID, 防止每次更新ID都会发生变化
|
||||
*/
|
||||
private long genPathId(String str) {
|
||||
String s = SecureUtil.sha256(str);
|
||||
byte[] hashBytes = s.getBytes(StandardCharsets.UTF_8);
|
||||
// 将前8个字节转换为 long
|
||||
long result = 0;
|
||||
for (int i = 0; i < 8; i++) {
|
||||
result = (result << 8) | (hashBytes[i] & 0xFF);
|
||||
}
|
||||
// 取绝对值,避免负数
|
||||
return Math.abs(result);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -21,13 +21,10 @@ public class AuthProperties {
|
||||
/** 不进行鉴权的路径 */
|
||||
private List<String> ignoreUrls = new ArrayList<>();
|
||||
|
||||
/** 盐值 */
|
||||
private String salt = "salt";
|
||||
|
||||
/** 开启超级管理员(生产模式推荐关闭) */
|
||||
/** 开启超级管理员(生产模式请关闭) */
|
||||
private boolean enableAdmin = true;
|
||||
|
||||
/** 用户管理列表中是否显示 */
|
||||
/** 用户管理列表中是否显示超级管理员用户 */
|
||||
private boolean adminInList = true;
|
||||
|
||||
}
|
||||
|
@@ -37,6 +37,7 @@ public class TokenEndpoint {
|
||||
@Operation(summary = "退出")
|
||||
@PostMapping("/logout")
|
||||
public Result<Void> logout() {
|
||||
|
||||
tokenService.logout();
|
||||
return Res.ok();
|
||||
}
|
||||
|
@@ -9,10 +9,7 @@ import cn.bootx.platform.starter.cache.service.CacheClearService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -30,7 +27,6 @@ public class CacheClearController {
|
||||
private final CacheClearProcessor cacheClearProcessor;
|
||||
private final CacheClearService cacheClearService;
|
||||
|
||||
|
||||
@RequestPath("查询所有缓存前缀")
|
||||
@Operation(summary = "查询所有缓存前缀")
|
||||
@GetMapping("/getCachePrefix")
|
||||
@@ -41,7 +37,7 @@ public class CacheClearController {
|
||||
@RequestPath("清除指定前缀的缓存")
|
||||
@Operation(summary = "清除指定前缀的缓存")
|
||||
@PostMapping("/prefix")
|
||||
public Result<Void> clearCacheByPrefix(List<String> prefix) {
|
||||
public Result<Void> clearCacheByPrefix(@RequestBody List<String> prefix) {
|
||||
cacheClearService.clearCacheByPrefix(prefix);
|
||||
return Res.ok();
|
||||
}
|
||||
|
@@ -2,9 +2,12 @@ package cn.bootx.platform.starter.cache.service;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.data.redis.core.Cursor;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.data.redis.core.ScanOptions;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -22,6 +25,37 @@ public class CacheClearService {
|
||||
* 根据前缀清除缓存
|
||||
*/
|
||||
public void clearCacheByPrefix(List<String> prefixes){
|
||||
prefixes.forEach(prefix->redisTemplate.delete(redisTemplate.keys(prefix + "*")));
|
||||
|
||||
prefixes.forEach(prefix->{
|
||||
deleteStringKeysWithPrefix(prefix,500);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 扫描删除前缀的缓存
|
||||
*/
|
||||
private void deleteStringKeysWithPrefix(String prefix, int batchSize) {
|
||||
ScanOptions options = ScanOptions.scanOptions()
|
||||
.match(prefix + "*")
|
||||
.count(batchSize)
|
||||
.build();
|
||||
|
||||
List<String> deleteKeys;
|
||||
try (Cursor<String> cursor = redisTemplate.scan(options)) {
|
||||
deleteKeys = new ArrayList<>();
|
||||
while (cursor.hasNext()) {
|
||||
deleteKeys.add(cursor.next());
|
||||
//
|
||||
if (deleteKeys.size() >= batchSize) {
|
||||
redisTemplate.delete(deleteKeys);
|
||||
deleteKeys.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
// 删除剩余的 key
|
||||
if (!deleteKeys.isEmpty()) {
|
||||
redisTemplate.delete(deleteKeys);
|
||||
deleteKeys.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -4,19 +4,15 @@ import cn.bootx.platform.core.rest.Res;
|
||||
import cn.bootx.platform.core.rest.param.PageParam;
|
||||
import cn.bootx.platform.core.rest.result.PageResult;
|
||||
import cn.bootx.platform.core.rest.result.Result;
|
||||
import cn.bootx.platform.starter.quartz.param.QuartzJobParam;
|
||||
import cn.bootx.platform.starter.quartz.result.QuartzJobResult;
|
||||
import cn.bootx.platform.starter.quartz.param.QuartzJobParam;
|
||||
import cn.bootx.platform.starter.quartz.service.QuartzJobService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.parameters.RequestBody;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 定时任务
|
||||
|
@@ -15,7 +15,7 @@
|
||||
<version>3.0.0.beta5</version>
|
||||
<packaging>pom</packaging>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<description>多商户支付通道功能实现</description>
|
||||
<description>开源版支付通道功能实现</description>
|
||||
|
||||
<modules>
|
||||
<module>daxpay-open-channel-alipay</module>
|
||||
|
@@ -36,8 +36,8 @@ bootx-platform:
|
||||
# swagger相关配置
|
||||
swagger:
|
||||
author: DaxPay
|
||||
title: DaxPay支付平台-融合端
|
||||
description: DaxPay支付平台-多商户版-融合端
|
||||
title: DaxPay支付平台
|
||||
description: DaxPay支付平台-开源版
|
||||
version: 0.0.1
|
||||
base-packages:
|
||||
"[BootxPlatform接口]":
|
||||
@@ -47,7 +47,6 @@ bootx-platform:
|
||||
- cn.bootx.platform.baseapi
|
||||
- cn.bootx.platform.notice
|
||||
"[支付平台接口]":
|
||||
- org.dromara.daxpay.union
|
||||
- org.dromara.daxpay.controller
|
||||
"[支付通道接口]":
|
||||
- org.dromara.daxpay.channel
|
||||
|
@@ -6,7 +6,7 @@ spring:
|
||||
master:
|
||||
# Postgresql连接
|
||||
driver-class-name: org.postgresql.Driver
|
||||
url: jdbc:postgresql://${DB_HOST}:${DB_PORT}/dax-pay-plus-test?serverTimezone=Asia/Shanghai&autoReconnect=true&reWriteBatchedInserts=true
|
||||
url: ${DB_URL}
|
||||
username: ${DB_USER}
|
||||
password: ${DB_PASSWORD}
|
||||
hikari:
|
||||
@@ -30,14 +30,20 @@ logging:
|
||||
springdoc:
|
||||
# 默认展开对象类型的属性, 主要用在get类型的参数中
|
||||
default-flat-param-object: true
|
||||
knife4j:
|
||||
# 开启接口文档增强特性
|
||||
enable: true
|
||||
# 是否为生产环境, 为true关闭swagger接口
|
||||
production: ${KNIFE4J_PRODUCTION:false}
|
||||
# 基础脚手架配置
|
||||
# 基础脚手架配置
|
||||
bootx-platform:
|
||||
common:
|
||||
# swagger相关配置
|
||||
swagger:
|
||||
author: DaxPay
|
||||
title: DaxPay支付平台-融合端
|
||||
description: DaxPay支付平台-多商户版-融合端
|
||||
title: DaxPay支付平台
|
||||
description: DaxPay支付平台-开源版
|
||||
version: 0.0.1
|
||||
base-packages:
|
||||
"[BootxPlatform接口]":
|
||||
@@ -47,13 +53,15 @@ bootx-platform:
|
||||
- cn.bootx.platform.baseapi
|
||||
- cn.bootx.platform.notice
|
||||
"[支付平台接口]":
|
||||
- org.dromara.daxpay.union
|
||||
- org.dromara.daxpay.controller
|
||||
"[支付通道接口]":
|
||||
- org.dromara.daxpay.channel
|
||||
starter:
|
||||
auth:
|
||||
enable-admin: true
|
||||
# 是否启用超级管理员登录
|
||||
enable-admin: ${DAXPAY_ENABLE_ADMIN:true}
|
||||
# 用户管理列表中是否显示超级管理员
|
||||
admin-in-list: ${DAXPAY_ADMIN_IN_LIST:true}
|
||||
ignore-urls:
|
||||
- '/actuator/**'
|
||||
- '/v3/api-docs/**'
|
||||
@@ -80,13 +88,10 @@ dax-pay:
|
||||
dromara:
|
||||
# 注意, 不要设置 domain 访问路径, 自行进行拼接访问路径, 来保证可迁移性
|
||||
x-file-storage:
|
||||
default-platform: tencent-cos-1
|
||||
tencent-cos:
|
||||
- platform: tencent-cos-1 # 存储平台标识
|
||||
enable-storage: true # 启用存储
|
||||
secret-id: ${OSS_SECRET_ID}
|
||||
secret-key: ${OSS_SECRET_KEY}
|
||||
region: ${OSS_REGION} #存仓库所在地域
|
||||
bucket-name: ${OSS_BUCKET}
|
||||
domain: ${OSS_DOMAIN} # 访问域名,注意“/”结尾,例如:https://abc.cos.ap-nanjing.myqcloud.com/
|
||||
base-path: dax-pay/
|
||||
default-platform: local
|
||||
# 使用Nginx映射到存储路径, 然后将nginx的地址设置到 bootx-platform.starter.file-upload.file-server-url参数
|
||||
local-plus:
|
||||
- platform: local
|
||||
enable-storage: true
|
||||
base-path: /file/ # 基础路径
|
||||
storage-path: /data/files # 存储路径
|
||||
|
@@ -2,7 +2,7 @@ server:
|
||||
port: 9999
|
||||
spring:
|
||||
application:
|
||||
name: dax-pay-union
|
||||
name: dax-pay-admin
|
||||
profiles:
|
||||
active: dev
|
||||
task:
|
||||
@@ -45,4 +45,3 @@ bootx-platform:
|
||||
deploy-mode: fusion
|
||||
client-codes:
|
||||
- dax-pay-admin
|
||||
- dax-pay-merchant
|
||||
|
@@ -10,6 +10,6 @@ ______ ______
|
||||
|___/
|
||||
${AnsiColor.MAGENTA}
|
||||
|
||||
Service: DaxPay 多商户版本-融合端
|
||||
Service: DaxPay 开源版
|
||||
Spring Boot Version: ${spring-boot.version}
|
||||
${AnsiColor.BLACK}
|
||||
|
@@ -0,0 +1,85 @@
|
||||
package org.dromara.daxpay.controller.assist;
|
||||
|
||||
import cn.bootx.platform.core.annotation.RequestGroup;
|
||||
import cn.bootx.platform.core.annotation.RequestPath;
|
||||
import cn.bootx.platform.core.rest.Res;
|
||||
import cn.bootx.platform.core.rest.dto.LabelValue;
|
||||
import cn.bootx.platform.core.rest.param.PageParam;
|
||||
import cn.bootx.platform.core.rest.result.PageResult;
|
||||
import cn.bootx.platform.core.rest.result.Result;
|
||||
import cn.bootx.platform.core.validation.ValidationGroup;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.core.trans.anno.TransMethodResult;
|
||||
import org.dromara.daxpay.service.param.termina.TerminalDeviceParam;
|
||||
import org.dromara.daxpay.service.param.termina.TerminalDeviceQuery;
|
||||
import org.dromara.daxpay.service.result.termina.TerminalDeviceResult;
|
||||
import org.dromara.daxpay.service.service.assist.TerminalDeviceService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 支付终端设备
|
||||
* @author xxm
|
||||
* @since 2025/3/9
|
||||
*/
|
||||
@Validated
|
||||
@Tag(name = "支付终端设备管理")
|
||||
@RestController
|
||||
@RequestMapping("/terminal/device")
|
||||
@RequestGroup(groupCode = "TerminalDevice", groupName = "支付终端设备管理", moduleCode = "PayConfig")
|
||||
@RequiredArgsConstructor
|
||||
public class TerminalDeviceController {
|
||||
private final TerminalDeviceService terminalDeviceService;
|
||||
|
||||
@TransMethodResult
|
||||
@RequestPath("分页查询")
|
||||
@Operation(summary = "分页查询")
|
||||
@GetMapping("/page")
|
||||
public Result<PageResult<TerminalDeviceResult>> page(PageParam pageParam, TerminalDeviceQuery query){
|
||||
return Res.ok(terminalDeviceService.page(pageParam, query));
|
||||
}
|
||||
|
||||
@TransMethodResult
|
||||
@RequestPath("根据ID查询")
|
||||
@Operation(summary = "根据ID查询")
|
||||
@GetMapping("/findById")
|
||||
public Result<TerminalDeviceResult> findById(@NotNull(message = "支付终端设备id不能为空") Long id){
|
||||
return Res.ok(terminalDeviceService.findById(id));
|
||||
}
|
||||
|
||||
@RequestPath("新增")
|
||||
@Operation(summary = "新增")
|
||||
@PostMapping("/add")
|
||||
public Result<Void> add(@RequestBody @Validated(ValidationGroup.add.class) TerminalDeviceParam param){
|
||||
terminalDeviceService.add(param);
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@RequestPath("修改")
|
||||
@Operation(summary = "修改")
|
||||
@PostMapping("/edit")
|
||||
public Result<Void> edit(@RequestBody @Validated(ValidationGroup.edit.class) TerminalDeviceParam param){
|
||||
terminalDeviceService.edit(param);
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@RequestPath("删除")
|
||||
@Operation(summary = "删除")
|
||||
@PostMapping("/delete")
|
||||
public Result<Void> delete(@NotNull(message = "支付终端设备id不能为空") Long id){
|
||||
terminalDeviceService.delete(id);
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
@RequestPath("根据应用号查询下拉列表")
|
||||
@Operation(summary = "根据应用号查询下拉列表")
|
||||
@GetMapping("/dropdown")
|
||||
public Result<List<LabelValue>> dropdown(String appId){
|
||||
return Res.ok(terminalDeviceService.dropdown(appId));
|
||||
}
|
||||
}
|
@@ -1,37 +1,28 @@
|
||||
package org.dromara.daxpay.controller.common;
|
||||
|
||||
import cn.bootx.platform.core.annotation.DataPermScope;
|
||||
import cn.bootx.platform.core.annotation.IgnoreAuth;
|
||||
import cn.bootx.platform.core.annotation.RequestPath;
|
||||
import cn.bootx.platform.core.rest.Res;
|
||||
import cn.bootx.platform.core.rest.result.Result;
|
||||
import cn.bootx.platform.starter.redis.delay.annotation.DelayEventListener;
|
||||
import cn.bootx.platform.starter.redis.delay.annotation.DelayJobEvent;
|
||||
import cn.bootx.platform.starter.redis.delay.bean.DelayJob;
|
||||
import cn.bootx.platform.starter.redis.delay.service.DelayJobService;
|
||||
import org.dromara.daxpay.core.result.assist.AuthResult;
|
||||
import org.dromara.daxpay.service.entity.order.pay.PayOrder;
|
||||
import cn.hutool.core.util.RandomUtil;
|
||||
import cn.bootx.platform.starter.cache.handler.CacheClearProcessor;
|
||||
import cn.bootx.platform.starter.cache.service.CacheClearService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author xxm
|
||||
* @since 2024/7/4
|
||||
*/
|
||||
@DataPermScope("123")
|
||||
@Validated
|
||||
@IgnoreAuth
|
||||
@Slf4j
|
||||
@@ -40,49 +31,22 @@ import java.util.concurrent.TimeUnit;
|
||||
@RequestMapping("/test")
|
||||
@RequiredArgsConstructor
|
||||
public class TestController {
|
||||
|
||||
private final RedisTemplate<String, Object> objectRedisTemplate;
|
||||
|
||||
private final DelayJobService delayJobService;
|
||||
private final CacheClearProcessor cacheClearProcessor;
|
||||
private final CacheClearService cacheClearService;
|
||||
|
||||
|
||||
@Operation(summary = "测试redis")
|
||||
@GetMapping("/redis")
|
||||
public Result<Object> redis(){
|
||||
PayOrder payOrder = new PayOrder();
|
||||
payOrder.setOrderNo("123");
|
||||
// redisTemplate.opsForValue().set("payOrder",new AuthResult().setStatus("123"),60000L);
|
||||
objectRedisTemplate.opsForValue().set("payOrder",new AuthResult().setStatus("123"),600, TimeUnit.MILLISECONDS);
|
||||
// objectRedisTemplate.opsForValue().set("payOrder",payOrder);
|
||||
var payOrder1 = objectRedisTemplate.opsForValue().get("payOrder");
|
||||
return Res.ok(payOrder1);
|
||||
@RequestPath("查询所有缓存前缀")
|
||||
@Operation(summary = "查询所有缓存前缀")
|
||||
@GetMapping("/getCachePrefix")
|
||||
public Result<List<String>> getCachePrefix() {
|
||||
return Res.ok(cacheClearProcessor.getCachePrefix());
|
||||
}
|
||||
|
||||
@Operation(summary = "添加测试延时任务")
|
||||
@PostMapping(value = "addTest")
|
||||
public Result<Void> addDefJobTest() {
|
||||
for (int i = 0; i < 100; i++){
|
||||
DelayJob<PayOrder> delayJob = new DelayJob<>();
|
||||
delayJobService.register(delayJob, "hello", RandomUtil.randomInt(10000,90000));
|
||||
delayJobService.register(delayJob, "hello", LocalDateTime.now().plusSeconds(20));
|
||||
}
|
||||
@RequestPath("清除指定前缀的缓存")
|
||||
@Operation(summary = "清除指定前缀的缓存")
|
||||
@PostMapping("/prefix")
|
||||
public Result<Void> clearCacheByPrefix(List<String> prefix) {
|
||||
cacheClearService.clearCacheByPrefix(prefix);
|
||||
return Res.ok();
|
||||
}
|
||||
|
||||
|
||||
@DelayEventListener("hello")
|
||||
public void hello(DelayJobEvent<PayOrder> event) {
|
||||
if (RandomUtil.randomBoolean()){
|
||||
throw new RuntimeException("测试异常");
|
||||
}
|
||||
log.info("接收到消息:{}",event);
|
||||
}
|
||||
|
||||
@Operation(summary = "v1")
|
||||
@PostMapping("/v1")
|
||||
public void v1(@NotNull(message = "id不可为空") Long id){
|
||||
log.info("v1: {}", id);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -0,0 +1,32 @@
|
||||
package org.dromara.daxpay.core.enums;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 收款终端设备类型
|
||||
* 字典: terminal_device_type
|
||||
* @author xxm
|
||||
* @since 2025/3/7
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum TerminalDeviceTypeEnum {
|
||||
|
||||
AUTO_COUNTER("01", "自动柜员机"),
|
||||
TRADITIONAL_POS("02", "传统POS"),
|
||||
MPOS("03", "mPOS"),
|
||||
SMART_POS("04", "智能POS"),
|
||||
FIXED_PHONE("05", "II型固定电话"),
|
||||
CLOUD_SHAN_PAY("06", "云闪付终端"),
|
||||
RESERVE_USE("07", "保留使用"),
|
||||
PHONE_POS("08", "手机POS"),
|
||||
FACE_PAY_TERMINAL("09", "刷脸付终端"),
|
||||
BAR_CODE_PAY_ACCEPT_TERMINAL("10", "条码支付受理终端"),
|
||||
ASSIST_ACCEPT_TERMINAL("11", "辅助受理终端"),
|
||||
INDUSTRY_TERMINAL("12", "行业终端"),
|
||||
MIS_TERMINAL("13", "MIS终端");
|
||||
|
||||
private final String code;
|
||||
private final String name;
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
package org.dromara.daxpay.service.convert.assist;
|
||||
|
||||
import org.dromara.daxpay.service.entity.assist.TerminalDevice;
|
||||
import org.dromara.daxpay.service.param.termina.TerminalDeviceParam;
|
||||
import org.dromara.daxpay.service.result.termina.TerminalDeviceResult;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
/**
|
||||
* 支付终端设备转换
|
||||
* @author xxm
|
||||
* @since 2025/3/8
|
||||
*/
|
||||
@Mapper
|
||||
public interface TerminalDeviceConvert {
|
||||
TerminalDeviceConvert CONVERT = Mappers.getMapper(TerminalDeviceConvert.class);
|
||||
|
||||
TerminalDeviceResult toResult(TerminalDevice entity);
|
||||
|
||||
TerminalDevice toEntity(TerminalDeviceParam param);
|
||||
|
||||
}
|
@@ -0,0 +1,44 @@
|
||||
package org.dromara.daxpay.service.dao.assist;
|
||||
|
||||
import cn.bootx.platform.common.mybatisplus.impl.BaseManager;
|
||||
import cn.bootx.platform.common.mybatisplus.query.generator.QueryGenerator;
|
||||
import cn.bootx.platform.common.mybatisplus.util.MpUtil;
|
||||
import cn.bootx.platform.core.rest.param.PageParam;
|
||||
import org.dromara.daxpay.service.entity.assist.TerminalDevice;
|
||||
import org.dromara.daxpay.service.param.termina.TerminalDeviceQuery;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* 支付终端设备管理
|
||||
* @author xxm
|
||||
* @since 2025/3/7
|
||||
*/
|
||||
@Slf4j
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class TerminalDeviceManager extends BaseManager<TerminalDeviceMapper, TerminalDevice> {
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
public Page<TerminalDevice> page(PageParam pageParam, TerminalDeviceQuery query){
|
||||
var mpPage = MpUtil.getMpPage(pageParam, TerminalDevice.class);
|
||||
QueryWrapper<TerminalDevice> generator = QueryGenerator.generator(query);
|
||||
return this.page(mpPage,generator);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据编号查询终端信息
|
||||
*/
|
||||
public Optional<TerminalDevice> findByNo(String terminalNo){
|
||||
return this.lambdaQuery()
|
||||
.eq(TerminalDevice::getTerminalNo,terminalNo)
|
||||
.oneOpt();
|
||||
}
|
||||
}
|
@@ -0,0 +1,14 @@
|
||||
package org.dromara.daxpay.service.dao.assist;
|
||||
|
||||
import org.dromara.daxpay.service.entity.assist.TerminalDevice;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 支付终端设备管理
|
||||
* @author xxm
|
||||
* @since 2025/3/7
|
||||
*/
|
||||
@Mapper
|
||||
public interface TerminalDeviceMapper extends MPJBaseMapper<TerminalDevice> {
|
||||
}
|
@@ -0,0 +1,97 @@
|
||||
package org.dromara.daxpay.service.entity.assist;
|
||||
|
||||
import cn.bootx.platform.common.mybatisplus.function.ToResult;
|
||||
import cn.bootx.platform.common.mybatisplus.handler.StringListTypeHandler;
|
||||
import org.dromara.daxpay.core.enums.TerminalDeviceTypeEnum;
|
||||
import org.dromara.daxpay.service.common.entity.MchAppBaseEntity;
|
||||
import org.dromara.daxpay.service.convert.assist.TerminalDeviceConvert;
|
||||
import org.dromara.daxpay.service.param.termina.TerminalDeviceParam;
|
||||
import org.dromara.daxpay.service.result.termina.TerminalDeviceResult;
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 支付终端设备管理
|
||||
* @author xxm
|
||||
* @since 2025/3/7
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@TableName(value = "pay_terminal_device",autoResultMap = true)
|
||||
public class TerminalDevice extends MchAppBaseEntity implements ToResult<TerminalDeviceResult> {
|
||||
|
||||
/** 终端名称 */
|
||||
private String name;
|
||||
|
||||
/** 终端编码 */
|
||||
@TableField(updateStrategy = FieldStrategy.NEVER)
|
||||
private String terminalNo;
|
||||
|
||||
/**
|
||||
* 终端类型
|
||||
* @see TerminalDeviceTypeEnum
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/** 终端序列号 */
|
||||
private String serialNum;
|
||||
|
||||
/** 省市区编码 */
|
||||
@TableField(updateStrategy = FieldStrategy.ALWAYS, typeHandler = StringListTypeHandler.class)
|
||||
private List<String> areaCode;
|
||||
|
||||
/** 终端发放地址 */
|
||||
private String address;
|
||||
|
||||
/** 终端厂商名称 */
|
||||
private String companyName;
|
||||
|
||||
/** 发放日期 */
|
||||
private LocalDate putDate;
|
||||
|
||||
/** 支持终端定位 */
|
||||
private Boolean gps;
|
||||
|
||||
/** 终端机具体型号 */
|
||||
private String machineType;
|
||||
|
||||
/**
|
||||
* 经度,浮点型, 小数点后最多保留6位
|
||||
*/
|
||||
private String longitude;
|
||||
/**
|
||||
* 纬度,浮点型,小数点后最多保留6位
|
||||
*/
|
||||
private String latitude;
|
||||
|
||||
/** 设备 IP 地址 */
|
||||
private String ip;
|
||||
|
||||
/** 银行卡受理终端产品入网认证编号 */
|
||||
private String networkLicense;
|
||||
|
||||
public Boolean getGps() {
|
||||
return Objects.equals(gps, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化对象
|
||||
*/
|
||||
public static TerminalDevice init(TerminalDeviceParam param){
|
||||
return TerminalDeviceConvert.CONVERT.toEntity(param);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TerminalDeviceResult toResult() {
|
||||
return TerminalDeviceConvert.CONVERT.toResult(this);
|
||||
}
|
||||
}
|
@@ -0,0 +1,92 @@
|
||||
package org.dromara.daxpay.service.param.termina;
|
||||
|
||||
import cn.bootx.platform.core.validation.ValidationGroup;
|
||||
import org.dromara.daxpay.core.enums.TerminalDeviceTypeEnum;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import jakarta.validation.constraints.Null;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 支付终端设备参数
|
||||
* @author xxm
|
||||
* @since 2025/3/8
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@Schema(title = "支付终端设备参数")
|
||||
public class TerminalDeviceParam {
|
||||
|
||||
/** 主键 */
|
||||
@Null(message = "Id需要为空", groups = ValidationGroup.add.class)
|
||||
@NotNull(message = "Id不可为空", groups = ValidationGroup.edit.class)
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 终端名称 */
|
||||
@Schema(description = "终端名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 终端类型
|
||||
* @see TerminalDeviceTypeEnum
|
||||
*/
|
||||
@Schema(description = "终端类型")
|
||||
private String type;
|
||||
|
||||
/** 终端序列号 */
|
||||
@Schema(description = "终端序列号")
|
||||
private String serialNum;
|
||||
|
||||
/** 省市区编码 */
|
||||
@Schema(description = "省市区编码")
|
||||
private List<String> areaCode;
|
||||
|
||||
/** 终端发放地址 */
|
||||
@Schema(description = "终端发放地址")
|
||||
private String address;
|
||||
|
||||
/** 终端厂商名称 */
|
||||
@Schema(description = "终端厂商名称")
|
||||
private String companyName;
|
||||
|
||||
/** 发放日期 */
|
||||
@Schema(description = "发放日期")
|
||||
private LocalDate putDate;
|
||||
|
||||
/** 支持终端定位 */
|
||||
@Schema(description = "支持终端定位")
|
||||
private Boolean gps;
|
||||
|
||||
/** 终端机具型号 */
|
||||
@Schema(description = "终端机具型号")
|
||||
private String machineType;
|
||||
|
||||
/**
|
||||
* 经度,浮点型, 小数点后最多保留6位
|
||||
*/
|
||||
@Schema(description = "经度,浮点型, 小数点后最多保留6位")
|
||||
private String longitude;
|
||||
/**
|
||||
* 纬度,浮点型,小数点后最多保留6位
|
||||
*/
|
||||
@Schema(description = "纬度,浮点型,小数点后最多保留6位")
|
||||
private String latitude;
|
||||
|
||||
/** 设备 IP 地址 */
|
||||
@Schema(description = "设备 IP 地址")
|
||||
private String ip;
|
||||
|
||||
/** 银行卡受理终端产品入网认证编号 */
|
||||
@Schema(description = "银行卡受理终端产品入网认证编号")
|
||||
private String networkLicense;
|
||||
|
||||
@NotBlank(message = "商户AppId不能为空")
|
||||
@Schema(description = "商户应用AppId")
|
||||
private String appId;
|
||||
}
|
@@ -0,0 +1,45 @@
|
||||
package org.dromara.daxpay.service.param.termina;
|
||||
|
||||
import cn.bootx.platform.core.annotation.QueryParam;
|
||||
import org.dromara.daxpay.core.enums.TerminalDeviceTypeEnum;
|
||||
import org.dromara.daxpay.service.common.param.MchQuery;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 支付终端查询参数
|
||||
* @author xxm
|
||||
* @since 2025/3/8
|
||||
*/
|
||||
@QueryParam(type = QueryParam.CompareTypeEnum.LIKE)
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class TerminalDeviceQuery extends MchQuery {
|
||||
|
||||
/** 终端名称 */
|
||||
@Schema(description = "终端名称")
|
||||
private String name;
|
||||
|
||||
/** 终端编码 */
|
||||
@Schema(description = "终端编码")
|
||||
private String terminalNo;
|
||||
|
||||
/**
|
||||
* 终端类型
|
||||
* @see TerminalDeviceTypeEnum
|
||||
*/
|
||||
@Schema(description = "终端类型")
|
||||
private String type;
|
||||
|
||||
/** 终端序列号 */
|
||||
@Schema(description = "终端序列号")
|
||||
private String serialNum;
|
||||
|
||||
/** 终端机具型号 */
|
||||
@Schema(description = "终端机具型号")
|
||||
private String machineType;
|
||||
|
||||
}
|
@@ -0,0 +1,85 @@
|
||||
package org.dromara.daxpay.service.result.termina;
|
||||
|
||||
import org.dromara.daxpay.core.enums.TerminalDeviceTypeEnum;
|
||||
import org.dromara.daxpay.service.common.result.MchResult;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 支付终端设备参数
|
||||
* @author xxm
|
||||
* @since 2025/3/8
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@Schema(title = "支付终端设备参数")
|
||||
public class TerminalDeviceResult extends MchResult {
|
||||
|
||||
/** 终端名称 */
|
||||
@Schema(description = "终端名称")
|
||||
private String name;
|
||||
|
||||
/** 终端编码 */
|
||||
@Schema(description = "终端编码")
|
||||
private String terminalNo;
|
||||
|
||||
/**
|
||||
* 终端类型
|
||||
* @see TerminalDeviceTypeEnum
|
||||
*/
|
||||
@Schema(description = "终端类型")
|
||||
private String type;
|
||||
|
||||
/** 终端序列号 */
|
||||
@Schema(description = "终端序列号")
|
||||
private String serialNum;
|
||||
|
||||
/** 省市区编码 */
|
||||
@Schema(description = "省市区编码")
|
||||
private List<String> areaCode;
|
||||
|
||||
/** 终端发放地址 */
|
||||
@Schema(description = "终端发放地址")
|
||||
private String address;
|
||||
|
||||
/** 终端厂商名称 */
|
||||
@Schema(description = "终端厂商名称")
|
||||
private String companyName;
|
||||
|
||||
/** 发放日期 */
|
||||
@Schema(description = "发放日期")
|
||||
private LocalDate putDate;
|
||||
|
||||
/** 支持终端定位 */
|
||||
@Schema(description = "支持终端定位")
|
||||
private Boolean gps;
|
||||
|
||||
/** 终端机具型号 */
|
||||
@Schema(description = "终端机具型号")
|
||||
private String machineType;
|
||||
|
||||
/**
|
||||
* 经度,浮点型, 小数点后最多保留6位
|
||||
*/
|
||||
@Schema(description = "经度,浮点型, 小数点后最多保留6位")
|
||||
private String longitude;
|
||||
/**
|
||||
* 纬度,浮点型,小数点后最多保留6位
|
||||
*/
|
||||
@Schema(description = "纬度,浮点型,小数点后最多保留6位")
|
||||
private String latitude;
|
||||
|
||||
/** 设备 IP 地址 */
|
||||
@Schema(description = "设备 IP 地址")
|
||||
private String ip;
|
||||
|
||||
/** 银行卡受理终端产品入网认证编号 */
|
||||
@Schema(description = "银行卡受理终端产品入网认证编号")
|
||||
private String networkLicense;
|
||||
}
|
@@ -0,0 +1,89 @@
|
||||
package org.dromara.daxpay.service.service.assist;
|
||||
|
||||
import cn.bootx.platform.common.mybatisplus.util.MpUtil;
|
||||
import cn.bootx.platform.core.exception.DataNotExistException;
|
||||
import cn.bootx.platform.core.rest.dto.LabelValue;
|
||||
import cn.bootx.platform.core.rest.param.PageParam;
|
||||
import cn.bootx.platform.core.rest.result.PageResult;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import cn.hutool.core.lang.UUID;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.dromara.daxpay.service.common.entity.MchAppBaseEntity;
|
||||
import org.dromara.daxpay.service.common.local.PaymentContextLocal;
|
||||
import org.dromara.daxpay.service.dao.assist.TerminalDeviceManager;
|
||||
import org.dromara.daxpay.service.entity.assist.TerminalDevice;
|
||||
import org.dromara.daxpay.service.param.termina.TerminalDeviceParam;
|
||||
import org.dromara.daxpay.service.param.termina.TerminalDeviceQuery;
|
||||
import org.dromara.daxpay.service.result.termina.TerminalDeviceResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 支付终端设备管理
|
||||
* @author xxm
|
||||
* @since 2025/3/7
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class TerminalDeviceService {
|
||||
private final TerminalDeviceManager terminalManager;
|
||||
private final PaymentAssistService paymentAssistService;
|
||||
|
||||
/**
|
||||
* 分页
|
||||
*/
|
||||
public PageResult<TerminalDeviceResult> page(PageParam pageParam, TerminalDeviceQuery query){
|
||||
return MpUtil.toPageResult(terminalManager.page(pageParam, query));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询详情
|
||||
*/
|
||||
public TerminalDeviceResult findById(Long id){
|
||||
return terminalManager.findById(id).map(TerminalDevice::toResult)
|
||||
.orElseThrow(() -> new DataNotExistException("支付终端设备不存在"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
public void add(TerminalDeviceParam param){
|
||||
paymentAssistService.initMchAndApp(param.getAppId());
|
||||
var mchApp = PaymentContextLocal.get().getMchAppInfo();
|
||||
String uuid = UUID.fastUUID().toString(true);
|
||||
TerminalDevice entity = TerminalDevice.init(param);
|
||||
entity.setTerminalNo(uuid)
|
||||
.setAppId(mchApp.getAppId())
|
||||
.setMchNo(mchApp.getMchNo());
|
||||
terminalManager.save(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
public void edit(TerminalDeviceParam param){
|
||||
var entity = terminalManager.findById(param.getId()).orElseThrow(() -> new DataNotExistException("支付终端设备不存在"));
|
||||
BeanUtil.copyProperties(param, entity, CopyOptions.create().ignoreNullValue());
|
||||
terminalManager.updateById(entity);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
public void delete(Long id){
|
||||
terminalManager.deleteById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 终端下拉列表
|
||||
*/
|
||||
public List<LabelValue> dropdown(String appId) {
|
||||
return terminalManager.findAllByField(MchAppBaseEntity::getAppId, appId).stream()
|
||||
.map(o -> new LabelValue(o.getName(), o.getTerminalNo()))
|
||||
.toList();
|
||||
}
|
||||
}
|
@@ -14,7 +14,7 @@
|
||||
<artifactId>daxpay-open</artifactId>
|
||||
<version>3.0.0.beta5</version>
|
||||
<packaging>pom</packaging>
|
||||
<description>多商户支付核心功能实现</description>
|
||||
<description>开源版支付核心功能实现</description>
|
||||
|
||||
<modules>
|
||||
<module>daxpay-open-core</module>
|
||||
|
@@ -16,12 +16,12 @@ services:
|
||||
# 上传文件目录
|
||||
- ./data/files/:/data/files
|
||||
environment:
|
||||
# mysql数据库连接地址
|
||||
- MYSQL_URL=jdbc:mysql://127.0.0.1:3306/dax-pay-single?serverTimezone=GMT%2B8&characterEncoding=utf8&allowMultiQueries=true&useSSL=false&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
|
||||
# mysql数据库账号
|
||||
- MYSQL_USERNAME=root
|
||||
# mysql数据库密码
|
||||
- MYSQL_PASSWORD=root
|
||||
# pgsql数据库连接地址
|
||||
- DB_URL=jdbc:pgsql://127.0.0.1:3306/dax-pay-single?serverTimezone=GMT%2B8&characterEncoding=utf8&allowMultiQueries=true&useSSL=false&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
|
||||
# pgsql数据库账号
|
||||
- DB_USER=root
|
||||
# pgsql数据库密码
|
||||
- DB_PASSWORD=root
|
||||
# Redis 连接地址
|
||||
- REDIS_HOST=127.0.0.1
|
||||
# Redis 端口
|
||||
@@ -35,4 +35,4 @@ services:
|
||||
# 是否启用超级管理员登录, 正式环境不要开启
|
||||
- DAXPAY_ENABLE_ADMIN=true
|
||||
# 用户管理列表中是否显示超级管理员
|
||||
- DAXPAY_ADMIN-IN-LIST=true
|
||||
- DAXPAY_ADMIN_IN_LIST=true
|
||||
|
Reference in New Issue
Block a user