feat SQL更新, 调整支付订单不存在异常, 添加分账订单查询测试类

This commit is contained in:
DaxPay
2024-06-03 21:08:36 +08:00
parent 389497b55f
commit 4be042bc46
41 changed files with 4552 additions and 128 deletions

View File

@@ -0,0 +1,287 @@
SET FOREIGN_KEY_CHECKS = 0;
INSERT INTO `base_dict` (`id`, `code`, `name`, `enable`, `group_tag`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797179034383134720, 'TradeFlowRecordType', '交易流水记录类型', b'1', '支付', '', 1399985191002447872, '2024-06-02 16:10:46', 1399985191002447872, '2024-06-02 16:10:46', 0, 0);
INSERT INTO `base_dict_item` (`id`, `dict_id`, `dict_code`, `code`, `name`, `enable`, `sort_no`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1795722875761156096, 1780163691808391168, 'AllocDetailResult', 'ignore', '忽略分账', b'1', 3.00, '', 1399985191002447872, '2024-05-29 15:44:31', 1399985191002447872, '2024-05-29 15:44:31', 0, 0);
INSERT INTO `base_dict_item` (`id`, `dict_id`, `dict_code`, `code`, `name`, `enable`, `sort_no`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1795722956774137856, 1777697358802530304, 'AllocOrderStatus', 'ignore', '忽略分账', b'1', 7.00, '', 1399985191002447872, '2024-05-29 15:44:50', 1399985191002447872, '2024-05-29 15:44:50', 0, 0);
INSERT INTO `base_dict_item` (`id`, `dict_id`, `dict_code`, `code`, `name`, `enable`, `sort_no`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1795730634367918080, 1751603996496453632, 'PaymentType', 'transfer', '转账', b'1', 3.00, '', 1399985191002447872, '2024-05-29 16:15:21', 1399985191002447872, '2024-05-29 16:15:21', 0, 0);
INSERT INTO `base_dict_item` (`id`, `dict_id`, `dict_code`, `code`, `name`, `enable`, `sort_no`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1795730676084465664, 1751603996496453632, 'PaymentType', 'allocation', '分账', b'1', 4.00, '', 1399985191002447872, '2024-05-29 16:15:31', 1399985191002447872, '2024-05-29 16:15:31', 0, 0);
INSERT INTO `base_dict_item` (`id`, `dict_id`, `dict_code`, `code`, `name`, `enable`, `sort_no`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797179153430065152, 1797179034383134720, 'TradeFlowRecordType', 'pay', '支付', b'1', 0.00, '', 1399985191002447872, '2024-06-02 16:11:15', 1399985191002447872, '2024-06-02 16:11:15', 0, 0);
INSERT INTO `base_dict_item` (`id`, `dict_id`, `dict_code`, `code`, `name`, `enable`, `sort_no`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797179194613936128, 1797179034383134720, 'TradeFlowRecordType', 'refund', '退款', b'1', 1.00, '', 1399985191002447872, '2024-06-02 16:11:25', 1399985191002447872, '2024-06-02 16:11:25', 0, 0);
INSERT INTO `base_dict_item` (`id`, `dict_id`, `dict_code`, `code`, `name`, `enable`, `sort_no`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797524426741882880, 1761434095349624832, 'ClientNoticeType', 'allocation', '分账', b'1', 3.00, '', 1399985191002447872, '2024-06-03 15:03:14', 1399985191002447872, '2024-06-03 15:03:14', 0, 0);
UPDATE `base_dict_item` SET `dict_id` = 1777697358802530304, `dict_code` = 'AllocOrderStatus', `code` = 'waiting', `name` = '待分账', `enable` = b'1', `sort_no` = 1.00, `remark` = '', `creator` = 1399985191002447872, `create_time` = '2024-04-09 22:10:53', `last_modifier` = 1399985191002447872, `last_modified_time` = '2024-05-29 15:45:15', `deleted` = 1, `version` = 0 WHERE `id` = 1777700713809522688;
UPDATE `base_dict_item` SET `dict_id` = 1777697358802530304, `dict_code` = 'AllocOrderStatus', `code` = 'finish', `name` = '完结', `enable` = b'1', `sort_no` = 5.00, `remark` = '', `creator` = 1399985191002447872, `create_time` = '2024-04-09 22:11:30', `last_modifier` = 1399985191002447872, `last_modified_time` = '2024-05-29 15:46:08', `deleted` = 0, `version` = 2 WHERE `id` = 1777700870613577728;
UPDATE `base_dict_item` SET `dict_id` = 1777697358802530304, `dict_code` = 'AllocOrderStatus', `code` = 'finish_failed', `name` = '完结失败', `enable` = b'1', `sort_no` = 6.00, `remark` = '', `creator` = 1399985191002447872, `create_time` = '2024-04-09 22:11:53', `last_modifier` = 1399985191002447872, `last_modified_time` = '2024-05-29 15:45:51', `deleted` = 0, `version` = 2 WHERE `id` = 1777700964087836672;
INSERT INTO `iam_perm_menu` (`id`, `client_code`, `parent_id`, `title`, `name`, `perm_code`, `effect`, `icon`, `hidden`, `hide_children_in_menu`, `component`, `component_name`, `path`, `redirect`, `sort_no`, `menu_type`, `leaf`, `keep_alive`, `target_outside`, `hidden_header_content`, `internal`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (1582633196587261952, 'dax-pay', 1582276341792985088, '代码生成', 'CodeGenList', NULL, b'0', '', b'0', b'0', '/modules/develop/codegen/CodeGenList.vue', NULL, '/develop/codegen', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1414143554414059520, '2022-10-19 15:22:13', 1414143554414059520, '2022-10-19 15:23:17', 1, 0);
INSERT INTO `iam_perm_menu` (`id`, `client_code`, `parent_id`, `title`, `name`, `perm_code`, `effect`, `icon`, `hidden`, `hide_children_in_menu`, `component`, `component_name`, `path`, `redirect`, `sort_no`, `menu_type`, `leaf`, `keep_alive`, `target_outside`, `hidden_header_content`, `internal`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (1582633307786649600, 'dax-pay', 1582276341792985088, '动态表单', 'DynamicFormList', NULL, b'0', '', b'0', b'0', '/modules/develop/dynamicform/DynamicFormList.vue', NULL, '/develop/form', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1414143554414059520, '2022-10-19 15:22:39', 1414143554414059520, '2022-10-19 15:22:39', 0, 0);
INSERT INTO `iam_perm_menu` (`id`, `client_code`, `parent_id`, `title`, `name`, `perm_code`, `effect`, `icon`, `hidden`, `hide_children_in_menu`, `component`, `component_name`, `path`, `redirect`, `sort_no`, `menu_type`, `leaf`, `keep_alive`, `target_outside`, `hidden_header_content`, `internal`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (1582633620321017856, 'dax-pay', 1582276341792985088, '动态数据源', 'DynamicDataSourceList', NULL, b'0', '', b'0', b'0', '/modules/develop/dynamicsource/DynamicDataSourceList.vue', NULL, '/develop/source', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1414143554414059520, '2022-10-19 15:23:54', 1414143554414059520, '2022-10-19 15:23:54', 0, 0);
INSERT INTO `iam_perm_menu` (`id`, `client_code`, `parent_id`, `title`, `name`, `perm_code`, `effect`, `icon`, `hidden`, `hide_children_in_menu`, `component`, `component_name`, `path`, `redirect`, `sort_no`, `menu_type`, `leaf`, `keep_alive`, `target_outside`, `hidden_header_content`, `internal`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (1629039360928075776, 'dax-pay', 1582276341792985088, '可视化大屏', 'ProjectInfoList', NULL, b'0', '', b'0', b'0', '/modules/develop/report/ProjectInfoList', NULL, '/develop/report', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1414143554414059520, '2023-02-24 16:43:44', 1399985191002447872, '2024-05-09 19:26:57', 1, 1);
INSERT INTO `iam_perm_menu` (`id`, `client_code`, `parent_id`, `title`, `name`, `perm_code`, `effect`, `icon`, `hidden`, `hide_children_in_menu`, `component`, `component_name`, `path`, `redirect`, `sort_no`, `menu_type`, `leaf`, `keep_alive`, `target_outside`, `hidden_header_content`, `internal`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (1635274568758435840, 'dax-pay', 1582276341792985088, '数据集管理', 'DataResultSqlList', NULL, b'0', '', b'0', b'0', '/modules/develop/dataresult/DataResultSqlList', NULL, '/develop/dataresult', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1414143554414059520, '2023-03-13 21:40:14', 1399985191002447872, '2024-05-09 19:27:24', 3, 1);
INSERT INTO `iam_perm_menu` (`id`, `client_code`, `parent_id`, `title`, `name`, `perm_code`, `effect`, `icon`, `hidden`, `hide_children_in_menu`, `component`, `component_name`, `path`, `redirect`, `sort_no`, `menu_type`, `leaf`, `keep_alive`, `target_outside`, `hidden_header_content`, `internal`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (1689181991598997504, 'dax-pay', 1582253152903843840, '敏感词管理', 'ChinaWord', NULL, b'0', '', b'0', b'0', '/modules/baseapi/chianword/ChinaWordList.vue', NULL, '/system/config/chinaword', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1414143554414059520, '2023-08-09 15:49:05', 1414143554414059520, '2023-08-09 15:49:05', 0, 0);
INSERT INTO `iam_perm_menu` (`id`, `client_code`, `parent_id`, `title`, `name`, `perm_code`, `effect`, `icon`, `hidden`, `hide_children_in_menu`, `component`, `component_name`, `path`, `redirect`, `sort_no`, `menu_type`, `leaf`, `keep_alive`, `target_outside`, `hidden_header_content`, `internal`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (1690324070514782208, 'dax-pay', 1582276341792985088, '通用模板', 'GeneralTemplateList', NULL, b'0', '', b'0', b'0', '/modules/develop/template/GeneralTemplateList', NULL, '/develop/template', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1414143554414059520, '2023-08-12 19:27:18', 1414143554414059520, '2023-08-12 19:31:26', 3, 0);
INSERT INTO `iam_perm_menu` (`id`, `client_code`, `parent_id`, `title`, `name`, `perm_code`, `effect`, `icon`, `hidden`, `hide_children_in_menu`, `component`, `component_name`, `path`, `redirect`, `sort_no`, `menu_type`, `leaf`, `keep_alive`, `target_outside`, `hidden_header_content`, `internal`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (1703665090038800384, 'dax-pay', 1582276341792985088, '在线SQL', 'SqlQueryInfo', NULL, b'0', '', b'0', b'0', '/modules/develop/query/SqlQueryInfo', NULL, '/develop/sqlquery', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1414143554414059520, '2023-09-18 14:59:45', 1399985191002447872, '2024-05-09 19:27:29', 0, 1);
INSERT INTO `iam_perm_menu` (`id`, `client_code`, `parent_id`, `title`, `name`, `perm_code`, `effect`, `icon`, `hidden`, `hide_children_in_menu`, `component`, `component_name`, `path`, `redirect`, `sort_no`, `menu_type`, `leaf`, `keep_alive`, `target_outside`, `hidden_header_content`, `internal`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (1797178029448867840, 'dax-pay', 1744643265142165504, '交易流水', 'TradeFlowRecordList', NULL, b'0', '', b'0', b'0', 'payment/record/flow/TradeFlowRecordList', NULL, '/pay/record/flow', '', 0, 1, NULL, b'1', b'0', b'0', b'0', NULL, 1399985191002447872, '2024-06-02 16:06:47', 1399985191002447872, '2024-06-02 16:06:47', 0, 0);
UPDATE `iam_perm_menu` SET `client_code` = 'dax-pay', `parent_id` = 1775089099078553600, `title` = '分账订单', `name` = 'AllocationOrderList', `perm_code` = NULL, `effect` = b'0', `icon` = '', `hidden` = b'0', `hide_children_in_menu` = b'0', `component` = 'payment/allocation/order/AllocationOrderList', `component_name` = NULL, `path` = '/pay/allocation/order', `redirect` = '', `sort_no` = -1, `menu_type` = 1, `leaf` = NULL, `keep_alive` = b'1', `target_outside` = b'0', `hidden_header_content` = b'0', `internal` = b'0', `remark` = NULL, `creator` = 1399985191002447872, `create_time` = '2024-04-09 21:21:53', `last_modifier` = 1399985191002447872, `last_modified_time` = '2024-05-31 11:16:55', `version` = 5, `deleted` = 0 WHERE `id` = 1777688382748700672;
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066176, 'PayNoticeReceiverController#wechatPayNotice', '微信消息通知', 'POST', '/callback/notice/wechat', '执法通道网关消息通知', b'1', b'1', '执法通道网关消息通知 微信消息通知', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066177, 'AllocationReceiverController#existsByReceiverNo', '编码是否存在', 'GET', '/allocation/receiver/existsByReceiverNo', '分账接收方控制器', b'1', b'1', '分账接收方控制器 编码是否存在', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066178, 'UniAllocationController#start', '发起分账接口', 'POST', '/unipay/allocation/start', '分账控制器', b'1', b'1', '分账控制器 发起分账接口', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066179, 'UniPayController#transfer', '统一转账接口', 'POST', '/unipay/transfer', '统一支付接口', b'1', b'1', '统一支付接口 统一转账接口', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066180, 'UniQueryController#transferOrder', '转账订单查询接口', 'POST', '/unipay/query/transferOrder', '统一查询接口', b'1', b'1', '统一查询接口 转账订单查询接口', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066181, 'AllocationGroupController#existsByGroupNo', '编码是否存在', 'GET', '/allocation/group/existsByGroupNo', '分账组', b'1', b'1', '分账组 编码是否存在', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066182, 'UniQueryController#queryPayOrder', '支付订单查询接口', 'POST', '/unipay/query/payOrder', '统一查询接口', b'1', b'1', '统一查询接口 支付订单查询接口', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066183, 'UniQueryController#queryAllocationOrder', '分账订单查询接口', 'POST', '/unipay/query/allocationOrder', '统一查询接口', b'1', b'1', '统一查询接口 分账订单查询接口', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066184, 'AllocationOrderController#findByAllocNo', '查询扩展信息', 'GET', '/order/allocation/findByAllocNo', '分账订单控制器', b'1', b'1', '分账订单控制器 查询扩展信息', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066185, 'UniAllocationController#receiverAdd', '分账接收方添加接口', 'POST', '/unipay/allocation/receiver/add', '分账控制器', b'1', b'1', '分账控制器 分账接收方添加接口', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066186, 'UniPaySyncController#allocation', '分账同步接口', 'POST', '/unipay/sync/allocation', '统一同步接口', b'1', b'1', '统一同步接口 分账同步接口', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066187, 'UniReconcileController#down', '下载指定日期的资金流水', 'POST', '/unipay/reconcile/pay', '对账接口处理器', b'1', b'1', '对账接口处理器 下载指定日期的资金流水', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066188, 'RefundOrderController#findByRefundNo', '查询退款订单详情', 'GET', '/order/refund/findByRefundNo', '支付退款控制器', b'1', b'1', '支付退款控制器 查询退款订单详情', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066189, 'TradeFlowRecordController#findById', '查询单条', 'GET', '/record/flow/findById', '交易流水记录控制器', b'1', b'1', '交易流水记录控制器 查询单条', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066190, 'ClientNoticeReceiveController#allocation', '分账消息(对象)', 'POST', '/demo/callback/allocationObject', '回调测试', b'1', b'1', '回调测试 分账消息(对象)', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066191, 'UniPaySyncController#pay', '支付同步接口', 'POST', '/unipay/sync/pay', '统一同步接口', b'1', b'1', '统一同步接口 支付同步接口', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066192, 'UniPaySyncController#refund', '退款同步接口', 'POST', '/unipay/sync/refund', '统一同步接口', b'1', b'1', '统一同步接口 退款同步接口', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066193, 'UniPaySyncController#transfer', '转账同步接口', 'POST', '/unipay/sync/transfer', '统一同步接口', b'1', b'1', '统一同步接口 转账同步接口', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066194, 'ClientNoticeReceiveController#allocation', '分账消息', 'POST', '/demo/callback/allocation', '回调测试', b'1', b'1', '回调测试 分账消息', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066195, 'UniQueryController#queryAllocReceive', '分账接收方查询接口', 'POST', '/unipay/query/allocationReceiver', '统一查询接口', b'1', b'1', '统一查询接口 分账接收方查询接口', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066196, 'UniAllocationController#finish', '分账完结接口', 'POST', '/unipay/allocation/finish', '分账控制器', b'1', b'1', '分账控制器 分账完结接口', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066197, 'PayNoticeReceiverController#aliPayNotice', '支付宝消息通知', 'POST', '/callback/notice/alipay', '执法通道网关消息通知', b'1', b'1', '执法通道网关消息通知 支付宝消息通知', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066198, 'UniQueryController#queryRefundOrder', '退款订单查询接口', 'POST', '/unipay/query/refundOrder', '统一查询接口', b'1', b'1', '统一查询接口 退款订单查询接口', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066199, 'TradeFlowRecordController#page', '分页查询', 'GET', '/record/flow/page', '交易流水记录控制器', b'1', b'1', '交易流水记录控制器 分页查询', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
INSERT INTO `iam_perm_path` (`id`, `code`, `name`, `request_type`, `path`, `group_name`, `enable`, `generate`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `deleted`, `version`) VALUES (1797521957446066200, 'UniAllocationController#receiverRemove', '分账接收方删除接口', 'POST', '/unipay/allocation/receiver/remove', '分账控制器', b'1', b'1', '分账控制器 分账接收方删除接口', 1399985191002447872, '2024-06-03 14:53:25.655000', 1399985191002447872, '2024-06-03 14:53:25.655000', b'0', 0);
UPDATE `iam_perm_path` SET `code` = 'AllocationReceiverController#removeByGateway', `name` = '从三方支付系统中删除', `request_type` = 'POST', `path` = '/allocation/receiver/removeByGateway', `group_name` = '分账接收方控制器', `enable` = b'1', `generate` = b'1', `remark` = '分账接收方控制器 从三方支付系统中删除', `creator` = 1399985191002447872, `create_time` = '2024-05-13 19:16:54.069000', `last_modifier` = 1399985191002447872, `last_modified_time` = '2024-06-03 14:53:25.723000', `deleted` = b'1', `version` = 0 WHERE `id` = 1789978117562556420;
UPDATE `iam_perm_path` SET `code` = 'UniQueryController#queryRefundOrder', `name` = '退款订单查询接口', `request_type` = 'POST', `path` = '/uni/query/refundOrder', `group_name` = '统一查询接口', `enable` = b'1', `generate` = b'1', `remark` = '统一查询接口 退款订单查询接口', `creator` = 1399985191002447872, `create_time` = '2024-05-13 19:16:54.069000', `last_modifier` = 1399985191002447872, `last_modified_time` = '2024-06-03 14:53:25.723000', `deleted` = b'1', `version` = 0 WHERE `id` = 1789978117562556426;
UPDATE `iam_perm_path` SET `code` = 'UniPayController#syncPay', `name` = '支付同步接口', `request_type` = 'POST', `path` = '/unipay/syncPay', `group_name` = '统一支付接口', `enable` = b'1', `generate` = b'1', `remark` = '统一支付接口 支付同步接口', `creator` = 1399985191002447872, `create_time` = '2024-05-13 19:16:54.070000', `last_modifier` = 1399985191002447872, `last_modified_time` = '2024-06-03 14:53:25.723000', `deleted` = b'1', `version` = 0 WHERE `id` = 1789978117566750722;
UPDATE `iam_perm_path` SET `code` = 'PayGatewayNoticeController#wechatPayNotice', `name` = '微信消息通知', `request_type` = 'POST', `path` = '/gateway/notice/wechat', `group_name` = '三方支付网关消息通知', `enable` = b'1', `generate` = b'1', `remark` = '三方支付网关消息通知 微信消息通知', `creator` = 1399985191002447872, `create_time` = '2024-05-13 19:16:54.070000', `last_modifier` = 1399985191002447872, `last_modified_time` = '2024-06-03 14:53:25.723000', `deleted` = b'1', `version` = 0 WHERE `id` = 1789978117566750736;
UPDATE `iam_perm_path` SET `code` = 'AllocationReceiverController#registerByGateway', `name` = '同步到三方支付系统中', `request_type` = 'POST', `path` = '/allocation/receiver/registerByGateway', `group_name` = '分账接收方控制器', `enable` = b'1', `generate` = b'1', `remark` = '分账接收方控制器 同步到三方支付系统中', `creator` = 1399985191002447872, `create_time` = '2024-05-13 19:16:54.070000', `last_modifier` = 1399985191002447872, `last_modified_time` = '2024-06-03 14:53:25.723000', `deleted` = b'1', `version` = 0 WHERE `id` = 1789978117566750740;
UPDATE `iam_perm_path` SET `code` = 'RefundOrderController#findByRefundNo', `name` = '查询退款订单详情', `request_type` = 'GET', `path` = '/order/refund/findByOrderNo', `group_name` = '支付退款控制器', `enable` = b'1', `generate` = b'1', `remark` = '支付退款控制器 查询退款订单详情', `creator` = 1399985191002447872, `create_time` = '2024-05-13 19:16:54.070000', `last_modifier` = 1399985191002447872, `last_modified_time` = '2024-06-03 14:53:25.723000', `deleted` = b'1', `version` = 0 WHERE `id` = 1789978117566750763;
UPDATE `iam_perm_path` SET `code` = 'UniQueryController#queryPayOrder', `name` = '支付订单查询接口', `request_type` = 'POST', `path` = '/uni/query/payOrder', `group_name` = '统一查询接口', `enable` = b'1', `generate` = b'1', `remark` = '统一查询接口 支付订单查询接口', `creator` = 1399985191002447872, `create_time` = '2024-05-13 19:16:54.070000', `last_modifier` = 1399985191002447872, `last_modified_time` = '2024-06-03 14:53:25.723000', `deleted` = b'1', `version` = 0 WHERE `id` = 1789978117566750771;
UPDATE `iam_perm_path` SET `code` = 'UniPayController#syncRefund', `name` = '退款同步接口', `request_type` = 'POST', `path` = '/unipay/syncRefund', `group_name` = '统一支付接口', `enable` = b'1', `generate` = b'1', `remark` = '统一支付接口 退款同步接口', `creator` = 1399985191002447872, `create_time` = '2024-05-13 19:16:54.070000', `last_modifier` = 1399985191002447872, `last_modified_time` = '2024-06-03 14:53:25.723000', `deleted` = b'1', `version` = 0 WHERE `id` = 1789978117566750798;
UPDATE `iam_perm_path` SET `code` = 'UniPayController#allocation', `name` = '开启分账接口', `request_type` = 'POST', `path` = '/unipay/allocation', `group_name` = '统一支付接口', `enable` = b'1', `generate` = b'1', `remark` = '统一支付接口 开启分账接口', `creator` = 1399985191002447872, `create_time` = '2024-05-13 19:16:54.070000', `last_modifier` = 1399985191002447872, `last_modified_time` = '2024-06-03 14:53:25.722000', `deleted` = b'1', `version` = 0 WHERE `id` = 1789978117566750833;
UPDATE `iam_perm_path` SET `code` = 'PayGatewayNoticeController#aliPayNotice', `name` = '支付宝消息通知', `request_type` = 'POST', `path` = '/gateway/notice/alipay', `group_name` = '三方支付网关消息通知', `enable` = b'1', `generate` = b'1', `remark` = '三方支付网关消息通知 支付宝消息通知', `creator` = 1399985191002447872, `create_time` = '2024-05-13 19:16:54.071000', `last_modifier` = 1399985191002447872, `last_modified_time` = '2024-06-03 14:53:25.722000', `deleted` = b'1', `version` = 0 WHERE `id` = 1789978117570945107;
UPDATE `iam_perm_path` SET `code` = 'AllocationReceiverController#update', `name` = '修改', `request_type` = 'POST', `path` = '/allocation/receiver/update', `group_name` = '分账接收方控制器', `enable` = b'1', `generate` = b'1', `remark` = '分账接收方控制器 修改', `creator` = 1399985191002447872, `create_time` = '2024-05-13 19:16:54.071000', `last_modifier` = 1399985191002447872, `last_modified_time` = '2024-06-03 14:53:25.722000', `deleted` = b'1', `version` = 0 WHERE `id` = 1789978117570945181;
UPDATE `iam_perm_path` SET `code` = 'UniPayController#allocationFinish', `name` = '分账完结接口', `request_type` = 'POST', `path` = '/unipay/allocationFinish', `group_name` = '统一支付接口', `enable` = b'1', `generate` = b'1', `remark` = '统一支付接口 分账完结接口', `creator` = 1399985191002447872, `create_time` = '2024-05-13 19:16:54.071000', `last_modifier` = 1399985191002447872, `last_modified_time` = '2024-06-03 14:53:25.716000', `deleted` = b'1', `version` = 0 WHERE `id` = 1789978117570945220;
INSERT INTO `iam_role_menu` (`id`, `role_id`, `client_code`, `permission_id`) VALUES (1797522085254897664, 1757297023118462976, 'dax-pay', 1797178029448867840);
INSERT INTO `iam_role_menu` (`id`, `role_id`, `client_code`, `permission_id`) VALUES (1797522085414281216, 1757298887092326400, 'dax-pay', 1797178029448867840);
DELETE FROM `iam_role_path` WHERE `id` = 1789979321814343710;
DELETE FROM `iam_role_path` WHERE `id` = 1789979321814343757;
DELETE FROM `iam_role_path` WHERE `id` = 1789979321814343761;
DELETE FROM `iam_role_path` WHERE `id` = 1789979321814343763;
DELETE FROM `iam_role_path` WHERE `id` = 1789979321814343784;
DELETE FROM `iam_role_path` WHERE `id` = 1789979321814343785;
DELETE FROM `iam_role_path` WHERE `id` = 1789979322187636766;
DELETE FROM `iam_role_path` WHERE `id` = 1789979322187636813;
DELETE FROM `iam_role_path` WHERE `id` = 1789979322187636817;
DELETE FROM `iam_role_path` WHERE `id` = 1789979322187636819;
DELETE FROM `iam_role_path` WHERE `id` = 1789979322187636840;
DELETE FROM `iam_role_path` WHERE `id` = 1789979322187636841;
DELETE FROM `iam_role_path` WHERE `id` = 1790355320001957888;
DELETE FROM `iam_role_path` WHERE `id` = 1790355320001957889;
DELETE FROM `iam_role_path` WHERE `id` = 1790355320001957890;
DELETE FROM `iam_role_path` WHERE `id` = 1790355320001957891;
DELETE FROM `iam_role_path` WHERE `id` = 1790355320001957892;
DELETE FROM `iam_role_path` WHERE `id` = 1790355320102621184;
DELETE FROM `iam_role_path` WHERE `id` = 1790355320102621185;
DELETE FROM `iam_role_path` WHERE `id` = 1790355320102621186;
DELETE FROM `iam_role_path` WHERE `id` = 1790355320102621187;
DELETE FROM `iam_role_path` WHERE `id` = 1790355320102621188;
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797522413752786944, 1757297023118462976, 1797521957446066199);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797522413752786945, 1757297023118462976, 1797521957446066189);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797522413752786946, 1757297023118462976, 1797521957446066197);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797522413752786947, 1757297023118462976, 1797521957446066176);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797522413752786948, 1757297023118462976, 1797521957446066187);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797522723091095552, 1757298887092326400, 1797521957446066199);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797522723091095553, 1757298887092326400, 1797521957446066189);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797522723091095554, 1757298887092326400, 1797521957446066197);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797522723091095555, 1757298887092326400, 1797521957446066176);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797522723091095556, 1757298887092326400, 1797521957446066187);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797523038569865216, 1757297023118462976, 1797521957446066184);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797523038569865217, 1757297023118462976, 1797521957446066181);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797523038733443072, 1757298887092326400, 1797521957446066184);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797523038733443073, 1757298887092326400, 1797521957446066181);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797523166064123904, 1757297023118462976, 1797521957446066177);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797523166223507456, 1757298887092326400, 1797521957446066177);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797523263875293184, 1757297023118462976, 1789978117570945272);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797523263875293185, 1757297023118462976, 1789978117570945194);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797523263875293186, 1757297023118462976, 1789978117570945175);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797523263875293187, 1757297023118462976, 1789978117570945164);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797523263875293188, 1757297023118462976, 1789978117566750801);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797523264022093824, 1757298887092326400, 1789978117570945272);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797523264022093825, 1757298887092326400, 1789978117570945194);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797523264022093826, 1757298887092326400, 1789978117570945175);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797523264022093827, 1757298887092326400, 1789978117570945164);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797523264022093828, 1757298887092326400, 1789978117566750801);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797523482968956928, 1757297023118462976, 1797521957446066188);
INSERT INTO `iam_role_path` (`id`, `role_id`, `permission_id`) VALUES (1797523483111563264, 1757298887092326400, 1797521957446066188);
DELETE FROM `pay_api_config` WHERE `id` = 1;
DELETE FROM `pay_api_config` WHERE `id` = 3;
DELETE FROM `pay_api_config` WHERE `id` = 4;
DELETE FROM `pay_api_config` WHERE `id` = 6;
DELETE FROM `pay_api_config` WHERE `id` = 7;
DELETE FROM `pay_api_config` WHERE `id` = 8;
DELETE FROM `pay_api_config` WHERE `id` = 9;
DELETE FROM `pay_api_config` WHERE `id` = 10;
DELETE FROM `pay_api_config` WHERE `id` = 11;
DELETE FROM `pay_api_config` WHERE `id` = 12;
DELETE FROM `pay_api_config` WHERE `id` = 13;
INSERT INTO `pay_api_config` (`id`, `code`, `api`, `name`, `notice_support`, `enable`, `notice`, `notice_url`, `req_sign`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (100, 'pay', '/unipay/pay', '统一支付接口 ', b'1', b'1', b'1', 'http://pay1.bootx.cn/server/demo/callback/payObject', b'1', NULL, 0, '2024-01-03 14:25:48', 1399985191002447872, '2024-03-11 17:31:41', 11, b'0');
INSERT INTO `pay_api_config` (`id`, `code`, `api`, `name`, `notice_support`, `enable`, `notice`, `notice_url`, `req_sign`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (200, 'close', '/unipay/close', '支付关闭接口', b'0', b'1', b'1', NULL, b'1', NULL, 0, '2024-01-03 14:25:48', 0, '2024-01-03 14:25:53', 0, b'0');
INSERT INTO `pay_api_config` (`id`, `code`, `api`, `name`, `notice_support`, `enable`, `notice`, `notice_url`, `req_sign`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (300, 'refund', '/unipay/refund', '统一退款接口', b'1', b'1', b'1', 'http://pay1.bootx.cn/server/demo/callback/refundObject', b'1', NULL, 0, '2024-01-03 14:25:48', 1399985191002447872, '2024-05-16 21:59:19', 7, b'0');
INSERT INTO `pay_api_config` (`id`, `code`, `api`, `name`, `notice_support`, `enable`, `notice`, `notice_url`, `req_sign`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (400, 'allocation', '/unipay/allocation/start', '统一分账接口', b'1', b'1', b'1', 'http://pay1.bootx.cn/server/demo/callback/allocationObject', b'1', NULL, 0, '2024-01-03 14:25:48', 1399985191002447872, '2024-05-30 19:36:35', 1, b'0');
INSERT INTO `pay_api_config` (`id`, `code`, `api`, `name`, `notice_support`, `enable`, `notice`, `notice_url`, `req_sign`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (450, 'allocationFinish', '/unipay/allocation/finish', '分账完结接口', b'0', b'1', b'1', NULL, b'1', NULL, 0, '2024-01-03 14:25:48', 0, '2024-01-03 14:25:53', 0, b'0');
INSERT INTO `pay_api_config` (`id`, `code`, `api`, `name`, `notice_support`, `enable`, `notice`, `notice_url`, `req_sign`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (451, 'allocationReceiverAdd', '/unipay/allocation/receiver/add', '分账接收方添加接口', b'0', b'1', b'0', NULL, b'1', NULL, 0, '2024-01-03 14:25:48', 0, '2024-01-03 14:25:53', 0, b'0');
INSERT INTO `pay_api_config` (`id`, `code`, `api`, `name`, `notice_support`, `enable`, `notice`, `notice_url`, `req_sign`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (452, 'allocationReceiverRemove', '/unipay/allocation/receiver/remove', '分账接收方删除接口', b'0', b'1', b'0', NULL, b'1', NULL, 0, '2024-01-03 14:25:48', 0, '2024-01-03 14:25:53', 0, b'0');
INSERT INTO `pay_api_config` (`id`, `code`, `api`, `name`, `notice_support`, `enable`, `notice`, `notice_url`, `req_sign`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (500, 'transfer', '/unipay/transfer', '统一转账接口', b'1', b'1', b'1', NULL, b'1', NULL, 0, '2024-01-03 14:25:48', 0, '2024-01-03 14:25:53', 0, b'0');
INSERT INTO `pay_api_config` (`id`, `code`, `api`, `name`, `notice_support`, `enable`, `notice`, `notice_url`, `req_sign`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (600, 'syncPay', '/unipay/sync/pay', '支付同步接口', b'0', b'1', b'1', NULL, b'1', NULL, 0, '2024-01-03 14:25:48', 0, '2024-01-03 14:25:53', 0, b'0');
INSERT INTO `pay_api_config` (`id`, `code`, `api`, `name`, `notice_support`, `enable`, `notice`, `notice_url`, `req_sign`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (700, 'syncRefund', '/unipay/sync/refund', '退款同步接口', b'0', b'1', b'1', NULL, b'1', NULL, 0, '2024-01-03 14:25:48', 0, '2024-01-03 14:25:53', 0, b'0');
INSERT INTO `pay_api_config` (`id`, `code`, `api`, `name`, `notice_support`, `enable`, `notice`, `notice_url`, `req_sign`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (801, 'syncTransfer', '/unipay/sync/transfer', '转账同步接口', b'0', b'1', b'1', NULL, b'1', NULL, 0, '2024-01-03 14:25:48', 0, '2024-01-03 14:25:53', 0, b'0');
INSERT INTO `pay_api_config` (`id`, `code`, `api`, `name`, `notice_support`, `enable`, `notice`, `notice_url`, `req_sign`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (805, 'syncAllocation', '/unipay/sync/allocation', '分账同步接口', b'0', b'1', b'1', NULL, b'1', NULL, 0, '2024-01-03 14:25:48', 0, '2024-01-03 14:25:53', 0, b'0');
INSERT INTO `pay_api_config` (`id`, `code`, `api`, `name`, `notice_support`, `enable`, `notice`, `notice_url`, `req_sign`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (1000, 'queryPayOrder', '/unipay/query/payOrder', '支付订单查询接口', b'0', b'1', b'0', NULL, b'1', NULL, 0, '2024-01-03 14:25:48', 0, '2024-01-03 14:25:53', 0, b'0');
INSERT INTO `pay_api_config` (`id`, `code`, `api`, `name`, `notice_support`, `enable`, `notice`, `notice_url`, `req_sign`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (1100, 'queryRefundOrder', '/unipay/query/refundOrder', '退款订单查询接口', b'0', b'1', b'0', NULL, b'1', NULL, 0, '2024-01-03 14:25:48', 0, '2024-01-03 14:25:53', 0, b'0');
INSERT INTO `pay_api_config` (`id`, `code`, `api`, `name`, `notice_support`, `enable`, `notice`, `notice_url`, `req_sign`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (1150, 'queryAllocationOrder', '/unipay/query/allocationOrder', '分账订单查询接口', b'0', b'1', b'0', NULL, b'1', NULL, 0, '2024-01-03 14:25:48', 0, '2024-01-03 14:25:53', 0, b'0');
INSERT INTO `pay_api_config` (`id`, `code`, `api`, `name`, `notice_support`, `enable`, `notice`, `notice_url`, `req_sign`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (1175, 'queryAllocationReceiver', '/unipay/query/allocationReceiver', '分账接收方查询接口', b'0', b'1', b'0', NULL, b'1', NULL, 0, '2024-01-03 14:25:48', 0, '2024-01-03 14:25:53', 0, b'0');
INSERT INTO `pay_api_config` (`id`, `code`, `api`, `name`, `notice_support`, `enable`, `notice`, `notice_url`, `req_sign`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (1176, 'queryTransferOrder', '/unipay/query/transferOrder', '转账订单查询接口', b'0', b'1', b'0', NULL, b'1', NULL, 0, '2024-01-03 14:25:48', 0, '2024-01-03 14:25:53', 0, b'0');
INSERT INTO `pay_api_config` (`id`, `code`, `api`, `name`, `notice_support`, `enable`, `notice`, `notice_url`, `req_sign`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (1200, 'getWxAuthUrl', '/unipay/assist/getWxAuthUrl', '获取微信OAuth2授权链接', b'0', b'1', b'0', NULL, b'1', NULL, 0, '2024-01-03 14:25:48', 0, '2024-01-03 14:25:53', 0, b'0');
INSERT INTO `pay_api_config` (`id`, `code`, `api`, `name`, `notice_support`, `enable`, `notice`, `notice_url`, `req_sign`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (1300, 'getWxAccessToken', '/unipay/assist/getWxAccessToken', '获取微信AccessToken', b'0', b'1', b'0', NULL, b'1', NULL, 0, '2024-01-03 14:25:48', 0, '2024-01-03 14:25:53', 0, b'0');
INSERT INTO `starter_quartz_job` (`id`, `name`, `job_class_name`, `cron`, `parameter`, `state`, `remark`, `creator`, `create_time`, `last_modifier`, `last_modified_time`, `version`, `deleted`) VALUES (1797588916837670912, '支付单超时检测(数据库)', 'cn.daxpay.single.service.task.PayExpiredByDbTimeTask', '0/20 * * * * ? *', '', 0, '检测超时的支付单, 超时后调用同步事件状态修复', 1399985191002447872, '2024-06-03 19:19:30', 1399985191002447872, '2024-06-03 19:22:28', 5, 0);
UPDATE `starter_quartz_job` SET `name` = '支付单超时检测(Redis)', `job_class_name` = 'cn.daxpay.single.service.task.PayExpiredTimeTask', `cron` = '0/5 * * * * ? *', `parameter` = NULL, `state` = 0, `remark` = '检测超时的支付单, 超时后调用同步事件状态修复', `creator` = 1399985191002447872, `create_time` = '2022-07-12 22:00:39', `last_modifier` = 1399985191002447872, `last_modified_time` = '2024-06-03 19:18:14', `version` = 9, `deleted` = 0 WHERE `id` = 1546857070483939328;
SET FOREIGN_KEY_CHECKS = 1;

View File

@@ -0,0 +1,85 @@
SET FOREIGN_KEY_CHECKS=0;
ALTER TABLE `iam_perm_menu`
CHANGE COLUMN `admin` `internal` bit(1) NOT NULL COMMENT '系统菜单' AFTER `hidden_header_content`;
ALTER TABLE `pay_allocation_group` ADD COLUMN `group_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分账组编码' AFTER `id`;
ALTER TABLE `pay_allocation_group` MODIFY COLUMN `default_group` bit(1) NULL DEFAULT NULL COMMENT '默认分账组' AFTER `channel`;
ALTER TABLE `pay_allocation_order` MODIFY COLUMN `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '支付订单标题' AFTER `out_order_no`;
ALTER TABLE `pay_allocation_order` MODIFY COLUMN `result` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '处理结果' AFTER `status`;
ALTER TABLE `pay_allocation_order_detail` ADD COLUMN `receiver_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分账接收方编号' AFTER `receiver_id`;
CREATE TABLE `pay_allocation_order_extra` (
`id` bigint(20) NOT NULL COMMENT '主键',
`notify_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '异步通知地址',
`attach` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商户扩展参数',
`req_time` datetime NULL DEFAULT NULL COMMENT '请求时间,传输时间戳',
`client_ip` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '支付终端ip',
`creator` bigint(20) NULL DEFAULT NULL COMMENT '创建者ID',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`last_modifier` bigint(20) NULL DEFAULT NULL COMMENT '最后修者ID',
`last_modified_time` datetime NULL DEFAULT NULL COMMENT '最后修改时间',
`version` int(11) NOT NULL COMMENT '乐观锁',
`deleted` bit(1) NOT NULL COMMENT '删除标志',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '分账订单扩展' ROW_FORMAT = Dynamic;
ALTER TABLE `pay_allocation_receiver` ADD COLUMN `receiver_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分账接收方编号' AFTER `id`;
ALTER TABLE `pay_allocation_receiver` DROP COLUMN `name`;
ALTER TABLE `pay_allocation_receiver` DROP COLUMN `sync`;
ALTER TABLE `pay_allocation_receiver` DROP COLUMN `remark`;
ALTER TABLE `pay_api_config` DROP COLUMN `res_sign`;
ALTER TABLE `pay_api_config` DROP COLUMN `notice_sign`;
ALTER TABLE `pay_api_config` DROP COLUMN `record`;
CREATE TABLE `pay_reconcile_out_trade` (
`id` bigint(20) NOT NULL COMMENT '主键',
`reconcile_id` bigint(20) NULL DEFAULT NULL COMMENT '关联对账订单ID',
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商品名称',
`amount` int(11) NULL DEFAULT NULL COMMENT '交易金额',
`type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '交易类型',
`trade_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '本地交易号',
`out_trade_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '通道交易号',
`trade_time` datetime NULL DEFAULT NULL COMMENT '交易时间',
`creator` bigint(20) NULL DEFAULT NULL COMMENT '创建者ID',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '对账-通道交易明细' ROW_FORMAT = Dynamic;
ALTER TABLE `pay_refund_order` MODIFY COLUMN `out_order_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '通道支付订单号' AFTER `biz_order_no`;
ALTER TABLE `pay_refund_order` MODIFY COLUMN `out_refund_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '通道退款交易号' AFTER `biz_refund_no`;
CREATE TABLE `pay_trade_flow_record` (
`id` bigint(20) NOT NULL COMMENT '主键',
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '标题',
`amount` int(11) NULL DEFAULT NULL COMMENT '金额',
`type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '业务类型',
`channel` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '支付通道',
`trade_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '本地交易号',
`biz_trade_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商户交易号',
`out_trade_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '通道交易号',
`creator` bigint(20) NULL DEFAULT NULL COMMENT '创建者ID',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '资金流水记录' ROW_FORMAT = Dynamic;
ALTER TABLE `pay_union_pay_config` MODIFY COLUMN `single_limit` int(11) NULL DEFAULT NULL COMMENT '支付限额' AFTER `seller`;
ALTER TABLE `pay_wechat_pay_config` MODIFY COLUMN `allocation` bit(1) NULL DEFAULT NULL COMMENT '是否支付分账' AFTER `sandbox`;
ALTER TABLE `pay_wechat_pay_config` MODIFY COLUMN `single_limit` int(11) NULL DEFAULT NULL COMMENT '支付限额' AFTER `pay_ways`;
DROP TABLE IF EXISTS `pay_reconcile_trade_detail`;
SET FOREIGN_KEY_CHECKS=1;

3860
_config/mysql/dax-pay.sql Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,2 +0,0 @@
ALTER TABLE `iam_perm_menu`
CHANGE COLUMN `admin` `internal` bit(1) NOT NULL COMMENT '系统菜单' AFTER `hidden_header_content`;

View File

@@ -6,8 +6,6 @@
- 新增: 分账发起、完结、同步功能支持接口调用 - 新增: 分账发起、完结、同步功能支持接口调用
- 新增: 支持自动分账和手动发起分账两种 - 新增: 支持自动分账和手动发起分账两种
- 新增: 分账通知发送功能 - 新增: 分账通知发送功能
- 新增:
- 新增:
- 优化: 对超时订单进行处理(数据库定时同步) - 优化: 对超时订单进行处理(数据库定时同步)
- 优化: 订单金额小于0.01元直接忽略不进行分账,增加新状态, - 优化: 订单金额小于0.01元直接忽略不进行分账,增加新状态,
- 优化: 优化签名注解和上下文初始化注解切面 - 优化: 优化签名注解和上下文初始化注解切面

View File

@@ -1,34 +1,8 @@
## 单商户 ## 单商户
2.0.7: 账完善和基础架构优化 2.0.8: 账完善和系统优化
- [x] 新增资金流水 - [ ] 细分各种支付异常类和编码
- [x] 增加对超时订单进行处理(数据库同步) - [ ] 修复功能支付/退款/对账
- [x] 支持分账组分账和自己传接收方进行分账 - [ ] 增加转账接口功能
- [x] 分账提供接口调用
- [x] 添加分账接收方
- [x] 查询分账接收方
- [x] 删除分账接收方
- [x] 启动分账
- [x] 自定义比例分账
- [x] 默认分账组分账
- [x] 指定分账组分账
- [x] 分账查询
- [x] 分账完结
- [x] 分账同步
- [x] 保存分账同步记录
- [x] SDK支持分账相关接口
- [x] 分账重试支持完结失败
- [x] 分账通知发送功能
- [x] 分账支持手动和自动分账两种
- [x] 金额过小不进行分账, 增加新状态, 金额小于0.01元直接忽略
- [x] 优化签名注解和上下文初始化注解切面
- [x] 对账差异单, 数据不一致处理异常, 本地待对账订单类型记录错误
- [x] 订单超时任务注册任务错误id改为订单号
- [x] 系统中金额分转元精度异常问题
- [x] 同步回调处理参数订单号接收失败
- [x] 支付和退款消息签名值不一致问题
- [x] 分账发起时错误的使用订单号作为分账号
2.0.7: 对账完善和系统优化
- [ ] DEMO增加获取微信OpenID和支付宝OpenId功能 - [ ] DEMO增加获取微信OpenID和支付宝OpenId功能
- [ ] 管理端界面支持扫码绑定对账接收方功能 - [ ] 管理端界面支持扫码绑定对账接收方功能
- [ ] 对账提供外部接口调用 - [ ] 对账提供外部接口调用

View File

@@ -86,7 +86,7 @@
<lock4j.version>2.2.5</lock4j.version> <lock4j.version>2.2.5</lock4j.version>
<ip2region.version>2.7.0</ip2region.version> <ip2region.version>2.7.0</ip2region.version>
<sms4j.version>2.2.0</sms4j.version> <sms4j.version>2.2.0</sms4j.version>
<table-modify.version>1.5.4</table-modify.version> <table-modify.version>1.5.5</table-modify.version>
</properties> </properties>
<!-- 项目依赖版本管理 --> <!-- 项目依赖版本管理 -->

View File

@@ -127,7 +127,7 @@ public class CashierService {
PayOrderModel data = execute.getData(); PayOrderModel data = execute.getData();
// todo 暂时先这样处理聚合支付的查询,后续需要替换为异常码判断响应状态 // todo 暂时先这样处理聚合支付的查询,后续需要替换为异常码判断响应状态
if (Objects.equals(data.getMsg(),"未查询到支付订单")){ if (Objects.equals(data.getMsg(),"支付订单不存在")){
return false; return false;
} }
String status = data.getStatus(); String status = data.getStatus();

View File

@@ -0,0 +1,54 @@
package cn.daxpay.single.sdk.model.allocation;
import cn.daxpay.single.sdk.code.AllocDetailResultEnum;
import cn.daxpay.single.sdk.code.AllocReceiverTypeEnum;
import lombok.Data;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
/**
* 分账订单明细
* @author xxm
* @since 2024/5/21
*/
@Data
@Accessors(chain = true)
public class AllocOrderDetailModel {
/** 分账接收方编号 */
private String receiverNo;
/** 分账金额 */
private Integer amount;
/** 分账比例 万分之多少 */
private Integer rate;
/**
* 分账接收方类型
* @see AllocReceiverTypeEnum
*/
private String receiverType;
/** 接收方账号 */
private String receiverAccount;
/** 接收方姓名 */
private String receiverName;
/**
* 分账结果
* @see AllocDetailResultEnum
*/
private String result;
/** 错误代码 */
private String errorCode;
/** 错误原因 */
private String errorMsg;
/** 分账完成时间 */
private LocalDateTime finishTime;
}

View File

@@ -0,0 +1,81 @@
package cn.daxpay.single.sdk.model.allocation;
import cn.daxpay.single.sdk.code.AllocOrderResultEnum;
import cn.daxpay.single.sdk.code.AllocOrderStatusEnum;
import cn.daxpay.single.sdk.code.PayChannelEnum;
import cn.daxpay.single.sdk.net.DaxPayResponseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
import java.util.List;
/**
* 分账订单返回结果
* @author xxm
* @since 2024/5/21
*/
@EqualsAndHashCode(callSuper = true)
@Data
@Accessors(chain = true)
public class AllocOrderModel extends DaxPayResponseModel {
/** 分账单号 */
private String allocationNo;
/** 商户分账单号 */
private String bizAllocationNo;
/** 通道分账号 */
private String outAllocationNo;
/** 支付订单号 */
private String orderNo;
/** 商户支付订单号 */
private String bizOrderNo;
/** 通道支付订单号 */
private String outOrderNo;
/** 支付订单标题 */
private String title;
/**
* 所属通道
* @see PayChannelEnum
*/
private String channel;
/** 总分账金额 */
private Integer amount;
/** 分账描述 */
private String description;
/**
* 状态
* @see AllocOrderStatusEnum
*/
private String status;
/**
* 处理结果
* @see AllocOrderResultEnum
*/
private String result;
/** 错误码 */
private String errorCode;
/** 错误信息 */
private String errorMsg;
/** 分账订单完成时间 */
private LocalDateTime finishTime;
/** 分账明细 */
private List<AllocOrderDetailModel> details;
}

View File

@@ -37,6 +37,4 @@ public class AllocReceiverRemoveParam extends DaxPayRequest<AllocReceiverRemoveM
public DaxPayResult<AllocReceiverRemoveModel> toModel(String json) { public DaxPayResult<AllocReceiverRemoveModel> toModel(String json) {
return JSONUtil.toBean(json, new TypeReference<DaxPayResult<AllocReceiverRemoveModel>>() {}, false); return JSONUtil.toBean(json, new TypeReference<DaxPayResult<AllocReceiverRemoveModel>>() {}, false);
} }
} }

View File

@@ -0,0 +1,41 @@
package cn.daxpay.single.sdk.param.allocation;
import cn.daxpay.single.sdk.model.allocation.AllocOrderModel;
import cn.daxpay.single.sdk.net.DaxPayRequest;
import cn.daxpay.single.sdk.response.DaxPayResult;
import cn.hutool.core.lang.TypeReference;
import cn.hutool.json.JSONUtil;
import lombok.Getter;
import lombok.Setter;
/**
* 分账订单查询参数
* @author xxm
* @since 2024/6/3
*/
@Getter
@Setter
public class QueryAllocOrderParam extends DaxPayRequest<AllocOrderModel> {
/** 分账单号 */
private String allocationNo;
/** 商户分账单号 */
private String bizAllocationNo;
/**
* 方法请求路径
*/
@Override
public String path() {
return "/unipay/query/allocationOrder";
}
/**
* 将请求返回结果反序列化为实体类
*/
@Override
public DaxPayResult<AllocOrderModel> toModel(String json) {
return JSONUtil.toBean(json, new TypeReference<DaxPayResult<AllocOrderModel>>() {}, false);
}
}

View File

@@ -0,0 +1,59 @@
package cn.daxpay.single.sdk.query;
import cn.daxpay.single.sdk.code.PayChannelEnum;
import cn.daxpay.single.sdk.code.SignTypeEnum;
import cn.daxpay.single.sdk.model.allocation.AllocOrderModel;
import cn.daxpay.single.sdk.model.allocation.AllocReceiversModel;
import cn.daxpay.single.sdk.net.DaxPayConfig;
import cn.daxpay.single.sdk.net.DaxPayKit;
import cn.daxpay.single.sdk.param.allocation.QueryAllocOrderParam;
import cn.daxpay.single.sdk.param.allocation.QueryAllocReceiverParam;
import cn.daxpay.single.sdk.response.DaxPayResult;
import cn.hutool.json.JSONUtil;
import org.junit.Before;
import org.junit.Test;
/**
* 查询分账订单测试类
* @author xxm
* @since 2024/6/3
*/
public class QueryAllocOrderTest {
@Before
public void init() {
// 初始化支付配置
DaxPayConfig config = DaxPayConfig.builder()
.serviceUrl("http://127.0.0.1:9000")
.signSecret("123456")
.signType(SignTypeEnum.HMAC_SHA256)
.build();
DaxPayKit.initConfig(config);
}
/**
* 分账订单查询
*/
@Test
public void queryAllocOrder() {
QueryAllocOrderParam param = new QueryAllocOrderParam();
param.setAllocationNo("DEVA240602000243630000101");
param.setClientIp("127.0.0.1");
DaxPayResult<AllocOrderModel> execute = DaxPayKit.execute(param);
System.out.println(JSONUtil.toJsonStr(execute));
}
/**
* 分账接收方
*/
@Test
public void queryAllocReceiver() {
QueryAllocReceiverParam param = new QueryAllocReceiverParam();
param.setChannel(PayChannelEnum.ALI.getCode());
param.setClientIp("127.0.0.1");
DaxPayResult<AllocReceiversModel> execute = DaxPayKit.execute(param);
System.out.println(JSONUtil.toJsonStr(execute));
}
}

View File

@@ -8,7 +8,7 @@ import cn.bootx.platform.common.core.util.ValidationUtil;
import cn.daxpay.single.service.core.order.reconcile.service.ReconcileDiffService; import cn.daxpay.single.service.core.order.reconcile.service.ReconcileDiffService;
import cn.daxpay.single.service.core.order.reconcile.service.ReconcileQueryService; import cn.daxpay.single.service.core.order.reconcile.service.ReconcileQueryService;
import cn.daxpay.single.service.core.payment.reconcile.service.ReconcileService; import cn.daxpay.single.service.core.payment.reconcile.service.ReconcileService;
import cn.daxpay.single.service.dto.order.reconcile.ReconcileTradeDetailDto; import cn.daxpay.single.service.dto.order.reconcile.ReconcileOutTradeDto;
import cn.daxpay.single.service.dto.order.reconcile.ReconcileDiffDto; import cn.daxpay.single.service.dto.order.reconcile.ReconcileDiffDto;
import cn.daxpay.single.service.dto.order.reconcile.ReconcileOrderDto; import cn.daxpay.single.service.dto.order.reconcile.ReconcileOrderDto;
import cn.daxpay.single.service.param.reconcile.*; import cn.daxpay.single.service.param.reconcile.*;
@@ -101,13 +101,13 @@ public class ReconcileOrderController {
@Operation(summary = "对账明细分页") @Operation(summary = "对账明细分页")
@GetMapping("/detail/page") @GetMapping("/detail/page")
public ResResult<PageResult<ReconcileTradeDetailDto>> pageDetail(PageParam pageParam, ReconcileTradeDetailQuery query){ public ResResult<PageResult<ReconcileOutTradeDto>> pageDetail(PageParam pageParam, ReconcileTradeDetailQuery query){
return Res.ok(reconcileQueryService.pageDetail(pageParam, query)); return Res.ok(reconcileQueryService.pageDetail(pageParam, query));
} }
@Operation(summary = "对账明细详情") @Operation(summary = "对账明细详情")
@GetMapping("/detail/findById") @GetMapping("/detail/findById")
public ResResult<ReconcileTradeDetailDto> findDetailById(Long id){ public ResResult<ReconcileOutTradeDto> findDetailById(Long id){
return Res.ok(reconcileQueryService.findDetailById(id)); return Res.ok(reconcileQueryService.findDetailById(id));
} }

View File

@@ -23,21 +23,15 @@ import java.util.List;
@Schema(title = "分账订单返回结果") @Schema(title = "分账订单返回结果")
public class AllocOrderResult extends PaymentCommonResult { public class AllocOrderResult extends PaymentCommonResult {
/** /** 分账单号 */
* 分账单号
*/
@Schema(description = "分账单号") @Schema(description = "分账单号")
private String allocationNo; private String allocationNo;
/** /** 商户分账单号 */
* 商户分账单号
*/
@Schema(description = "商户分账单号") @Schema(description = "商户分账单号")
private String bizAllocationNo; private String bizAllocationNo;
/** /** 通道分账号 */
* 通道分账号
*/
@Schema(description = "通道分账号") @Schema(description = "通道分账号")
private String outAllocationNo; private String outAllocationNo;
@@ -47,12 +41,13 @@ public class AllocOrderResult extends PaymentCommonResult {
@Schema(description = "支付订单号") @Schema(description = "支付订单号")
private String orderNo; private String orderNo;
/** /** 商户支付订单号 */
* 商户支付订单号
*/
@Schema(description = "商户支付订单号") @Schema(description = "商户支付订单号")
private String bizOrderNo; private String bizOrderNo;
/** 通道支付订单号 */
@Schema(description = "通道支付订单号")
private String outOrderNo;
/** /**
* 支付订单标题 * 支付订单标题
@@ -109,11 +104,6 @@ public class AllocOrderResult extends PaymentCommonResult {
@Schema(description = "分账订单完成时间") @Schema(description = "分账订单完成时间")
private LocalDateTime finishTime; private LocalDateTime finishTime;
/** 商户扩展参数,回调时会原样返回 */
@Schema(description = "商户扩展参数,回调时会原样返回")
private String attach;
/** 分账明细 */ /** 分账明细 */
@Schema(description = "分账明细") @Schema(description = "分账明细")
private List<AllocOrderDetailResult> details; private List<AllocOrderDetailResult> details;

View File

@@ -21,7 +21,7 @@ import java.util.Objects;
* @since 2024/4/16 * @since 2024/4/16
*/ */
@IgnoreAuth @IgnoreAuth
@Tag(name = "执法通道网关消息通知") @Tag(name = "支付通道网关消息通知")
@RestController @RestController
@RequestMapping("/callback/notice") @RequestMapping("/callback/notice")
@RequiredArgsConstructor @RequiredArgsConstructor

View File

@@ -84,5 +84,4 @@ public class UniQueryController {
return DaxRes.ok(allocationReceiverService.queryAllocReceive(param)); return DaxRes.ok(allocationReceiverService.queryAllocReceive(param));
} }
} }

View File

@@ -13,7 +13,7 @@ import lombok.Getter;
public enum ClientNoticeTypeEnum { public enum ClientNoticeTypeEnum {
PAY("pay", "支付通知"), PAY("pay", "支付通知"),
REFUND("refund", "退款通知"), REFUND("refund", "退款通知"),
ALLOCATION("Allocation", "分账通知"), ALLOCATION("allocation", "分账通知"),
; ;
private final String type; private final String type;

View File

@@ -1,6 +1,6 @@
package cn.daxpay.single.service.common.context; package cn.daxpay.single.service.common.context;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileTradeDetail; import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOutTrade;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOrder; import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOrder;
import lombok.Data; import lombok.Data;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
@@ -20,6 +20,6 @@ public class ReconcileLocal {
private ReconcileOrder reconcileOrder; private ReconcileOrder reconcileOrder;
/** 通用支付对账记录 */ /** 通用支付对账记录 */
private List<ReconcileTradeDetail> reconcileTradeDetails; private List<ReconcileOutTrade> reconcileTradeDetails;
} }

View File

@@ -14,7 +14,7 @@ import cn.daxpay.single.service.core.channel.alipay.entity.AliReconcileBillTotal
import cn.daxpay.single.service.core.order.reconcile.dao.ReconcileFileManager; import cn.daxpay.single.service.core.order.reconcile.dao.ReconcileFileManager;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileFile; import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileFile;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOrder; import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOrder;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileTradeDetail; import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOutTrade;
import cn.daxpay.single.util.PayUtil; import cn.daxpay.single.util.PayUtil;
import cn.hutool.core.date.DatePattern; import cn.hutool.core.date.DatePattern;
import cn.hutool.core.io.IoUtil; import cn.hutool.core.io.IoUtil;
@@ -164,7 +164,7 @@ public class AliPayReconcileService {
* 转换为通用对账记录对象 * 转换为通用对账记录对象
*/ */
private void convertAndSave(List<AliReconcileBillDetail> billDetails){ private void convertAndSave(List<AliReconcileBillDetail> billDetails){
List<ReconcileTradeDetail> collect = billDetails.stream() List<ReconcileOutTrade> collect = billDetails.stream()
.map(this::convert) .map(this::convert)
.collect(Collectors.toList()); .collect(Collectors.toList());
// 写入到上下文中 // 写入到上下文中
@@ -174,12 +174,12 @@ public class AliPayReconcileService {
/** /**
* 转换为通用对账记录对象 * 转换为通用对账记录对象
*/ */
private ReconcileTradeDetail convert(AliReconcileBillDetail billDetail){ private ReconcileOutTrade convert(AliReconcileBillDetail billDetail){
// 金额 // 金额
int amount = PayUtil.convertCentAmount(new BigDecimal(billDetail.getOrderAmount())); int amount = PayUtil.convertCentAmount(new BigDecimal(billDetail.getOrderAmount()));
// 默认为支付对账记录 // 默认为支付对账记录
ReconcileTradeDetail reconcileTradeDetail = new ReconcileTradeDetail() ReconcileOutTrade reconcileTradeDetail = new ReconcileOutTrade()
.setReconcileId(billDetail.getReconcileId()) .setReconcileId(billDetail.getReconcileId())
.setTradeNo(billDetail.getOutTradeNo()) .setTradeNo(billDetail.getOutTradeNo())
.setType(ReconcileTradeEnum.PAY.getCode()) .setType(ReconcileTradeEnum.PAY.getCode())

View File

@@ -11,7 +11,7 @@ import cn.daxpay.single.service.common.local.PaymentContextLocal;
import cn.daxpay.single.service.core.channel.union.dao.UnionReconcileBillDetailManager; import cn.daxpay.single.service.core.channel.union.dao.UnionReconcileBillDetailManager;
import cn.daxpay.single.service.core.channel.union.entity.UnionReconcileBillDetail; import cn.daxpay.single.service.core.channel.union.entity.UnionReconcileBillDetail;
import cn.daxpay.single.service.core.order.reconcile.dao.ReconcileFileManager; import cn.daxpay.single.service.core.order.reconcile.dao.ReconcileFileManager;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileTradeDetail; import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOutTrade;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileFile; import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileFile;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOrder; import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOrder;
import cn.daxpay.single.service.sdk.union.api.UnionPayKit; import cn.daxpay.single.service.sdk.union.api.UnionPayKit;
@@ -152,7 +152,7 @@ public class UnionPayReconcileService {
* 转换为通用对账记录对象 * 转换为通用对账记录对象
*/ */
private void convertAndSave(List<UnionReconcileBillDetail> billDetails){ private void convertAndSave(List<UnionReconcileBillDetail> billDetails){
List<ReconcileTradeDetail> collect = billDetails.stream() List<ReconcileOutTrade> collect = billDetails.stream()
.map(this::convert) .map(this::convert)
// 只处理支付和退款的对账记录 // 只处理支付和退款的对账记录
.filter(Objects::nonNull) .filter(Objects::nonNull)
@@ -164,7 +164,7 @@ public class UnionPayReconcileService {
/** /**
* 转换为通用对账记录对象 * 转换为通用对账记录对象
*/ */
private ReconcileTradeDetail convert(UnionReconcileBillDetail billDetail){ private ReconcileOutTrade convert(UnionReconcileBillDetail billDetail){
ReconcileOrder reconcileOrder = PaymentContextLocal.get() ReconcileOrder reconcileOrder = PaymentContextLocal.get()
.getReconcileInfo() .getReconcileInfo()
.getReconcileOrder(); .getReconcileOrder();
@@ -173,7 +173,7 @@ public class UnionPayReconcileService {
int amount = Integer.parseInt(orderAmount); int amount = Integer.parseInt(orderAmount);
// 默认为支付对账记录 // 默认为支付对账记录
ReconcileTradeDetail reconcileTradeDetail = new ReconcileTradeDetail() ReconcileOutTrade reconcileTradeDetail = new ReconcileOutTrade()
.setReconcileId(billDetail.getReconcileId()) .setReconcileId(billDetail.getReconcileId())
.setTradeNo(billDetail.getOrderId()) .setTradeNo(billDetail.getOrderId())
.setType(ReconcileTradeEnum.PAY.getCode()) .setType(ReconcileTradeEnum.PAY.getCode())

View File

@@ -14,9 +14,9 @@ import cn.daxpay.single.service.core.channel.wechat.entity.WxReconcileBillDetail
import cn.daxpay.single.service.core.channel.wechat.entity.WxReconcileBillTotal; import cn.daxpay.single.service.core.channel.wechat.entity.WxReconcileBillTotal;
import cn.daxpay.single.service.core.channel.wechat.entity.WxReconcileFundFlowDetail; import cn.daxpay.single.service.core.channel.wechat.entity.WxReconcileFundFlowDetail;
import cn.daxpay.single.service.core.order.reconcile.dao.ReconcileFileManager; import cn.daxpay.single.service.core.order.reconcile.dao.ReconcileFileManager;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOutTrade;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileFile; import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileFile;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOrder; import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOrder;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileTradeDetail;
import cn.daxpay.single.util.PayUtil; import cn.daxpay.single.util.PayUtil;
import cn.hutool.core.codec.Base64; import cn.hutool.core.codec.Base64;
import cn.hutool.core.date.DatePattern; import cn.hutool.core.date.DatePattern;
@@ -170,7 +170,7 @@ public class WechatPayReconcileService{
* 转换为通用对账记录对象 * 转换为通用对账记录对象
*/ */
public void convertAndSave(List<WxReconcileBillDetail> billDetails){ public void convertAndSave(List<WxReconcileBillDetail> billDetails){
List<ReconcileTradeDetail> collect = billDetails.stream() List<ReconcileOutTrade> collect = billDetails.stream()
.map(this::convert) .map(this::convert)
.collect(Collectors.toList()); .collect(Collectors.toList());
// 写入到上下文中 // 写入到上下文中
@@ -180,9 +180,9 @@ public class WechatPayReconcileService{
/** /**
* 转换为通用对账记录对象 * 转换为通用对账记录对象
*/ */
public ReconcileTradeDetail convert(WxReconcileBillDetail billDetail){ public ReconcileOutTrade convert(WxReconcileBillDetail billDetail){
// 默认为支付对账记录 // 默认为支付对账记录
ReconcileTradeDetail reconcileTradeDetail = new ReconcileTradeDetail() ReconcileOutTrade reconcileTradeDetail = new ReconcileOutTrade()
.setReconcileId(billDetail.getRecordOrderId()) .setReconcileId(billDetail.getRecordOrderId())
.setTradeNo(billDetail.getMchOrderNo()) .setTradeNo(billDetail.getMchOrderNo())
.setTitle(billDetail.getSubject()) .setTitle(billDetail.getSubject())

View File

@@ -85,7 +85,7 @@ public class PayOrderQueryService {
} }
// 查询支付单 // 查询支付单
PayOrder payOrder = this.findByBizOrOrderNo(param.getOrderNo(), param.getBizOrderNoeNo()) PayOrder payOrder = this.findByBizOrOrderNo(param.getOrderNo(), param.getBizOrderNoeNo())
.orElseThrow(() -> new PayFailureException("未查询到支付订单")); .orElseThrow(() -> new PayFailureException("支付订单不存在"));
// 查询扩展数据 // 查询扩展数据
payOrderExtraManager.findById(payOrder.getId()) payOrderExtraManager.findById(payOrder.getId())
.orElseThrow(() -> new PayFailureException("支付订单不完整")); .orElseThrow(() -> new PayFailureException("支付订单不完整"));

View File

@@ -1,9 +1,9 @@
package cn.daxpay.single.service.core.order.reconcile.conver; package cn.daxpay.single.service.core.order.reconcile.conver;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileTradeDetail; import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOutTrade;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileDiff; import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileDiff;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOrder; import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOrder;
import cn.daxpay.single.service.dto.order.reconcile.ReconcileTradeDetailDto; import cn.daxpay.single.service.dto.order.reconcile.ReconcileOutTradeDto;
import cn.daxpay.single.service.dto.order.reconcile.ReconcileDiffDto; import cn.daxpay.single.service.dto.order.reconcile.ReconcileDiffDto;
import cn.daxpay.single.service.dto.order.reconcile.ReconcileOrderDto; import cn.daxpay.single.service.dto.order.reconcile.ReconcileOrderDto;
import org.mapstruct.Mapper; import org.mapstruct.Mapper;
@@ -18,7 +18,7 @@ import org.mapstruct.factory.Mappers;
public interface ReconcileConvert { public interface ReconcileConvert {
ReconcileConvert CONVERT = Mappers.getMapper(ReconcileConvert.class); ReconcileConvert CONVERT = Mappers.getMapper(ReconcileConvert.class);
ReconcileTradeDetailDto convert(ReconcileTradeDetail in); ReconcileOutTradeDto convert(ReconcileOutTrade in);
ReconcileDiffDto convert(ReconcileDiff in); ReconcileDiffDto convert(ReconcileDiff in);

View File

@@ -4,7 +4,7 @@ import cn.bootx.platform.common.core.rest.param.PageParam;
import cn.bootx.platform.common.mybatisplus.impl.BaseManager; import cn.bootx.platform.common.mybatisplus.impl.BaseManager;
import cn.bootx.platform.common.mybatisplus.util.MpUtil; import cn.bootx.platform.common.mybatisplus.util.MpUtil;
import cn.bootx.platform.common.query.generator.QueryGenerator; import cn.bootx.platform.common.query.generator.QueryGenerator;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileTradeDetail; import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOutTrade;
import cn.daxpay.single.service.param.reconcile.ReconcileTradeDetailQuery; import cn.daxpay.single.service.param.reconcile.ReconcileTradeDetailQuery;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@@ -22,22 +22,22 @@ import java.util.List;
@Slf4j @Slf4j
@Repository @Repository
@RequiredArgsConstructor @RequiredArgsConstructor
public class ReconcileTradeDetailManager extends BaseManager<ReconcileTradeDetailMapper, ReconcileTradeDetail> { public class ReconcileOutTradeManager extends BaseManager<ReconcileOutTradeMapper, ReconcileOutTrade> {
/** /**
* 根据订单id查询 * 根据订单id查询
*/ */
public List<ReconcileTradeDetail> findAllByReconcileId(Long reconcileId){ public List<ReconcileOutTrade> findAllByReconcileId(Long reconcileId){
return this.findAllByField(ReconcileTradeDetail::getReconcileId, reconcileId); return this.findAllByField(ReconcileOutTrade::getReconcileId, reconcileId);
} }
/** /**
* 分页 * 分页
*/ */
public Page<ReconcileTradeDetail> page(PageParam pageParam, ReconcileTradeDetailQuery query){ public Page<ReconcileOutTrade> page(PageParam pageParam, ReconcileTradeDetailQuery query){
Page<ReconcileTradeDetail> mpPage = MpUtil.getMpPage(pageParam, ReconcileTradeDetail.class); Page<ReconcileOutTrade> mpPage = MpUtil.getMpPage(pageParam, ReconcileOutTrade.class);
QueryWrapper<ReconcileTradeDetail> generator = QueryGenerator.generator(query); QueryWrapper<ReconcileOutTrade> generator = QueryGenerator.generator(query);
return this.page(mpPage,generator); return this.page(mpPage,generator);
} }

View File

@@ -1,6 +1,6 @@
package cn.daxpay.single.service.core.order.reconcile.dao; package cn.daxpay.single.service.core.order.reconcile.dao;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileTradeDetail; import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOutTrade;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@@ -10,5 +10,5 @@ import org.apache.ibatis.annotations.Mapper;
* @since 2024/1/20 * @since 2024/1/20
*/ */
@Mapper @Mapper
public interface ReconcileTradeDetailMapper extends BaseMapper<ReconcileTradeDetail> { public interface ReconcileOutTradeMapper extends BaseMapper<ReconcileOutTrade> {
} }

View File

@@ -4,7 +4,7 @@ import cn.bootx.platform.common.core.function.EntityBaseFunction;
import cn.bootx.platform.common.mybatisplus.base.MpCreateEntity; import cn.bootx.platform.common.mybatisplus.base.MpCreateEntity;
import cn.daxpay.single.service.code.PaymentTypeEnum; import cn.daxpay.single.service.code.PaymentTypeEnum;
import cn.daxpay.single.service.core.order.reconcile.conver.ReconcileConvert; import cn.daxpay.single.service.core.order.reconcile.conver.ReconcileConvert;
import cn.daxpay.single.service.dto.order.reconcile.ReconcileTradeDetailDto; import cn.daxpay.single.service.dto.order.reconcile.ReconcileOutTradeDto;
import cn.bootx.table.modify.annotation.DbColumn; import cn.bootx.table.modify.annotation.DbColumn;
import cn.bootx.table.modify.annotation.DbTable; import cn.bootx.table.modify.annotation.DbTable;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
@@ -15,7 +15,7 @@ import lombok.experimental.Accessors;
import java.time.LocalDateTime; import java.time.LocalDateTime;
/** /**
* 对账-通道交易明细, 从三方系统下载的交易记录 * 对账通道交易明细, 从三方系统下载的交易记录
* @author xxm * @author xxm
* @since 2024/1/18 * @since 2024/1/18
*/ */
@@ -23,8 +23,8 @@ import java.time.LocalDateTime;
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
@DbTable(comment = "对账-通道交易明细") @DbTable(comment = "对账-通道交易明细")
@TableName("pay_reconcile_trade_detail") @TableName("pay_reconcile_out_trade")
public class ReconcileTradeDetail extends MpCreateEntity implements EntityBaseFunction<ReconcileTradeDetailDto> { public class ReconcileOutTrade extends MpCreateEntity implements EntityBaseFunction<ReconcileOutTradeDto> {
/** 关联对账订单ID */ /** 关联对账订单ID */
@DbColumn(comment = "关联对账订单ID") @DbColumn(comment = "关联对账订单ID")
@@ -59,7 +59,7 @@ public class ReconcileTradeDetail extends MpCreateEntity implements EntityBaseFu
@Override @Override
public ReconcileTradeDetailDto toDto() { public ReconcileOutTradeDto toDto() {
return ReconcileConvert.CONVERT.convert(this); return ReconcileConvert.CONVERT.convert(this);
} }
} }

View File

@@ -5,11 +5,11 @@ import cn.bootx.platform.common.core.rest.PageResult;
import cn.bootx.platform.common.core.rest.param.PageParam; import cn.bootx.platform.common.core.rest.param.PageParam;
import cn.bootx.platform.common.mybatisplus.util.MpUtil; import cn.bootx.platform.common.mybatisplus.util.MpUtil;
import cn.daxpay.single.service.core.order.reconcile.dao.ReconcileOrderManager; import cn.daxpay.single.service.core.order.reconcile.dao.ReconcileOrderManager;
import cn.daxpay.single.service.core.order.reconcile.dao.ReconcileTradeDetailManager; import cn.daxpay.single.service.core.order.reconcile.dao.ReconcileOutTradeManager;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOutTrade;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOrder; import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOrder;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileTradeDetail;
import cn.daxpay.single.service.dto.order.reconcile.ReconcileOrderDto; import cn.daxpay.single.service.dto.order.reconcile.ReconcileOrderDto;
import cn.daxpay.single.service.dto.order.reconcile.ReconcileTradeDetailDto; import cn.daxpay.single.service.dto.order.reconcile.ReconcileOutTradeDto;
import cn.daxpay.single.service.param.reconcile.ReconcileTradeDetailQuery; import cn.daxpay.single.service.param.reconcile.ReconcileTradeDetailQuery;
import cn.daxpay.single.service.param.reconcile.ReconcileOrderQuery; import cn.daxpay.single.service.param.reconcile.ReconcileOrderQuery;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@@ -26,7 +26,7 @@ import org.springframework.stereotype.Service;
@RequiredArgsConstructor @RequiredArgsConstructor
public class ReconcileQueryService { public class ReconcileQueryService {
private final ReconcileOrderManager orderManager; private final ReconcileOrderManager orderManager;
private final ReconcileTradeDetailManager detailManager; private final ReconcileOutTradeManager detailManager;
/** /**
* 分页 * 分页
@@ -44,17 +44,17 @@ public class ReconcileQueryService {
} }
/** /**
* 明细分页 * 通道交易明细分页
*/ */
public PageResult<ReconcileTradeDetailDto> pageDetail(PageParam pageParam, ReconcileTradeDetailQuery query){ public PageResult<ReconcileOutTradeDto> pageDetail(PageParam pageParam, ReconcileTradeDetailQuery query){
return MpUtil.convert2DtoPageResult(detailManager.page(pageParam, query)); return MpUtil.convert2DtoPageResult(detailManager.page(pageParam, query));
} }
/** /**
* 明细详情 * 通道交易详情
*/ */
public ReconcileTradeDetailDto findDetailById(Long id){ public ReconcileOutTradeDto findDetailById(Long id){
return detailManager.findById(id).map(ReconcileTradeDetail::toDto) return detailManager.findById(id).map(ReconcileOutTrade::toDto)
.orElseThrow(()->new DataNotExistException("对账详情不存在")); .orElseThrow(()->new DataNotExistException("对账详情不存在"));
} }
} }

View File

@@ -126,7 +126,7 @@ public class AllocationService {
allocationStrategy.allocation(); allocationStrategy.allocation();
// 执行中 // 执行中
order.setStatus(AllocOrderStatusEnum.ALLOCATION_PROCESSING.getCode()) order.setStatus(AllocOrderStatusEnum.ALLOCATION_PROCESSING.getCode())
.setResult(AllocOrderResultEnum.PART_SUCCESS.getCode()) .setResult(AllocOrderResultEnum.ALL_PENDING.getCode())
.setErrorMsg(null); .setErrorMsg(null);
} catch (Exception e) { } catch (Exception e) {
log.error("分账出现错误:", e); log.error("分账出现错误:", e);

View File

@@ -44,7 +44,7 @@ public class PayCloseService {
*/ */
public PayCloseResult close(PayCloseParam param){ public PayCloseResult close(PayCloseParam param){
PayOrder payOrder = payOrderQueryService.findByBizOrOrderNo(param.getOrderNo(), param.getBizTradeNo()) PayOrder payOrder = payOrderQueryService.findByBizOrOrderNo(param.getOrderNo(), param.getBizTradeNo())
.orElseThrow(() -> new PayFailureException("未查询到支付订单")); .orElseThrow(() -> new PayFailureException("支付订单不存在"));
LockInfo lock = lockTemplate.lock("payment:close:" + payOrder.getId(),10000, 50); LockInfo lock = lockTemplate.lock("payment:close:" + payOrder.getId(),10000, 50);
if (Objects.isNull(lock)){ if (Objects.isNull(lock)){
throw new RepetitiveOperationException("支付订单已在关闭中,请勿重复发起"); throw new RepetitiveOperationException("支付订单已在关闭中,请勿重复发起");

View File

@@ -8,9 +8,9 @@ import cn.daxpay.single.service.code.PaymentTypeEnum;
import cn.daxpay.single.service.code.ReconcileDiffTypeEnum; import cn.daxpay.single.service.code.ReconcileDiffTypeEnum;
import cn.daxpay.single.service.core.order.pay.dao.PayOrderManager; import cn.daxpay.single.service.core.order.pay.dao.PayOrderManager;
import cn.daxpay.single.service.core.order.pay.entity.PayOrder; import cn.daxpay.single.service.core.order.pay.entity.PayOrder;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOutTrade;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileDiff; import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileDiff;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOrder; import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOrder;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileTradeDetail;
import cn.daxpay.single.service.core.order.refund.dao.RefundOrderManager; import cn.daxpay.single.service.core.order.refund.dao.RefundOrderManager;
import cn.daxpay.single.service.core.order.refund.entity.RefundOrder; import cn.daxpay.single.service.core.order.refund.entity.RefundOrder;
import cn.daxpay.single.service.core.payment.reconcile.domain.GeneralTradeInfo; import cn.daxpay.single.service.core.payment.reconcile.domain.GeneralTradeInfo;
@@ -89,18 +89,18 @@ public class ReconcileAssistService {
*/ */
public List<ReconcileDiff> generateDiffRecord(ReconcileOrder reconcileOrder, public List<ReconcileDiff> generateDiffRecord(ReconcileOrder reconcileOrder,
List<GeneralTradeInfo> localTrades, List<GeneralTradeInfo> localTrades,
List<ReconcileTradeDetail> outDetails){ List<ReconcileOutTrade> outDetails){
// 差异内容 // 差异内容
List<ReconcileDiff> diffRecords = new ArrayList<>(); List<ReconcileDiff> diffRecords = new ArrayList<>();
// 三方对账订单 // 三方对账订单
Map<String, ReconcileTradeDetail> outDetailMap = outDetails.stream() Map<String, ReconcileOutTrade> outDetailMap = outDetails.stream()
.collect(Collectors.toMap(ReconcileTradeDetail::getTradeNo, Function.identity(), CollectorsFunction::retainLatest)); .collect(Collectors.toMap(ReconcileOutTrade::getTradeNo, Function.identity(), CollectorsFunction::retainLatest));
// 本地订单记录 // 本地订单记录
Map<String, GeneralTradeInfo> localTradeMap = localTrades.stream() Map<String, GeneralTradeInfo> localTradeMap = localTrades.stream()
.collect(Collectors.toMap(GeneralTradeInfo::getTradeNo, Function.identity(), CollectorsFunction::retainLatest)); .collect(Collectors.toMap(GeneralTradeInfo::getTradeNo, Function.identity(), CollectorsFunction::retainLatest));
// 对账与比对 // 对账与比对
for (ReconcileTradeDetail outDetail : outDetails) { for (ReconcileOutTrade outDetail : outDetails) {
// 判断本地有没有记录, 流水没有记录查询本地订单 // 判断本地有没有记录, 流水没有记录查询本地订单
GeneralTradeInfo localTrade = localTradeMap.get(outDetail.getTradeNo()); GeneralTradeInfo localTrade = localTradeMap.get(outDetail.getTradeNo());
if (Objects.isNull(localTrade)){ if (Objects.isNull(localTrade)){
@@ -144,7 +144,7 @@ public class ReconcileAssistService {
} }
// 本地与对账单比对, 找出本地有, 远程没有的记录 // 本地与对账单比对, 找出本地有, 远程没有的记录
for (GeneralTradeInfo localTrade : localTrades) { for (GeneralTradeInfo localTrade : localTrades) {
ReconcileTradeDetail outDetail = outDetailMap.get(localTrade.getTradeNo()); ReconcileOutTrade outDetail = outDetailMap.get(localTrade.getTradeNo());
if (Objects.isNull(outDetail)){ if (Objects.isNull(outDetail)){
ReconcileDiff diffRecord = new ReconcileDiff() ReconcileDiff diffRecord = new ReconcileDiff()
.setDiffType(ReconcileDiffTypeEnum.LOCAL_NOT_EXISTS.getCode()) .setDiffType(ReconcileDiffTypeEnum.LOCAL_NOT_EXISTS.getCode())
@@ -171,7 +171,7 @@ public class ReconcileAssistService {
* @param outDetail 下载的对账订单 * @param outDetail 下载的对账订单
* @param localTrade 本地交易订单 * @param localTrade 本地交易订单
*/ */
private List<ReconcileDiffDetail> reconcileDiff(ReconcileTradeDetail outDetail, GeneralTradeInfo localTrade){ private List<ReconcileDiffDetail> reconcileDiff(ReconcileOutTrade outDetail, GeneralTradeInfo localTrade){
List<ReconcileDiffDetail> diffs = new ArrayList<>(); List<ReconcileDiffDetail> diffs = new ArrayList<>();
// 判断类型是否相同 // 判断类型是否相同

View File

@@ -11,11 +11,11 @@ import cn.daxpay.single.service.common.local.PaymentContextLocal;
import cn.daxpay.single.service.core.order.reconcile.dao.ReconcileDiffManager; import cn.daxpay.single.service.core.order.reconcile.dao.ReconcileDiffManager;
import cn.daxpay.single.service.core.order.reconcile.dao.ReconcileFileManager; import cn.daxpay.single.service.core.order.reconcile.dao.ReconcileFileManager;
import cn.daxpay.single.service.core.order.reconcile.dao.ReconcileOrderManager; import cn.daxpay.single.service.core.order.reconcile.dao.ReconcileOrderManager;
import cn.daxpay.single.service.core.order.reconcile.dao.ReconcileTradeDetailManager; import cn.daxpay.single.service.core.order.reconcile.dao.ReconcileOutTradeManager;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOutTrade;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileDiff; import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileDiff;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileFile; import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileFile;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOrder; import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileOrder;
import cn.daxpay.single.service.core.order.reconcile.entity.ReconcileTradeDetail;
import cn.daxpay.single.service.core.order.reconcile.service.ReconcileOrderService; import cn.daxpay.single.service.core.order.reconcile.service.ReconcileOrderService;
import cn.daxpay.single.service.core.payment.reconcile.domain.GeneralTradeInfo; import cn.daxpay.single.service.core.payment.reconcile.domain.GeneralTradeInfo;
import cn.daxpay.single.service.core.payment.reconcile.factory.ReconcileStrategyFactory; import cn.daxpay.single.service.core.payment.reconcile.factory.ReconcileStrategyFactory;
@@ -65,7 +65,7 @@ public class ReconcileService {
private final ReconcileOrderManager reconcileOrderManager; private final ReconcileOrderManager reconcileOrderManager;
private final ReconcileTradeDetailManager reconcileTradeDetailManager; private final ReconcileOutTradeManager reconcileOutTradeManager;
private final ReconcileAssistService reconcileAssistService; private final ReconcileAssistService reconcileAssistService;
@@ -122,10 +122,10 @@ public class ReconcileService {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
// 保存转换后的通用结构对账单 // 保存转换后的通用结构对账单
List<ReconcileTradeDetail> reconcileTradeDetails = PaymentContextLocal.get() List<ReconcileOutTrade> reconcileTradeDetails = PaymentContextLocal.get()
.getReconcileInfo() .getReconcileInfo()
.getReconcileTradeDetails(); .getReconcileTradeDetails();
reconcileTradeDetailManager.saveAll(reconcileTradeDetails); reconcileOutTradeManager.saveAll(reconcileTradeDetails);
} }
/** /**
@@ -153,10 +153,10 @@ public class ReconcileService {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
// 保存转换后的通用结构对账单 // 保存转换后的通用结构对账单
List<ReconcileTradeDetail> reconcileTradeDetails = PaymentContextLocal.get() List<ReconcileOutTrade> reconcileTradeDetails = PaymentContextLocal.get()
.getReconcileInfo() .getReconcileInfo()
.getReconcileTradeDetails(); .getReconcileTradeDetails();
reconcileTradeDetailManager.saveAll(reconcileTradeDetails); reconcileOutTradeManager.saveAll(reconcileTradeDetails);
} }
/** /**
* 对账单明细比对 * 对账单明细比对
@@ -181,7 +181,7 @@ public class ReconcileService {
throw new PayFailureException("对账单比对已经完成"); throw new PayFailureException("对账单比对已经完成");
} }
// 查询对账单 // 查询对账单
List<ReconcileTradeDetail> reconcileTradeDetails = reconcileTradeDetailManager.findAllByReconcileId(reconcileOrder.getId()); List<ReconcileOutTrade> reconcileTradeDetails = reconcileOutTradeManager.findAllByReconcileId(reconcileOrder.getId());
// 构建对账策略 // 构建对账策略
AbsReconcileStrategy reconcileStrategy = ReconcileStrategyFactory.create(reconcileOrder.getChannel()); AbsReconcileStrategy reconcileStrategy = ReconcileStrategyFactory.create(reconcileOrder.getChannel());
// 初始化参数 // 初始化参数
@@ -239,7 +239,7 @@ public class ReconcileService {
ReconcileOrder reconcileOrder = reconcileOrderService.findById(id) ReconcileOrder reconcileOrder = reconcileOrderService.findById(id)
.orElseThrow(() -> new DataNotExistException("未找到对账订单")); .orElseThrow(() -> new DataNotExistException("未找到对账订单"));
// 查询对账-第三方交易明细 // 查询对账-第三方交易明细
List<ReconcileTradeDetailExcel> reconcileTradeDetails = reconcileTradeDetailManager.findAllByReconcileId(reconcileOrder.getId()) List<ReconcileTradeDetailExcel> reconcileTradeDetails = reconcileOutTradeManager.findAllByReconcileId(reconcileOrder.getId())
.stream() .stream()
.map(o->{ .map(o->{
ReconcileTradeDetailExcel excel = new ReconcileTradeDetailExcel(); ReconcileTradeDetailExcel excel = new ReconcileTradeDetailExcel();

View File

@@ -15,16 +15,16 @@ import lombok.experimental.Accessors;
import java.time.LocalDateTime; import java.time.LocalDateTime;
/** /**
* 对账订单详情 * 账通道交易明细
* @author xxm * @author xxm
* @since 2024/1/22 * @since 2024/1/22
*/ */
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Data @Data
@Accessors(chain = true) @Accessors(chain = true)
@Schema(title = "对账订单详情") @Schema(title = "账通道交易明细")
@ExcelIgnoreUnannotated @ExcelIgnoreUnannotated
public class ReconcileTradeDetailDto extends BaseDto { public class ReconcileOutTradeDto extends BaseDto {
/** 关联对账订单ID */ /** 关联对账订单ID */
@Schema(description = "关联对账订单ID") @Schema(description = "关联对账订单ID")

View File

@@ -11,7 +11,7 @@ import lombok.Data;
import java.time.LocalDateTime; import java.time.LocalDateTime;
/** /**
* 对账订单详情 * 对账订单详情调导出
* @author xxm * @author xxm
* @since 2024/1/22 * @since 2024/1/22
*/ */

View File

@@ -14,7 +14,7 @@ import org.springframework.stereotype.Component;
import java.util.List; import java.util.List;
/** /**
* * 支付单超时检测(数据库)
* @author xxm * @author xxm
* @since 2024/5/17 * @since 2024/5/17
*/ */

View File

@@ -54,8 +54,8 @@ public class PayExpiredTimeTask implements Job {
paySyncParam.setOrderNo(orderNo); paySyncParam.setOrderNo(orderNo);
paySyncService.sync(paySyncParam); paySyncService.sync(paySyncParam);
} catch (Exception e) { } catch (Exception e) {
// 如果是未查询到取消支付订单, 则删除这个任务 // 如果是未查询到取消支付订单, 则删除这个任务 TODO 后续调整为专用的异常类
if (Objects.equals("未查询到支付订单", e.getMessage())){ if (Objects.equals("支付订单不存在", e.getMessage())){
repository.removeKeys(orderNo); repository.removeKeys(orderNo);
} }
log.error("超时取消任务 异常", e); log.error("超时取消任务 异常", e);

View File

@@ -34,7 +34,7 @@
<knife4j.version>4.4.0</knife4j.version> <knife4j.version>4.4.0</knife4j.version>
<mapstruct.version>1.5.3.Final</mapstruct.version> <mapstruct.version>1.5.3.Final</mapstruct.version>
<lombok-mapstruct.version>0.2.0</lombok-mapstruct.version> <lombok-mapstruct.version>0.2.0</lombok-mapstruct.version>
<table-modify.version>1.5.4</table-modify.version> <table-modify.version>1.5.5</table-modify.version>
<wxjava.version>4.6.0</wxjava.version> <wxjava.version>4.6.0</wxjava.version>
<rocketmq.version>2.2.3</rocketmq.version> <rocketmq.version>2.2.3</rocketmq.version>
<lock4j.version>2.2.5</lock4j.version> <lock4j.version>2.2.5</lock4j.version>