From 5d2d52020ea71c39294812ae3740155e2c767168 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 9 Jul 2023 12:40:26 +0800 Subject: [PATCH] =?UTF-8?q?mall=20+=20pay=EF=BC=9A=E7=AE=80=E5=8C=96=20pay?= =?UTF-8?q?=20=E7=9A=84=E5=A4=8D=E6=9D=82=E5=BA=A6=201.=20=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=20merchant=20=E8=A1=A8=E8=AE=BE=E8=AE=A1=202.=20?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=20app=20=E5=92=8C=20channel=20=E7=9A=84?= =?UTF-8?q?=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sql/mysql/menu.sql | 230 -------- sql/mysql/optional/mall.sql | 555 ------------------ sql/mysql/ruoyi-vue-pro.sql | 288 --------- .../{merchant => app}/PayAppController.java | 52 +- .../vo/app => app/vo}/PayAppBaseVO.java | 6 +- .../vo/app => app/vo}/PayAppCreateReqVO.java | 2 +- .../app => app/vo}/PayAppPageItemRespVO.java | 22 +- .../vo/app => app/vo}/PayAppPageReqVO.java | 14 +- .../vo/app => app/vo}/PayAppRespVO.java | 2 +- .../vo/app => app/vo}/PayAppUpdateReqVO.java | 2 +- .../vo}/PayAppUpdateStatusReqVO.java | 2 +- .../PayChannelController.java | 41 +- .../vo}/PayChannelBaseVO.java | 6 +- .../vo}/PayChannelCreateReqVO.java | 2 +- .../vo}/PayChannelPageReqVO.java | 14 +- .../vo}/PayChannelRespVO.java | 2 +- .../vo}/PayChannelUpdateReqVO.java | 2 +- .../admin/merchant/PayMerchantController.java | 116 ---- .../admin/merchant/vo/app/PayAppExcelVO.java | 40 -- .../merchant/vo/app/PayAppExportReqVO.java | 36 -- .../vo/channel/PayChannelExcelVO.java | 49 -- .../vo/channel/PayChannelExportReqVO.java | 39 -- .../vo/merchant/PayMerchantBaseVO.java | 29 - .../vo/merchant/PayMerchantCreateReqVO.java | 11 - .../vo/merchant/PayMerchantExcelVO.java | 40 -- .../vo/merchant/PayMerchantExportReqVO.java | 33 -- .../vo/merchant/PayMerchantPageReqVO.java | 36 -- .../vo/merchant/PayMerchantRespVO.java | 25 - .../vo/merchant/PayMerchantUpdateReqVO.java | 16 - .../PayMerchantUpdateStatusReqVO.java | 20 - .../admin/order/PayOrderController.java | 21 +- .../admin/order/vo/PayOrderBaseVO.java | 4 - .../admin/order/vo/PayOrderDetailsRespVO.java | 3 - .../admin/order/vo/PayOrderExcelVO.java | 3 - .../admin/order/vo/PayOrderExportReqVO.java | 3 - .../order/vo/PayOrderPageItemRespVO.java | 3 - .../admin/order/vo/PayOrderPageReqVO.java | 3 - .../admin/refund/PayRefundController.java | 20 +- .../admin/refund/vo/PayRefundBaseVO.java | 4 - .../refund/vo/PayRefundDetailsRespVO.java | 3 - .../admin/refund/vo/PayRefundExcelVO.java | 3 - .../admin/refund/vo/PayRefundExportReqVO.java | 3 - .../refund/vo/PayRefundPageItemRespVO.java | 3 - .../admin/refund/vo/PayRefundPageReqVO.java | 3 - .../app/channel/AppPayChannelController.java | 4 +- .../module/pay/convert/app/PayAppConvert.java | 17 +- .../convert/channel/PayChannelConvert.java | 18 +- .../convert/merchant/PayMerchantConvert.java | 32 - .../{merchant => app}/PayAppDO.java | 9 +- .../{merchant => channel}/PayChannelDO.java | 9 +- .../dataobject/merchant/PayMerchantDO.java | 54 -- .../dataobject/notify/PayNotifyTaskDO.java | 11 +- .../pay/dal/dataobject/order/PayOrderDO.java | 17 +- .../dataobject/order/PayOrderExtensionDO.java | 2 +- .../dal/dataobject/refund/PayRefundDO.java | 15 +- .../pay/dal/mysql/app/PayAppMapper.java | 24 + .../PayChannelMapper.java | 28 +- .../pay/dal/mysql/merchant/PayAppMapper.java | 53 -- .../dal/mysql/merchant/PayMerchantMapper.java | 48 -- .../pay/dal/mysql/order/PayOrderMapper.java | 2 - .../pay/dal/mysql/refund/PayRefundMapper.java | 2 - .../{merchant => app}/PayAppService.java | 33 +- .../{merchant => app}/PayAppServiceImpl.java | 63 +- .../PayChannelService.java | 26 +- .../PayChannelServiceImpl.java | 38 +- .../service/merchant/PayMerchantService.java | 104 ---- .../merchant/PayMerchantServiceImpl.java | 148 ----- .../service/notify/PayNotifyServiceImpl.java | 6 +- .../service/order/PayOrderServiceImpl.java | 11 +- .../service/refund/PayRefundServiceImpl.java | 9 +- .../PayChannelMapperIntegrationTest.java | 2 - .../order/PayOrderServiceIntegrationTest.java | 4 +- .../{merchant => app}/PayAppServiceTest.java | 105 +--- .../PayChannelServiceTest.java | 92 +-- .../merchant/PayMerchantServiceTest.java | 191 ------ .../service/order/PayOrderServiceTest.java | 12 +- .../service/refund/PayRefundServiceTest.java | 12 +- yudao-ui-admin/src/api/pay/channel.js | 23 +- yudao-ui-admin/src/api/pay/merchant.js | 77 --- .../pay/app/components/aliPayChannelForm.vue | 11 +- .../pay/app/components/wechatChannelForm.vue | 11 +- yudao-ui-admin/src/views/pay/app/index.vue | 68 +-- yudao-ui-admin/src/views/pay/demo/index.vue | 1 - .../src/views/pay/merchant/index.vue | 282 --------- yudao-ui-admin/src/views/pay/order/index.vue | 47 +- yudao-ui-admin/src/views/pay/refund/index.vue | 34 +- 86 files changed, 187 insertions(+), 3379 deletions(-) delete mode 100644 sql/mysql/menu.sql delete mode 100644 sql/mysql/optional/mall.sql rename yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/{merchant => app}/PayAppController.java (68%) rename yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/{merchant/vo/app => app/vo}/PayAppBaseVO.java (82%) rename yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/{merchant/vo/app => app/vo}/PayAppCreateReqVO.java (79%) rename yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/{merchant/vo/app => app/vo}/PayAppPageItemRespVO.java (58%) rename yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/{merchant/vo/app => app/vo}/PayAppPageReqVO.java (86%) rename yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/{merchant/vo/app => app/vo}/PayAppRespVO.java (88%) rename yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/{merchant/vo/app => app/vo}/PayAppUpdateReqVO.java (87%) rename yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/{merchant/vo/app => app/vo}/PayAppUpdateStatusReqVO.java (89%) rename yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/{merchant => channel}/PayChannelController.java (71%) rename yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/{merchant/vo/channel => channel/vo}/PayChannelBaseVO.java (81%) rename yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/{merchant/vo/channel => channel/vo}/PayChannelCreateReqVO.java (87%) rename yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/{merchant/vo/channel => channel/vo}/PayChannelPageReqVO.java (87%) rename yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/{merchant/vo/channel => channel/vo}/PayChannelRespVO.java (89%) rename yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/{merchant/vo/channel => channel/vo}/PayChannelUpdateReqVO.java (89%) delete mode 100644 yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayMerchantController.java delete mode 100644 yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppExcelVO.java delete mode 100644 yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppExportReqVO.java delete mode 100644 yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelExcelVO.java delete mode 100644 yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelExportReqVO.java delete mode 100644 yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantBaseVO.java delete mode 100644 yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantCreateReqVO.java delete mode 100644 yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantExcelVO.java delete mode 100644 yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantExportReqVO.java delete mode 100644 yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantPageReqVO.java delete mode 100644 yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantRespVO.java delete mode 100644 yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateReqVO.java delete mode 100644 yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateStatusReqVO.java delete mode 100644 yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/merchant/PayMerchantConvert.java rename yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/{merchant => app}/PayAppDO.java (88%) rename yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/{merchant => channel}/PayChannelDO.java (90%) delete mode 100644 yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/merchant/PayMerchantDO.java create mode 100644 yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/app/PayAppMapper.java rename yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/{merchant => channel}/PayChannelMapper.java (63%) delete mode 100644 yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayAppMapper.java delete mode 100644 yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayMerchantMapper.java rename yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/{merchant => app}/PayAppService.java (64%) rename yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/{merchant => app}/PayAppServiceImpl.java (64%) rename yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/{merchant => channel}/PayChannelService.java (71%) rename yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/{merchant => channel}/PayChannelServiceImpl.java (82%) delete mode 100644 yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantService.java delete mode 100644 yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantServiceImpl.java rename yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/{merchant => app}/PayAppServiceTest.java (54%) rename yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/{merchant => channel}/PayChannelServiceTest.java (77%) delete mode 100644 yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantServiceTest.java delete mode 100644 yudao-ui-admin/src/api/pay/merchant.js delete mode 100644 yudao-ui-admin/src/views/pay/merchant/index.vue diff --git a/sql/mysql/menu.sql b/sql/mysql/menu.sql deleted file mode 100644 index 704979b78..000000000 --- a/sql/mysql/menu.sql +++ /dev/null @@ -1,230 +0,0 @@ --- 菜单 SQL -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status, component_name -) -VALUES ( - '积分设置管理', '', 2, 0, 2162, - 'config', '', 'point/config/index', 0, 'PointConfig' -); - --- 按钮父菜单ID --- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码 -SELECT @parentId := LAST_INSERT_ID(); - --- 按钮 SQL -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status -) -VALUES ( - '积分设置查询', 'point:config:query', 3, 1, @parentId, - '', '', '', 0 -); -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status -) -VALUES ( - '积分设置创建', 'point:config:create', 3, 2, @parentId, - '', '', '', 0 -); -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status -) -VALUES ( - '积分设置更新', 'point:config:update', 3, 3, @parentId, - '', '', '', 0 -); -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status -) -VALUES ( - '积分设置删除', 'point:config:delete', 3, 4, @parentId, - '', '', '', 0 -); -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status -) -VALUES ( - '积分设置导出', 'point:config:export', 3, 5, @parentId, - '', '', '', 0 -); - - - --- 菜单 SQL -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status, component_name -) -VALUES ( - '积分签到规则管理', '', 2, 0, 2162, - 'sign-in-config', '', 'point/signInConfig/index', 0, 'SignInConfig' -); - --- 按钮父菜单ID --- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码 -SELECT @parentId := LAST_INSERT_ID(); - --- 按钮 SQL -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status -) -VALUES ( - '积分签到规则查询', 'point:sign-in-config:query', 3, 1, @parentId, - '', '', '', 0 -); -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status -) -VALUES ( - '积分签到规则创建', 'point:sign-in-config:create', 3, 2, @parentId, - '', '', '', 0 -); -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status -) -VALUES ( - '积分签到规则更新', 'point:sign-in-config:update', 3, 3, @parentId, - '', '', '', 0 -); -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status -) -VALUES ( - '积分签到规则删除', 'point:sign-in-config:delete', 3, 4, @parentId, - '', '', '', 0 -); -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status -) -VALUES ( - '积分签到规则导出', 'point:sign-in-config:export', 3, 5, @parentId, - '', '', '', 0 -); - - --- 菜单 SQL -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status, component_name -) -VALUES ( - '用户积分记录管理', '', 2, 0, 2162, - 'record', '', 'point/record/index', 0, 'PointRecord' -); - --- 按钮父菜单ID --- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码 -SELECT @parentId := LAST_INSERT_ID(); - --- 按钮 SQL -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status -) -VALUES ( - '用户积分记录查询', 'point:record:query', 3, 1, @parentId, - '', '', '', 0 -); -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status -) -VALUES ( - '用户积分记录创建', 'point:record:create', 3, 2, @parentId, - '', '', '', 0 -); -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status -) -VALUES ( - '用户积分记录更新', 'point:record:update', 3, 3, @parentId, - '', '', '', 0 -); -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status -) -VALUES ( - '用户积分记录删除', 'point:record:delete', 3, 4, @parentId, - '', '', '', 0 -); -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status -) -VALUES ( - '用户积分记录导出', 'point:record:export', 3, 5, @parentId, - '', '', '', 0 -); - - - --- 菜单 SQL -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status, component_name -) -VALUES ( - '用户签到积分管理', '', 2, 0, 2162, - 'sign-in-record', '', 'point/signInRecord/index', 0, 'SignInRecord' -); - --- 按钮父菜单ID --- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码 -SELECT @parentId := LAST_INSERT_ID(); - --- 按钮 SQL -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status -) -VALUES ( - '用户签到积分查询', 'point:sign-in-record:query', 3, 1, @parentId, - '', '', '', 0 -); -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status -) -VALUES ( - '用户签到积分创建', 'point:sign-in-record:create', 3, 2, @parentId, - '', '', '', 0 -); -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status -) -VALUES ( - '用户签到积分更新', 'point:sign-in-record:update', 3, 3, @parentId, - '', '', '', 0 -); -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status -) -VALUES ( - '用户签到积分删除', 'point:sign-in-record:delete', 3, 4, @parentId, - '', '', '', 0 -); -INSERT INTO system_menu( - name, permission, type, sort, parent_id, - path, icon, component, status -) -VALUES ( - '用户签到积分导出', 'point:sign-in-record:export', 3, 5, @parentId, - '', '', '', 0 -); - - diff --git a/sql/mysql/optional/mall.sql b/sql/mysql/optional/mall.sql deleted file mode 100644 index 655c03073..000000000 --- a/sql/mysql/optional/mall.sql +++ /dev/null @@ -1,555 +0,0 @@ -/* - Navicat Premium Data Transfer - - Source Server : 127.0.0.1 MySQL - Source Server Type : MySQL - Source Server Version : 80026 - Source Host : localhost:3306 - Source Schema : ruoyi-vue-pro - - Target Server Type : MySQL - Target Server Version : 80026 - File Encoding : 65001 - - Date: 01/08/2022 23:01:36 -*/ - -SET NAMES utf8mb4; -SET FOREIGN_KEY_CHECKS = 0; - --- ---------------------------- --- Table structure for market_activity --- ---------------------------- -DROP TABLE IF EXISTS `market_activity`; -CREATE TABLE `market_activity` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '活动编号', - `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '活动标题', - `activity_type` tinyint NOT NULL COMMENT '活动类型', - `status` tinyint NOT NULL DEFAULT -1 COMMENT '活动状态', - `start_time` datetime NOT NULL COMMENT '开始时间', - `end_time` datetime NOT NULL COMMENT '结束时间', - `invalid_time` datetime NULL DEFAULT NULL COMMENT '失效时间', - `delete_time` datetime NULL DEFAULT NULL COMMENT '删除时间', - `time_limited_discount` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '限制折扣字符串,使用 JSON 序列化成字符串存储', - `full_privilege` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '限制折扣字符串,使用 JSON 序列化成字符串存储', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '促销活动'; - --- ---------------------------- --- Records of market_activity --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for market_banner --- ---------------------------- -DROP TABLE IF EXISTS `market_banner`; -CREATE TABLE `market_banner` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'Banner编号', - `title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT 'Banner标题', - `pic_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '图片URL', - `status` tinyint NOT NULL DEFAULT -1 COMMENT '活动状态', - `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '跳转地址', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - `sort` tinyint NULL DEFAULT NULL COMMENT '排序', - `memo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '描述', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'Banner管理'; - --- ---------------------------- --- Records of market_banner --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for member_address --- ---------------------------- -DROP TABLE IF EXISTS `member_address`; -CREATE TABLE `member_address` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '收件地址编号', - `user_id` bigint NOT NULL COMMENT '用户编号', - `name` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '收件人名称', - `mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '手机号', - `area_id` bigint NOT NULL COMMENT '地区编码', - `post_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '邮编', - `detail_address` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '收件详细地址', - `defaulted` bit(1) NOT NULL COMMENT '是否默认', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE, - INDEX `idx_userId`(`user_id` ASC) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '用户收件地址'; - --- ---------------------------- --- Records of member_address --- ---------------------------- -BEGIN; -INSERT INTO `ruoyi-vue-pro`.`member_address` (`id`, `user_id`, `name`, `mobile`, `area_id`, `post_code`, `detail_address`, `defaulted`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (21, 1, 'yunai', '15601691300', 610632, '200000', '芋道源码 233 号 666 室', b'1', '1', '2022-08-01 22:46:35', '1', '2022-08-01 22:46:35', b'0', 1); -COMMIT; - --- ---------------------------- --- Table structure for product_brand --- ---------------------------- -DROP TABLE IF EXISTS `product_brand`; -CREATE TABLE `product_brand` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '品牌编号', - `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '品牌名称', - `pic_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '品牌图片', - `sort` int NULL DEFAULT 0 COMMENT '品牌排序', - `description` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '品牌描述', - `status` tinyint NOT NULL COMMENT '状态', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商品品牌'; - --- ---------------------------- --- Records of product_brand --- ---------------------------- -BEGIN; -INSERT INTO `ruoyi-vue-pro`.`product_brand` (`id`, `name`, `pic_url`, `sort`, `description`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, '苹果', 'http://test.yudao.iocoder.cn/e3726713fa56db5717c78c011762fcc7a251db12735c3581470638b8e1fa17e2.jpeg', 0, '是上市', 0, '1', '2022-07-30 22:12:18', '1', '2022-07-30 22:13:55', b'0', 1); -COMMIT; - --- ---------------------------- --- Table structure for product_category --- ---------------------------- -DROP TABLE IF EXISTS `product_category`; -CREATE TABLE `product_category` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '分类编号', - `parent_id` bigint NOT NULL COMMENT '父分类编号', - `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '分类名称', - `pic_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '移动端分类图', - `big_pic_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'PC 端分类图', - `sort` int DEFAULT '0' COMMENT '分类排序', - `status` tinyint NOT NULL COMMENT '开启状态', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT '0' COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品分类'; - --- ---------------------------- --- Records of product_category --- ---------------------------- -BEGIN; -INSERT INTO `ruoyi-vue-pro`.`product_category` (`id`, `parent_id`, `name`, `pic_url`, `big_pic_url`, `sort`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 0, '电脑办公', 'http://test.yudao.iocoder.cn/122d548e1b3cd5dec72fe8075c6977a70f9cc13541a684ab3685f1b5df42f6bd.jpeg', '', 300, 0, '1', '2022-07-30 16:36:35', '1', '2022-07-30 20:27:16', b'0', 1); -INSERT INTO `ruoyi-vue-pro`.`product_category` (`id`, `parent_id`, `name`, `pic_url`, `big_pic_url`, `sort`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (2, 1, '笔记本', 'http://test.yudao.iocoder.cn/72713ac7b947600a019a18786ed0e6562e8692e253dbd35110a0a85c2469bbec.jpg', '', 310, 0, '1', '2022-07-30 16:38:09', '1', '2022-07-30 16:38:09', b'0', 1); -INSERT INTO `ruoyi-vue-pro`.`product_category` (`id`, `parent_id`, `name`, `pic_url`, `big_pic_url`, `sort`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (3, 1, '游戏本', 'http://test.yudao.iocoder.cn/287c50dd9f5f575f57329a0c57b2095be6d1aeba83867b905fe549f54a296feb.jpg', '', 312, 0, '1', '2022-07-30 16:39:09', '1', '2022-07-30 20:26:59', b'0', 1); -INSERT INTO `ruoyi-vue-pro`.`product_category` (`id`, `parent_id`, `name`, `pic_url`, `big_pic_url`, `sort`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (4, 0, '手机', 'http://test.yudao.iocoder.cn/e1b63900c78dbb661b3e383960cee5cfea7e1dd2fb22cff2e317ff025faaf8b2.jpeg', '', 313, 0, '1', '2022-07-30 16:40:00', '1', '2022-07-30 16:40:09', b'0', 1); -INSERT INTO `ruoyi-vue-pro`.`product_category` (`id`, `parent_id`, `name`, `pic_url`, `big_pic_url`, `sort`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (5, 4, '5G手机', 'http://test.yudao.iocoder.cn/3af6557ac7def6423f046f5b2e920b644793420b466959aaa996a2e19068bbde.jpeg', '', 314, 0, '1', '2022-07-30 16:43:00', '1', '2022-07-30 16:43:00', b'0', 1); -INSERT INTO `ruoyi-vue-pro`.`product_category` (`id`, `parent_id`, `name`, `pic_url`, `big_pic_url`, `sort`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (6, 4, '游戏手机', 'http://test.yudao.iocoder.cn/964fe9ccd1710d64ede261dc36d231918a017641986c15293c367f9f66d94d05.jpeg', '', 315, 0, '1', '2022-07-30 16:43:44', '1', '2022-07-30 16:43:44', b'0', 1); -INSERT INTO `ruoyi-vue-pro`.`product_category` (`id`, `parent_id`, `name`, `pic_url`, `big_pic_url`, `sort`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (7, 5, '厉害的 5G 手机', 'http://test.yudao.iocoder.cn/b287122f277838e8de368769b96217918605743bc45f3a29bda3cc7359dc66e1.png', '', '123', 0, '1', '2022-07-30 20:38:09', '1', '2022-07-30 20:38:09', b'0', 1); -INSERT INTO `ruoyi-vue-pro`.`product_category` (`id`, `parent_id`, `name`, `pic_url`, `big_pic_url`, `sort`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (15, 0, '服装鞋包', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/a23f732db55e6adbc608f4b6cf2b0ab50db6d9147af0ee267a315805a596e175.jpg', '', 100, 0, '1', '2023-04-25 16:57:05', '1', '2023-04-25 17:08:26', b'0', 1); -INSERT INTO `ruoyi-vue-pro`.`product_category` (`id`, `parent_id`, `name`, `pic_url`, `big_pic_url`, `sort`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (16, 15, '时尚女装', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/aa8d5c44ac0390ab398bae0dc8883575e3cb57594f9ed00248febe8e3d7484d1.png', '', 200, 0, '1', '2023-04-25 17:09:00', '1', '2023-04-25 17:09:00', b'0', 1); -INSERT INTO `ruoyi-vue-pro`.`product_category` (`id`, `parent_id`, `name`, `pic_url`, `big_pic_url`, `sort`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (17, 15, '精品男装', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/b0c166c0846fa2280b4a02431e2ac2e2363f2d2a6b608598f34b067a5ccf1245.png', '', 100, 0, '1', '2023-04-25 17:09:33', '1', '2023-04-25 17:09:33', b'0', 1); -INSERT INTO `ruoyi-vue-pro`.`product_category` (`id`, `parent_id`, `name`, `pic_url`, `big_pic_url`, `sort`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (18, 15, '箱包', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/8682928caa2a5a49b380ac93059adc435099873cdf646084f31cea79d5c27f40.png', '', 80, 0, '1', '2023-04-25 17:09:51', '1', '2023-04-25 17:09:51', b'0', 1); -INSERT INTO `ruoyi-vue-pro`.`product_category` (`id`, `parent_id`, `name`, `pic_url`, `big_pic_url`, `sort`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (19, 15, '西服', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/c202fa79f2fbe188cfdf40b107c7eca89c548a5c4b0047e26b7a6445c470615a.jpg', '', 0, 0, '1', '2023-04-25 17:10:15', '1', '2023-04-25 17:10:15', b'0', 1); -INSERT INTO `ruoyi-vue-pro`.`product_category` (`id`, `parent_id`, `name`, `pic_url`, `big_pic_url`, `sort`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (20, 15, '配饰', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/51bf43fcad0b947f5fa377356fb7034b47223fdbcec241d50e6e60a9be498730.jpg', '', 0, 0, '1', '2023-04-25 17:10:56', '1', '2023-04-25 17:10:56', b'0', 1); -INSERT INTO `ruoyi-vue-pro`.`product_category` (`id`, `parent_id`, `name`, `pic_url`, `big_pic_url`, `sort`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (21, 15, '美妆工具', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/c3cd6735cf157c218bc32ece312fd90cb2130c437dc9ec61d4030681d6ba4efb.png', '', 0, 0, '1', '2023-04-25 17:11:15', '1', '2023-04-25 17:11:24', b'0', 1); -INSERT INTO `ruoyi-vue-pro`.`product_category` (`id`, `parent_id`, `name`, `pic_url`, `big_pic_url`, `sort`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (22, 0, '网络盒子', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/74656bb8bc988c0419e0dbc613eda24a03956b950452b3565527301a5782db3a.png', '', 50, 0, '1', '2023-04-25 17:12:13', '1', '2023-04-25 17:12:13', b'0', 1); -INSERT INTO `ruoyi-vue-pro`.`product_category` (`id`, `parent_id`, `name`, `pic_url`, `big_pic_url`, `sort`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (23, 22, '尿裤湿巾', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/20162f22d8f6b427f0d6f1678c9fbb7bf0c1b70768bdc86101bee8b5e13bec5a.jpeg', '', 0, 0, '1', '2023-04-25 17:12:42', '1', '2023-04-25 17:12:42', b'0', 1); -INSERT INTO `ruoyi-vue-pro`.`product_category` (`id`, `parent_id`, `name`, `pic_url`, `big_pic_url`, `sort`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (24, 15, '宠物主粮', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/383729ba05711c400f9e44db11a63603af0fdbc99e58cd7b40e9296ca4e0510e.jpg', '', 0, 0, '1', '2023-04-25 17:13:09', '1', '2023-04-25 17:13:09', b'0', 1); -INSERT INTO `ruoyi-vue-pro`.`product_category` (`id`, `parent_id`, `name`, `pic_url`, `big_pic_url`, `sort`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (25, 0, '家电电器', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/c8a34dc2688fd4d2c95b5f49888865db1c88fd3bde153e3f7f0bcd4ff9971c96.png', '', 50, 0, '1', '2023-04-25 17:13:43', '1', '2023-04-25 17:13:43', b'0', 1); -INSERT INTO `ruoyi-vue-pro`.`product_category` (`id`, `parent_id`, `name`, `pic_url`, `big_pic_url`, `sort`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (26, 25, '封口/封杯机', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/1c0c208cfcf871c146006d97f95ae4fcd14d8a2deb3eabe3696367af61cb5e69.png', '', 60, 0, '1', '2023-04-25 17:14:39', '1', '2023-04-25 17:14:39', b'0', 1); -INSERT INTO `ruoyi-vue-pro`.`product_category` (`id`, `parent_id`, `name`, `pic_url`, `big_pic_url`, `sort`, `status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (27, 25, '空调', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/d578e1e60b2dc3efe70643d25a8b2150dabfecd658fdb2fafcdb786d525f66d1.png', 'http://127.0.0.1:48080/admin-api/infra/file/4/get/34ed55f822ad25ab445e6b396dcd61a7d119882ef19f85f0e24742911d896959.jpeg', 60, 0, '1', '2023-04-25 17:15:12', '1', '2023-04-25 17:17:04', b'0', 1); -COMMIT; - --- ---------------------------- --- Table structure for product_property --- ---------------------------- -DROP TABLE IF EXISTS `product_property`; -CREATE TABLE `product_property` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', - `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '规格名称', - `status` tinyint DEFAULT NULL COMMENT '状态: 0 开启 ,1 禁用', - `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新人', - `tenant_id` bigint NOT NULL DEFAULT '0' COMMENT '租户编号', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `remark` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`id`) USING BTREE, - KEY `idx_name` (`name`(32)) USING BTREE COMMENT '规格名称索引' -) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='规格名称'; - --- ---------------------------- --- Records of product_property --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for product_property_value --- ---------------------------- -DROP TABLE IF EXISTS `product_property_value`; -CREATE TABLE `product_property_value` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', - `property_id` bigint DEFAULT NULL COMMENT '规格键id', - `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '规格值名字', - `status` tinyint DEFAULT NULL COMMENT '状态: 1 开启 ,2 禁用', - `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新人', - `tenant_id` bigint NOT NULL DEFAULT '0' COMMENT '租户编号', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `remark` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='规格值'; - --- ---------------------------- --- Records of product_property_value --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for product_sku --- ---------------------------- -DROP TABLE IF EXISTS `product_sku`; -CREATE TABLE `product_sku` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键', - `spu_id` bigint NOT NULL COMMENT 'spu编号', - `properties` varchar(512) DEFAULT NULL COMMENT '属性数组,JSON 格式 [{propertId: , valueId: }, {propertId: , valueId: }]', - `price` int NOT NULL DEFAULT '-1' COMMENT '商品价格,单位:分', - `market_price` int DEFAULT NULL COMMENT '市场价,单位:分', - `cost_price` int NOT NULL DEFAULT '-1' COMMENT '成本价,单位: 分', - `bar_code` varchar(64) DEFAULT NULL COMMENT 'SKU 的条形码', - `pic_url` varchar(256) NOT NULL COMMENT '图片地址', - `stock` int DEFAULT NULL COMMENT '库存', - `weight` double DEFAULT NULL COMMENT '商品重量,单位:kg 千克', - `volume` double DEFAULT NULL COMMENT '商品体积,单位:m^3 平米', - `sub_commission_first_price` int DEFAULT NULL COMMENT '一级分销的佣金,单位:分', - `sub_commission_second_price` int DEFAULT NULL COMMENT '二级分销的佣金,单位:分', - `sales_count` int DEFAULT NULL COMMENT '商品销量', - `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `creator` varchar(64) DEFAULT NULL COMMENT '创建人', - `updater` double(64,0) DEFAULT NULL COMMENT '更新人', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT '0' COMMENT '租户编号', -PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB COMMENT='商品sku'; - --- ---------------------------- --- Records of product_sku --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for product_spu --- ---------------------------- -DROP TABLE IF EXISTS `product_spu`; -CREATE TABLE `product_spu` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '商品 SPU 编号,自增', - `name` varchar(128) NOT NULL COMMENT '商品名称', - `keyword` varchar(256) DEFAULT NULL COMMENT '关键字', - `introduction` varchar(256) COMMENT '商品简介', - `description` text COMMENT '商品详情', - `bar_code` varchar(64) DEFAULT NULL COMMENT '条形码', - `category_id` bigint NOT NULL COMMENT '商品分类编号', - `brand_id` int DEFAULT NULL COMMENT '商品品牌编号', - `pic_url` varchar(256) NOT NULL COMMENT '商品封面图', - `slider_pic_urls` varchar(2000) DEFAULT '' COMMENT '商品轮播图地址\n 数组,以逗号分隔\n 最多上传15张', - `video_url` varchar(256) DEFAULT NULL COMMENT '商品视频', - `unit` tinyint NOT NULL COMMENT '单位', - `sort` int NOT NULL DEFAULT '0' COMMENT '排序字段', - `status` tinyint NOT NULL COMMENT '商品状态: 0 上架(开启) 1 下架(禁用)-1 回收', - `spec_type` bit(1) DEFAULT NULL COMMENT '规格类型:0 单规格 1 多规格', - `price` int NOT NULL DEFAULT '-1' COMMENT '商品价格,单位使用:分', - `market_price` int DEFAULT NULL COMMENT '市场价,单位使用:分', - `cost_price` int NOT NULL DEFAULT '-1' COMMENT '成本价,单位: 分', - `stock` int NOT NULL DEFAULT '0' COMMENT '库存', - `delivery_template_id` bigint NOT NULL COMMENT '物流配置模板编号', - `recommend_hot` bit(1) DEFAULT NULL COMMENT '是否热卖推荐: 0 默认 1 热卖', - `recommend_benefit` bit(1) DEFAULT NULL COMMENT '是否优惠推荐: 0 默认 1 优选', - `recommend_best` bit(1) DEFAULT NULL COMMENT '是否精品推荐: 0 默认 1 精品', - `recommend_new` bit(1) DEFAULT NULL COMMENT '是否新品推荐: 0 默认 1 新品', - `recommend_good` bit(1) DEFAULT NULL COMMENT '是否优品推荐', - `give_integral` int NOT NULL COMMENT '赠送积分', - `give_coupon_template_ids` varchar(512) DEFAULT '' COMMENT '赠送的优惠劵编号的数组', - `sub_commission_type` bit(1) DEFAULT NULL COMMENT '分销类型', - `activity_orders` varchar(16) NOT NULL DEFAULT '' COMMENT '活动显示排序0=默认, 1=秒杀,2=砍价,3=拼团', - `sales_count` int DEFAULT '0' COMMENT '商品销量', - `virtual_sales_count` int DEFAULT '0' COMMENT '虚拟销量', - `browse_count` int DEFAULT '0' COMMENT '商品点击量', - `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `creator` varchar(64) DEFAULT NULL COMMENT '创建人', - `updater` varchar(64) DEFAULT NULL COMMENT '更新人', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT '0' COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB COMMENT='商品spu'; - --- ---------------------------- --- Table structure for product_favorite --- ---------------------------- -DROP TABLE IF EXISTS `product_favorite`; -CREATE TABLE `product_favorite` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号,自增', - `spu_id` bigint NOT NULL COMMENT '商品 SPU 编号', - `user_id` bigint NOT NULL COMMENT '用户id', - `type` int(10) NOT NULL DEFAULT 1 COMMENT '类型1:收藏 2:点赞', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB COMMENT='商品收藏表'; - --- Table structure for trade_delivery_express_template --- ---------------------------- -DROP TABLE IF EXISTS `trade_delivery_express_template`; -CREATE TABLE `trade_delivery_express_template` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号', - `name` varchar(64) NOT NULL COMMENT '模板名称', - `charge_mode` tinyint NOT NULL COMMENT '配送计费方式', - `sort` int NOT NULL DEFAULT 0 COMMENT '排序', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB COMMENT='快递运费模板'; - --- ---------------------------- --- Table structure for trade_delivery_express_template_free --- ---------------------------- -DROP TABLE IF EXISTS `trade_delivery_express_template_free`; -CREATE TABLE `trade_delivery_express_template_free` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号', - `template_id` bigint NOT NULL COMMENT '快递运费模板编号', - `area_ids` varchar(100) NOT NULL COMMENT '包邮区域 ids', - `free_price` int NOT NULL COMMENT '包邮金额,单位:分', - `free_count` int NOT NULL DEFAULT 0 COMMENT '包邮件数,', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB COMMENT='快递运费模板包邮配置'; - --- ---------------------------- --- Table structure for trade_delivery_express_template_charge --- ---------------------------- -DROP TABLE IF EXISTS `trade_delivery_express_template_charge`; -CREATE TABLE `trade_delivery_express_template_charge` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号,自增', - `template_id` bigint NOT NULL COMMENT '快递运费模板编号', - `area_ids` varchar(100) NOT NULL COMMENT '配送区域 ids', - `charge_mode` tinyint NOT NULL COMMENT '配送计费方式', - `start_count` double NOT NULL COMMENT '首件数量', - `start_price` int NOT NULL COMMENT '起步价,单位:分', - `extra_count` double NOT NULL COMMENT '续件数量', - `extra_price` int NOT NULL COMMENT '额外价,单位:分', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB COMMENT='快递运费模板计费配置'; - --- ---------------------------- --- Table structure for trade_delivery_pick_up_store --- ---------------------------- -DROP TABLE IF EXISTS `trade_delivery_pick_up_store`; -CREATE TABLE `trade_delivery_pick_up_store` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号', - `name` varchar(64) NOT NULL COMMENT '门店名称', - `introduction` varchar(256) COMMENT '门店简介', - `phone` varchar(16) NOT NULL COMMENT '门店手机', - `area_id` int NOT NULL COMMENT '区域编号', - `detail_address` varchar(256) NOT NULL COMMENT '门店详细地址', - `logo` varchar(256) NOT NULL COMMENT '门店 logo', - `opening_time` time NOT NULL COMMENT '营业开始时间', - `closing_time` time NOT NULL COMMENT '营业结束时间', - `latitude` double NOT NULL COMMENT '纬度', - `longitude` double NOT NULL COMMENT '经度', - `status` tinyint NOT NULL DEFAULT 0 COMMENT '门店状态', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB COMMENT='自提门店'; - --- ---------------------------- --- Table structure for trade_delivery_pick_up_store_staff --- ---------------------------- -DROP TABLE IF EXISTS `trade_delivery_pick_up_store_staff`; -CREATE TABLE `trade_delivery_pick_up_store_staff` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号,自增', - store_id bigint NOT NULL COMMENT '自提门店编号', - `status` tinyint NOT NULL DEFAULT 0 COMMENT '状态', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB COMMENT='自提门店店员'; - --- ---------------------------- --- Table structure for trade_delivery_express --- ---------------------------- -DROP TABLE IF EXISTS `trade_delivery_express`; -CREATE TABLE `trade_delivery_express` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号', - `code` varchar(64) NOT NULL COMMENT '快递公司编码', - `name` varchar(64) NOT NULL COMMENT '快递公司名称', - `logo` varchar(256) COMMENT '快递公司 logo', - `sort` int NOT NULL DEFAULT 0 COMMENT '排序', - `status` tinyint NOT NULL DEFAULT 0 COMMENT '状态', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB COMMENT='快递公司'; - --- ---------------------------- --- 页面装修表 --- ---------------------------- -DROP TABLE IF EXISTS `promotion_decorate_component`; -CREATE TABLE `promotion_decorate_component` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号', - `page_id` int NOT NULL COMMENT '所属页面id', - `code` varchar(64) NOT NULL COMMENT '组件编码', - `value` json NOT NULL COMMENT '组件值:json 格式。包含配置和数据', - `status` tinyint NOT NULL DEFAULT 0 COMMENT '状态', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB COMMENT='页面装修表'; - -SET FOREIGN_KEY_CHECKS = 1; - -BEGIN; -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2000, '商品中心', '', 1, 60, 0, '/product', 'merchant', NULL, 0, b'1', b'1', '', '2022-07-29 15:53:53', '1', '2022-07-30 22:26:19', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2002, '商品分类', '', 2, 2, 2000, 'category', 'dict', 'mall/product/category/index', 0, b'1', b'1', '', '2022-07-29 15:53:53', '1', '2022-07-30 22:23:37', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2003, '分类查询', 'product:category:query', 3, 1, 2002, '', '', '', 0, b'1', b'1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2004, '分类创建', 'product:category:create', 3, 2, 2002, '', '', '', 0, b'1', b'1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2005, '分类更新', 'product:category:update', 3, 3, 2002, '', '', '', 0, b'1', b'1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2006, '分类删除', 'product:category:delete', 3, 4, 2002, '', '', '', 0, b'1', b'1', '', '2022-07-29 15:53:53', '', '2022-07-29 15:53:53', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2007, '分类导出', 'product:category:export', 3, 5, 2002, '', '', '', 0, b'1', b'1', '', '2022-07-29 15:53:53', '', '2022-07-30 13:52:13', b'1'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2008, '商品品牌', '', 2, 1, 2000, 'brand', 'dashboard', 'mall/product/brand/index', 0, b'1', b'1', '', '2022-07-30 13:52:44', '1', '2022-07-30 22:23:43', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2009, '品牌查询', 'product:brand:query', 3, 1, 2008, '', '', '', 0, b'1', b'1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2010, '品牌创建', 'product:brand:create', 3, 2, 2008, '', '', '', 0, b'1', b'1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2011, '品牌更新', 'product:brand:update', 3, 3, 2008, '', '', '', 0, b'1', b'1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2012, '品牌删除', 'product:brand:delete', 3, 4, 2008, '', '', '', 0, b'1', b'1', '', '2022-07-30 13:52:44', '', '2022-07-30 13:52:44', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2013, '品牌导出', 'product:brand:export', 3, 5, 2008, '', '', '', 0, b'1', b'1', '', '2022-07-30 13:52:44', '', '2022-07-30 14:15:00', b'1'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2014, '商品管理', '', 2, 0, 2000, 'spu', 'link', 'mall/product/spu/index', 0, b'1', b'1', '', '2022-07-30 14:22:58', '1', '2022-07-30 22:26:35', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2015, '商品查询', 'product:spu:query', 3, 1, 2014, '', '', '', 0, b'1', b'1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2016, '商品创建', 'product:spu:create', 3, 2, 2014, '', '', '', 0, b'1', b'1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2017, '商品更新', 'product:spu:update', 3, 3, 2014, '', '', '', 0, b'1', b'1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2018, '商品删除', 'product:spu:delete', 3, 4, 2014, '', '', '', 0, b'1', b'1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2018, '商品导出', 'product:spu:export', 3, 5, 2014, '', '', '', 0, b'1', b'1', '', '2022-07-30 14:22:58', '', '2022-07-30 14:22:58', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2019, '规格管理', '', 2, 3, 2000, 'property', '', 'mall/product/property/index', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-08-01 14:55:35', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2020, '规格查询', 'product:property:query', 3, 1, 2019, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-08-01 14:55:35', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2021, '规格创建', 'product:property:create', 3, 2, 2019, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-08-01 14:55:35', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2022, '规格更新', 'product:property:update', 3, 3, 2019, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-08-01 14:55:35', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2023, '规格删除', 'product:property:delete', 3, 4, 2019, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-08-01 14:55:35', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2024, '规格导出', 'product:property:export', 3, 5, 2019, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:55:35', '', '2022-08-01 14:55:35', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2025, 'Banner管理', '', 2, 1, 2000, 'brand', '', 'mall/market/banner/index', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2026, 'Banner查询', 'market:banner:query', 3, 1, 2025, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2027, 'Banner创建', 'market:banner:create', 3, 2, 2025, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2028, 'Banner更新', 'market:banner:update', 3, 3, 2025, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `status`, `visible`, `keep_alive`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2029, 'Banner删除', 'market:banner:delete', 3, 4, 2025, '', '', '', 0, b'1', b'1', '', '2022-08-01 14:56:14', '', '2022-08-01 14:56:14', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2164, '配送管理', '', 1, 0, 2072, 'delivery', '', '', '', 0, b'1', b'1', b'1', '1', '2023-05-18 09:18:02', '1', '2023-05-18 09:48:48', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2165, '快递发货', '', 1, 0, 2164, 'express', '', '', '', 0, b'1', b'1', b'1', '1', '2023-05-18 09:22:06', '1', '2023-05-18 09:22:06', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2166, '门店自提', '', 1, 1, 2164, 'pick-up', '', '', '', 0, b'1', b'1', b'1', '1', '2023-05-18 09:23:14', '1', '2023-05-18 09:23:14', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2167, '快递公司', '', 2, 0, 2165, 'express', '', 'mall/trade/delivery/express/index', 'Express', 0, b'1', b'1', b'1', '1', '2023-05-18 09:27:21', '1', '2023-05-18 22:11:14', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2168, '快递公司查询', 'trade:delivery:express:query', 3, 1, 2167, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-05-18 09:37:53', '', '2023-05-18 09:37:53', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2169, '快递公司创建', 'trade:delivery:express:create', 3, 2, 2167, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-05-18 09:37:53', '', '2023-05-18 09:37:53', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2170, '快递公司更新', 'trade:delivery:express:update', 3, 3, 2167, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-05-18 09:37:53', '', '2023-05-18 09:37:53', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2171, '快递公司删除', 'trade:delivery:express:delete', 3, 4, 2167, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-05-18 09:37:53', '', '2023-05-18 09:37:53', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2172, '快递公司导出', 'trade:delivery:express:export', 3, 5, 2167, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-05-18 09:37:53', '', '2023-05-18 09:37:53', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2178, '快递运费模板导出', 'trade:delivery:express-template:export', 3, 5, 2173, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-05-20 06:49:53', '', '2023-05-20 06:49:53', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2177, '快递运费模板删除', 'trade:delivery:express-template:delete', 3, 4, 2173, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-05-20 06:49:53', '', '2023-05-20 06:49:53', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2176, '快递运费模板更新', 'trade:delivery:express-template:update', 3, 3, 2173, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-05-20 06:49:53', '', '2023-05-20 06:49:53', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2175, '快递运费模板创建', 'trade:delivery:express-template:create', 3, 2, 2173, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-05-20 06:49:53', '', '2023-05-20 06:49:53', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2174, '快递运费模板查询', 'trade:delivery:express-template:query', 3, 1, 2173, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-05-20 06:49:53', '', '2023-05-20 06:49:53', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2173, '运费模版', 'trade:delivery:express-template:query', 2, 1, 2165, 'express-template', '', 'mall/trade/delivery/expressTemplate/index', 'ExpressTemplate', 0, b'1', b'1', b'1', '1', '2023-05-20 06:48:10', '1', '2023-05-20 06:48:29', b'0'); -BEGIN; - --- ---------------------------- --- 字典管理,添加商品单位字典 product_unit --- ---------------------------- -BEGIN; -INSERT INTO `ruoyi-vue-pro`.`system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (169, '商品单位', 'product_unit', 0, '', '1', '2023-05-21 22:45:03', '1', '2023-05-21 22:45:03', b'0', '1970-01-01 00:00:00'); -INSERT INTO `ruoyi-vue-pro`.`system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1, '个', 1, 'product_unit', 0, '', '', '', 1, NOW(), 1, NOW(), b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1, '件', 2, 'product_unit', 0, '', '', '', 1, NOW(), 1, NOW(), b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1, '盒', 3, 'product_unit', 0, '', '', '', 1, NOW(), 1, NOW(), b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1, '袋', 4, 'product_unit', 0, '', '', '', 1, NOW(), 1, NOW(), b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1, '箱', 5, 'product_unit', 0, '', '', '', 1, NOW(), 1, NOW(), b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1, '套', 6, 'product_unit', 0, '', '', '', 1, NOW(), 1, NOW(), b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1, '包', 7, 'product_unit', 0, '', '', '', 1, NOW(), 1, NOW(), b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1, '双', 8, 'product_unit', 0, '', '', '', 1, NOW(), 1, NOW(), b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_dict_data` (`sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1, '卷', 9, 'product_unit', 0, '', '', '', 1, NOW(), 1, NOW(), b'0'); -COMMIT; - --- ---------------------------- --- 数字字典,快递计费方式 --- ---------------------------- -BEGIN; -INSERT INTO `ruoyi-vue-pro`.`system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (169, '快递计费方式', 'trade_delivery_express_charge_mode', 0, '用于商城交易模块配送管理', '1', '2023-05-21 22:45:03', '1', '2023-05-21 22:45:03', b'0', '1970-01-01 00:00:00'); -INSERT INTO `ruoyi-vue-pro`.`system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1237, 2, '按体积', '3', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:47:18', '1', '2023-05-21 22:47:18', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1236, 1, '按重量', '2', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:46:58', '1', '2023-05-21 22:46:58', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1235, 0, '按件', '1', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:46:40', '1', '2023-05-21 22:46:40', b'0'); -COMMIT; - --- ---------------------------- --- 门店管理 菜单 --- ---------------------------- -BEGIN; -INSERT INTO `ruoyi-vue-pro`.`system_menu`(`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2179, '门店管理', '', 2, 1, 2166, 'pick-up-store', '', 'mall/trade/delivery/pickUpStore/index', 'PickUpStore', 0, b'1', b'1', b'1', '1', '2023-05-25 10:50:00', '1', '2023-05-25 10:50:00', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu`(`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2180, '自提门店查询', 'trade:delivery:pick-up-store:query', 3, 1, 2179, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-05-25 10:53:29', '', '2023-05-25 10:53:29', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu`(`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2181, '自提门店创建', 'trade:delivery:pick-up-store:create', 3, 2, 2179, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-05-25 10:53:29', '', '2023-05-25 10:53:29', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu`(`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2182, '自提门店更新', 'trade:delivery:pick-up-store:update', 3, 3, 2179, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-05-25 10:53:29', '', '2023-05-25 10:53:29', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu`(`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2183, '自提门店删除', 'trade:delivery:pick-up-store:delete', 3, 4, 2179, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-05-25 10:53:29', '', '2023-05-25 10:53:29', b'0'); -INSERT INTO `ruoyi-vue-pro`.`system_menu`(`id`, `name`, `permission`, `type`, `sort`, `parent_id`, `path`, `icon`, `component`, `component_name`, `status`, `visible`, `keep_alive`, `always_show`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (2184, '自提门店导出', 'trade:delivery:pick-up-store:export', 3, 5, 2179, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-05-25 10:53:29', '', '2023-05-25 10:53:29', b'0'); -COMMIT; diff --git a/sql/mysql/ruoyi-vue-pro.sql b/sql/mysql/ruoyi-vue-pro.sql index a5d6982fd..b05c14de6 100644 --- a/sql/mysql/ruoyi-vue-pro.sql +++ b/sql/mysql/ruoyi-vue-pro.sql @@ -875,294 +875,6 @@ CREATE TABLE `member_user` ( BEGIN; COMMIT; --- ---------------------------- --- Table structure for pay_app --- ---------------------------- -DROP TABLE IF EXISTS `pay_app`; -CREATE TABLE `pay_app` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '应用编号', - `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '应用名', - `status` tinyint NOT NULL COMMENT '开启状态', - `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注', - `pay_notify_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '支付结果的回调地址', - `refund_notify_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '退款结果的回调地址', - `merchant_id` bigint NOT NULL COMMENT '商户编号', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '支付应用信息'; - --- ---------------------------- --- Records of pay_app --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for pay_channel --- ---------------------------- -DROP TABLE IF EXISTS `pay_channel`; -CREATE TABLE `pay_channel` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '商户编号', - `code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '渠道编码', - `status` tinyint NOT NULL COMMENT '开启状态', - `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注', - `fee_rate` double NOT NULL DEFAULT 0 COMMENT '渠道费率,单位:百分比', - `merchant_id` bigint NOT NULL COMMENT '商户编号', - `app_id` bigint NOT NULL COMMENT '应用编号', - `config` varchar(4096) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '支付渠道配置', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 22 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '支付渠道\n'; - --- ---------------------------- --- Records of pay_channel --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for pay_demo_order --- ---------------------------- -DROP TABLE IF EXISTS `pay_demo_order`; -CREATE TABLE `pay_demo_order` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '订单编号', - `user_id` bigint UNSIGNED NOT NULL COMMENT '用户编号', - `spu_id` bigint NOT NULL COMMENT '商品编号', - `spu_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '商品名字', - `price` int NOT NULL COMMENT '价格,单位:分', - `payed` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否已支付:[0:未支付 1:已经支付过]', - `pay_order_id` bigint NULL DEFAULT NULL COMMENT '支付订单编号', - `pay_channel_code` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '支付成功的支付渠道', - `pay_time` datetime NULL DEFAULT NULL COMMENT '订单支付时间', - `pay_refund_id` bigint NULL DEFAULT NULL COMMENT '退款订单编号', - `refund_price` int NOT NULL DEFAULT 0 COMMENT '退款金额,单位:分', - `refund_time` datetime NULL DEFAULT NULL COMMENT '退款时间', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 72 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '示例订单\n'; - --- ---------------------------- --- Records of pay_demo_order --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for pay_merchant --- ---------------------------- -DROP TABLE IF EXISTS `pay_merchant`; -CREATE TABLE `pay_merchant` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '商户编号', - `no` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商户号', - `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商户全称', - `short_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商户简称', - `status` tinyint NOT NULL COMMENT '开启状态', - `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '支付商户信息'; - --- ---------------------------- --- Records of pay_merchant --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for pay_notify_log --- ---------------------------- -DROP TABLE IF EXISTS `pay_notify_log`; -CREATE TABLE `pay_notify_log` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '日志编号', - `task_id` bigint NOT NULL COMMENT '通知任务编号', - `notify_times` tinyint NOT NULL COMMENT '第几次被通知', - `response` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '请求参数', - `status` tinyint NOT NULL COMMENT '通知状态', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 371964 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '支付通知 App 的日志'; - --- ---------------------------- --- Records of pay_notify_log --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for pay_notify_task --- ---------------------------- -DROP TABLE IF EXISTS `pay_notify_task`; -CREATE TABLE `pay_notify_task` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '任务编号', - `merchant_id` bigint NOT NULL COMMENT '商户编号', - `app_id` bigint NOT NULL COMMENT '应用编号', - `type` tinyint NOT NULL COMMENT '通知类型', - `data_id` bigint NOT NULL COMMENT '数据编号', - `status` tinyint NOT NULL COMMENT '通知状态', - `merchant_order_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商户订单编号', - `next_notify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '下一次通知时间', - `last_execute_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后一次执行时间', - `notify_times` tinyint NOT NULL COMMENT '当前通知次数', - `max_notify_times` tinyint NOT NULL COMMENT '最大可通知次数', - `notify_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '异步通知地址', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 151 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商户支付、退款等的通知\n'; - --- ---------------------------- --- Records of pay_notify_task --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for pay_order --- ---------------------------- -DROP TABLE IF EXISTS `pay_order`; -CREATE TABLE `pay_order` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '支付订单编号', - `merchant_id` bigint NOT NULL COMMENT '商户编号', - `app_id` bigint NOT NULL COMMENT '应用编号', - `channel_id` bigint NULL DEFAULT NULL COMMENT '渠道编号', - `channel_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '渠道编码', - `merchant_order_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商户订单编号', - `subject` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商品标题', - `body` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商品描述', - `notify_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '异步通知地址', - `notify_status` tinyint NOT NULL COMMENT '通知商户支付结果的回调状态', - `amount` bigint NOT NULL COMMENT '支付金额,单位:分', - `channel_fee_rate` double NULL DEFAULT 0 COMMENT '渠道手续费,单位:百分比', - `channel_fee_amount` bigint NULL DEFAULT 0 COMMENT '渠道手续金额,单位:分', - `status` tinyint NOT NULL COMMENT '支付状态', - `user_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户 IP', - `expire_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '订单失效时间', - `success_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '订单支付成功时间', - `notify_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '订单支付通知时间', - `success_extension_id` bigint NULL DEFAULT NULL COMMENT '支付成功的订单拓展单编号', - `refund_status` tinyint NOT NULL COMMENT '退款状态', - `refund_times` tinyint NOT NULL COMMENT '退款次数', - `refund_amount` bigint NOT NULL COMMENT '退款总金额,单位:分', - `channel_user_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '渠道用户编号', - `channel_order_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '渠道订单号', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 171 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '支付订单\n'; - --- ---------------------------- --- Records of pay_order --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for pay_order_extension --- ---------------------------- -DROP TABLE IF EXISTS `pay_order_extension`; -CREATE TABLE `pay_order_extension` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '支付订单编号', - `no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '支付订单号', - `order_id` bigint NOT NULL COMMENT '支付订单编号', - `channel_id` bigint NOT NULL COMMENT '渠道编号', - `channel_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '渠道编码', - `user_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户 IP', - `status` tinyint NOT NULL COMMENT '支付状态', - `channel_extras` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '支付渠道的额外参数', - `channel_notify_data` varchar(4096) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '支付渠道异步通知的内容', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 383 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '支付订单\n'; - --- ---------------------------- --- Records of pay_order_extension --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for pay_refund --- ---------------------------- -DROP TABLE IF EXISTS `pay_refund`; -CREATE TABLE `pay_refund` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '支付退款编号', - `merchant_id` bigint NOT NULL COMMENT '商户编号', - `app_id` bigint NOT NULL COMMENT '应用编号', - `channel_id` bigint NOT NULL COMMENT '渠道编号', - `channel_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '渠道编码', - `order_id` bigint NOT NULL COMMENT '支付订单编号 pay_order 表id', - `trade_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '交易订单号 pay_extension 表no 字段', - `merchant_order_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商户订单编号(商户系统生成)', - `merchant_refund_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商户退款订单号(商户系统生成)', - `notify_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '异步通知商户地址', - `notify_status` tinyint NOT NULL COMMENT '通知商户退款结果的回调状态', - `status` tinyint NOT NULL COMMENT '退款状态', - `type` tinyint NOT NULL COMMENT '退款类型(部分退款,全部退款)', - `pay_amount` bigint NOT NULL COMMENT '支付金额,单位分', - `refund_amount` bigint NOT NULL COMMENT '退款金额,单位分', - `reason` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '退款原因', - `user_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '用户 IP', - `channel_order_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '渠道订单号,pay_order 中的channel_order_no 对应', - `channel_refund_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '渠道退款单号,渠道返回', - `channel_error_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '渠道调用报错时,错误码', - `channel_error_msg` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '渠道调用报错时,错误信息', - `channel_extras` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '支付渠道的额外参数', - `expire_time` datetime NULL DEFAULT NULL COMMENT '退款失效时间', - `success_time` datetime NULL DEFAULT NULL COMMENT '退款成功时间', - `notify_time` datetime NULL DEFAULT NULL COMMENT '退款通知时间', - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '退款订单'; - --- ---------------------------- --- Records of pay_refund --- ---------------------------- -BEGIN; -COMMIT; - -- ---------------------------- -- Table structure for system_dept -- ---------------------------- diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayAppController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/PayAppController.java similarity index 68% rename from yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayAppController.java rename to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/PayAppController.java index 353239e0a..dda11bc96 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayAppController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/PayAppController.java @@ -1,36 +1,29 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant; +package cn.iocoder.yudao.module.pay.controller.admin.app; import cn.hutool.core.collection.CollUtil; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.*; +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.*; import cn.iocoder.yudao.module.pay.convert.app.PayAppConvert; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; -import cn.iocoder.yudao.module.pay.service.merchant.PayAppService; -import cn.iocoder.yudao.module.pay.service.merchant.PayChannelService; -import cn.iocoder.yudao.module.pay.service.merchant.PayMerchantService; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.Parameter; +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO; +import cn.iocoder.yudao.module.pay.service.app.PayAppService; +import cn.iocoder.yudao.module.pay.service.channel.PayChannelService; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; import lombok.extern.slf4j.Slf4j; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; -import java.io.IOException; import java.util.*; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Slf4j @Tag(name = "管理后台 - 支付应用信息") @@ -43,8 +36,6 @@ public class PayAppController { private PayAppService appService; @Resource private PayChannelService channelService; - @Resource - private PayMerchantService merchantService; @PostMapping("/create") @Operation(summary = "创建支付应用信息") @@ -112,17 +103,11 @@ public class PayAppController { // TODO @aquan:可以基于 appId 简历一个 multiMap。这样下面,直接 get 到之后,CollUtil buildSet 即可 Iterator iterator = channels.iterator(); - // 得到所有的商户信息 - Collection merchantIds = CollectionUtils.convertList(pageResult.getList(), PayAppDO::getMerchantId); - Map deptMap = merchantService.getMerchantMap(merchantIds); - // 利用反射将渠道数据复制到返回的数据结构中去 List appList = new ArrayList<>(pageResult.getList().size()); pageResult.getList().forEach(app -> { // 写入应用信息的数据 PayAppPageItemRespVO respVO = PayAppConvert.INSTANCE.pageConvert(app); - // 写入商户的数据 - respVO.setPayMerchant(PayAppConvert.INSTANCE.convert(deptMap.get(app.getMerchantId()))); // 写入支付渠道信息的数据 Set channelCodes = new HashSet<>(PayChannelEnum.values().length); while (iterator.hasNext()) { @@ -139,25 +124,4 @@ public class PayAppController { return success(new PageResult<>(appList, pageResult.getTotal())); } - @GetMapping("/export-excel") - @Operation(summary = "导出支付应用信息 Excel") - @PreAuthorize("@ss.hasPermission('pay:app:export')") - @OperateLog(type = EXPORT) - public void exportAppExcel(@Valid PayAppExportReqVO exportReqVO, - HttpServletResponse response) throws IOException { - List list = appService.getAppList(exportReqVO); - // 导出 Excel - List datas = PayAppConvert.INSTANCE.convertList02(list); - ExcelUtils.write(response, "支付应用信息.xls", "数据", PayAppExcelVO.class, datas); - } - - @GetMapping("/list-merchant-id") - @Operation(summary = "根据商户 ID 查询支付应用信息") - @Parameter(name = "merchantId", description = "商户ID", required = true, example = "1") - @PreAuthorize("@ss.hasPermission('pay:merchant:query')") - public CommonResult> getMerchantListByName(@RequestParam Long merchantId) { - List appListDO = appService.getListByMerchantId(merchantId); - return success(PayAppConvert.INSTANCE.convertList(appListDO)); - } - } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppBaseVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppBaseVO.java similarity index 82% rename from yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppBaseVO.java rename to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppBaseVO.java index 86ea5dce7..c6a4570b3 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppBaseVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; +package cn.iocoder.yudao.module.pay.controller.admin.app.vo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import javax.validation.constraints.*; @@ -29,8 +29,4 @@ public class PayAppBaseVO { @NotNull(message = "退款结果的回调地址不能为空") private String refundNotifyUrl; - @Schema(description = "商户编号", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "商户编号不能为空") - private Long merchantId; - } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppCreateReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppCreateReqVO.java similarity index 79% rename from yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppCreateReqVO.java rename to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppCreateReqVO.java index 36816cc24..03cab7d3e 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppCreateReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; +package cn.iocoder.yudao.module.pay.controller.admin.app.vo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppPageItemRespVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppPageItemRespVO.java similarity index 58% rename from yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppPageItemRespVO.java rename to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppPageItemRespVO.java index 99c095a32..0610d63fb 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppPageItemRespVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppPageItemRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; +package cn.iocoder.yudao.module.pay.controller.admin.app.vo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @@ -20,25 +20,7 @@ public class PayAppPageItemRespVO extends PayAppBaseVO { @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime createTime; - /** - * 所属商户 - */ - private PayMerchant payMerchant; - - @Schema(description = "商户") - @Data - public static class PayMerchant { - - @Schema(description = "商户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - private Long id; - - @Schema(description = "商户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "研发部") - private String name; - - } - - @Schema(description = "渠道编码集合", requiredMode = Schema.RequiredMode.REQUIRED, example = "alipay_pc,alipay_wap...") + @Schema(description = "渠道编码集合", requiredMode = Schema.RequiredMode.REQUIRED, example = "[alipay_pc, alipay_wap]") private Set channelCodes; - } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppPageReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppPageReqVO.java similarity index 86% rename from yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppPageReqVO.java rename to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppPageReqVO.java index 1aaadc78a..5a4cd1ce8 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppPageReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppPageReqVO.java @@ -1,10 +1,13 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; +package cn.iocoder.yudao.module.pay.controller.admin.app.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDateTime; -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import org.springframework.format.annotation.DateTimeFormat; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @@ -29,9 +32,6 @@ public class PayAppPageReqVO extends PageParam { @Schema(description = "退款结果的回调地址") private String refundNotifyUrl; - @Schema(description = "商户名称") - private String merchantName; - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @Schema(description = "创建时间") private LocalDateTime[] createTime; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppRespVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppRespVO.java similarity index 88% rename from yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppRespVO.java rename to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppRespVO.java index 78e6b20b0..87dadcbc7 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppRespVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; +package cn.iocoder.yudao.module.pay.controller.admin.app.vo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppUpdateReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppUpdateReqVO.java similarity index 87% rename from yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppUpdateReqVO.java rename to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppUpdateReqVO.java index 66f865acb..2cc363b6e 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppUpdateReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; +package cn.iocoder.yudao.module.pay.controller.admin.app.vo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import javax.validation.constraints.*; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppUpdateStatusReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppUpdateStatusReqVO.java similarity index 89% rename from yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppUpdateStatusReqVO.java rename to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppUpdateStatusReqVO.java index 5ab4a53e3..64b7ea444 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppUpdateStatusReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppUpdateStatusReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; +package cn.iocoder.yudao.module.pay.controller.admin.app.vo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayChannelController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/PayChannelController.java similarity index 71% rename from yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayChannelController.java rename to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/PayChannelController.java index cd88b4fd1..cec33bf1a 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayChannelController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/PayChannelController.java @@ -1,13 +1,14 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant; +package cn.iocoder.yudao.module.pay.controller.admin.channel; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.*; +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelCreateReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelPageReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelRespVO; +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelUpdateReqVO; import cn.iocoder.yudao.module.pay.convert.channel.PayChannelConvert; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; -import cn.iocoder.yudao.module.pay.service.merchant.PayChannelService; +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO; +import cn.iocoder.yudao.module.pay.service.channel.PayChannelService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameters; @@ -17,15 +18,12 @@ import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; -import java.io.IOException; import java.util.List; import java.util.Set; import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; @Tag(name = "管理后台 - 支付渠道") @RestController @@ -77,34 +75,17 @@ public class PayChannelController { return success(PayChannelConvert.INSTANCE.convertPage(pageResult)); } - @GetMapping("/export-excel") - @Operation(summary = "导出支付渠道Excel") - @PreAuthorize("@ss.hasPermission('pay:channel:export')") - @OperateLog(type = EXPORT) - public void exportChannelExcel(@Valid PayChannelExportReqVO exportReqVO, - HttpServletResponse response) throws IOException { - List list = channelService.getChannelList(exportReqVO); - // 导出 Excel - List datas = PayChannelConvert.INSTANCE.convertList02(list); - ExcelUtils.write(response, "支付渠道.xls", "数据", PayChannelExcelVO.class, datas); - } - // TODO 芋艿:需要 review 下实现 @GetMapping("/get-channel") @Operation(summary = "根据条件查询微信支付渠道") @Parameters({ - @Parameter(name = "merchantId", description = "商户编号", - required = true, example = "1"), - @Parameter(name = "appId", description = "应用编号", - required = true, example = "1"), - @Parameter(name = "code", description = "支付渠道编码", - required = true, example = "wx_pub") + @Parameter(name = "appId", description = "应用编号", required = true, example = "1"), + @Parameter(name = "code", description = "支付渠道编码", required = true, example = "wx_pub") }) @PreAuthorize("@ss.hasPermission('pay:channel:query')") - public CommonResult getChannel( - @RequestParam Long merchantId, @RequestParam Long appId, @RequestParam String code) { + public CommonResult getChannel(@RequestParam Long appId, @RequestParam String code) { // 獲取渠道 - PayChannelDO channel = channelService.getChannelByConditions(merchantId, appId, code); + PayChannelDO channel = channelService.getChannelByConditions(appId, code); if (channel == null) { return success(new PayChannelRespVO()); } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelBaseVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelBaseVO.java similarity index 81% rename from yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelBaseVO.java rename to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelBaseVO.java index 155066f01..48e98a3be 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelBaseVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelBaseVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; +package cn.iocoder.yudao.module.pay.controller.admin.channel.vo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import javax.validation.constraints.*; @@ -25,10 +25,6 @@ public class PayChannelBaseVO { @NotNull(message = "渠道费率,单位:百分比不能为空") private Double feeRate; - @Schema(description = "商户编号", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "商户编号不能为空") - private Long merchantId; - @Schema(description = "应用编号", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "应用编号不能为空") private Long appId; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelCreateReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelCreateReqVO.java similarity index 87% rename from yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelCreateReqVO.java rename to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelCreateReqVO.java index 89547bc1e..d43ebbd3c 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelCreateReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelCreateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; +package cn.iocoder.yudao.module.pay.controller.admin.channel.vo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelPageReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelPageReqVO.java similarity index 87% rename from yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelPageReqVO.java rename to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelPageReqVO.java index 00c724893..675730128 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelPageReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelPageReqVO.java @@ -1,10 +1,13 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; +package cn.iocoder.yudao.module.pay.controller.admin.channel.vo; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import org.springframework.format.annotation.DateTimeFormat; import java.time.LocalDateTime; -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import org.springframework.format.annotation.DateTimeFormat; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; @@ -26,9 +29,6 @@ public class PayChannelPageReqVO extends PageParam { @Schema(description = "渠道费率,单位:百分比") private Double feeRate; - @Schema(description = "商户编号") - private Long merchantId; - @Schema(description = "应用编号") private Long appId; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelRespVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelRespVO.java similarity index 89% rename from yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelRespVO.java rename to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelRespVO.java index 3defb466c..0d63aa25f 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelRespVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelRespVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; +package cn.iocoder.yudao.module.pay.controller.admin.channel.vo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelUpdateReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelUpdateReqVO.java similarity index 89% rename from yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelUpdateReqVO.java rename to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelUpdateReqVO.java index fc078dc70..357151ea2 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelUpdateReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelUpdateReqVO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; +package cn.iocoder.yudao.module.pay.controller.admin.channel.vo; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import javax.validation.constraints.*; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayMerchantController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayMerchantController.java deleted file mode 100644 index 2af7fa528..000000000 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayMerchantController.java +++ /dev/null @@ -1,116 +0,0 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant; - -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.*; -import cn.iocoder.yudao.module.pay.convert.merchant.PayMerchantConvert; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; -import cn.iocoder.yudao.module.pay.service.merchant.PayMerchantService; -import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Operation; -import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; - -import javax.annotation.Resource; -import javax.servlet.http.HttpServletResponse; -import javax.validation.Valid; -import java.io.IOException; -import java.util.Collection; -import java.util.List; - -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT; - -@Tag(name = "支付商户信息") -@RestController -@RequestMapping("/pay/merchant") -@Validated -public class PayMerchantController { - - @Resource - private PayMerchantService merchantService; - - @PostMapping("/create") - @Operation(summary = "创建支付商户信息") - @PreAuthorize("@ss.hasPermission('pay:merchant:create')") - public CommonResult createMerchant(@Valid @RequestBody PayMerchantCreateReqVO createReqVO) { - return success(merchantService.createMerchant(createReqVO)); - } - - @PutMapping("/update") - @Operation(summary = "更新支付商户信息") - @PreAuthorize("@ss.hasPermission('pay:merchant:update')") - public CommonResult updateMerchant(@Valid @RequestBody PayMerchantUpdateReqVO updateReqVO) { - merchantService.updateMerchant(updateReqVO); - return success(true); - } - - @PutMapping("/update-status") - @Operation(summary = "修改支付商户状态") - @PreAuthorize("@ss.hasPermission('pay:merchant:update')") - public CommonResult updateMerchantStatus(@Valid @RequestBody PayMerchantUpdateStatusReqVO reqVO) { - merchantService.updateMerchantStatus(reqVO.getId(), reqVO.getStatus()); - return success(true); - } - - @DeleteMapping("/delete") - @Operation(summary = "删除支付商户信息") - @Parameter(name = "id", description = "编号", required = true) - @PreAuthorize("@ss.hasPermission('pay:merchant:delete')") - public CommonResult deleteMerchant(@RequestParam("id") Long id) { - merchantService.deleteMerchant(id); - return success(true); - } - - @GetMapping("/get") - @Operation(summary = "获得支付商户信息") - @Parameter(name = "id", description = "编号", required = true, example = "1024") - @PreAuthorize("@ss.hasPermission('pay:merchant:query')") - public CommonResult getMerchant(@RequestParam("id") Long id) { - PayMerchantDO merchant = merchantService.getMerchant(id); - return success(PayMerchantConvert.INSTANCE.convert(merchant)); - } - - @GetMapping("/list-by-name") - @Operation(summary = "根据商户名称获得支付商户信息列表") - @Parameter(name = "name", description = "商户名称", example = "芋道") - @PreAuthorize("@ss.hasPermission('pay:merchant:query')") - public CommonResult> getMerchantListByName(@RequestParam(required = false) String name) { - List merchantListDO = merchantService.getMerchantListByName(name); - return success(PayMerchantConvert.INSTANCE.convertList(merchantListDO)); - } - - @GetMapping("/list") - @Operation(summary = "获得支付商户信息列表") - @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") - @PreAuthorize("@ss.hasPermission('pay:merchant:query')") - public CommonResult> getMerchantList(@RequestParam("ids") Collection ids) { - List list = merchantService.getMerchantList(ids); - return success(PayMerchantConvert.INSTANCE.convertList(list)); - } - - @GetMapping("/page") - @Operation(summary = "获得支付商户信息分页") - @PreAuthorize("@ss.hasPermission('pay:merchant:query')") - public CommonResult> getMerchantPage(@Valid PayMerchantPageReqVO pageVO) { - PageResult pageResult = merchantService.getMerchantPage(pageVO); - return success(PayMerchantConvert.INSTANCE.convertPage(pageResult)); - } - - @GetMapping("/export-excel") - @Operation(summary = "导出支付商户信息 Excel") - @PreAuthorize("@ss.hasPermission('pay:merchant:export')") - @OperateLog(type = EXPORT) - public void exportMerchantExcel(@Valid PayMerchantExportReqVO exportReqVO, - HttpServletResponse response) throws IOException { - List list = merchantService.getMerchantList(exportReqVO); - // 导出 Excel - List datas = PayMerchantConvert.INSTANCE.convertList02(list); - ExcelUtils.write(response, "支付商户信息.xls", "数据", PayMerchantExcelVO.class, datas); - } - -} diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppExcelVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppExcelVO.java deleted file mode 100644 index 20556e573..000000000 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppExcelVO.java +++ /dev/null @@ -1,40 +0,0 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; - -import com.alibaba.excel.annotation.ExcelProperty; -import lombok.Data; - -import java.time.LocalDateTime; - -/** - * 支付应用信息 Excel VO - * - * @author 芋艿 - */ -@Data -public class PayAppExcelVO { - - @ExcelProperty("应用编号") - private Long id; - - @ExcelProperty("应用名") - private String name; - - @ExcelProperty("开启状态") - private Integer status; - - @ExcelProperty("备注") - private String remark; - - @ExcelProperty("支付结果的回调地址") - private String payNotifyUrl; - - @ExcelProperty("退款结果的回调地址") - private String refundNotifyUrl; - - @ExcelProperty("商户编号") - private Long merchantId; - - @ExcelProperty("创建时间") - private LocalDateTime createTime; - -} diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppExportReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppExportReqVO.java deleted file mode 100644 index b13a6e65b..000000000 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppExportReqVO.java +++ /dev/null @@ -1,36 +0,0 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; - -import java.time.LocalDateTime; -import org.springframework.format.annotation.DateTimeFormat; - -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; - -@Schema(description = "管理后台 - 支付应用信息 Excel 导出 Request VO,参数和 PayAppPageReqVO 是一致的") -@Data -public class PayAppExportReqVO { - - @Schema(description = "应用名") - private String name; - - @Schema(description = "开启状态") - private Integer status; - - @Schema(description = "备注") - private String remark; - - @Schema(description = "支付结果的回调地址") - private String payNotifyUrl; - - @Schema(description = "退款结果的回调地址") - private String refundNotifyUrl; - - @Schema(description = "商户名称") - private String merchantName; - - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @Schema(description = "创建时间") - private LocalDateTime[] createTime; - -} diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelExcelVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelExcelVO.java deleted file mode 100644 index a37088955..000000000 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelExcelVO.java +++ /dev/null @@ -1,49 +0,0 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; - -import lombok.*; - -import java.time.LocalDateTime; - -import com.alibaba.excel.annotation.ExcelProperty; - -/** - * 支付渠道 Excel VO - * - * @author 芋艿 - */ -@Data -public class PayChannelExcelVO { - - @ExcelProperty("商户编号") - private Long id; - - @ExcelProperty("渠道编码") - private String code; - - @ExcelProperty("开启状态") - private Integer status; - - @ExcelProperty("备注") - private String remark; - - @ExcelProperty("渠道费率,单位:百分比") - private Double feeRate; - - @ExcelProperty("商户编号") - private Long merchantId; - - @ExcelProperty("应用编号") - private Long appId; - - /** - * todo @芋艿 mapStruct 存在转换问题 - * java: Can't map property "PayClientConfig payChannelDO.config" to "String payChannelExcelVO.config". - * Consider to declare/implement a mapping method: "String map(PayClientConfig value)". - */ - /// @ExcelProperty("支付渠道配置") - /// private String config; - - @ExcelProperty("创建时间") - private LocalDateTime createTime; - -} diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelExportReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelExportReqVO.java deleted file mode 100644 index 3a7e16fb5..000000000 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelExportReqVO.java +++ /dev/null @@ -1,39 +0,0 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; - -import java.time.LocalDateTime; -import org.springframework.format.annotation.DateTimeFormat; - -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; - -@Schema(description = "管理后台 - 支付渠道 Excel 导出 Request VO,参数和 PayChannelPageReqVO 是一致的") -@Data -public class PayChannelExportReqVO { - - @Schema(description = "渠道编码") - private String code; - - @Schema(description = "开启状态") - private Integer status; - - @Schema(description = "备注") - private String remark; - - @Schema(description = "渠道费率,单位:百分比") - private Double feeRate; - - @Schema(description = "商户编号") - private Long merchantId; - - @Schema(description = "应用编号") - private Long appId; - - @Schema(description = "支付渠道配置") - private String config; - - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @Schema(description = "创建时间") - private LocalDateTime[] createTime; - -} diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantBaseVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantBaseVO.java deleted file mode 100644 index e2692ec85..000000000 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantBaseVO.java +++ /dev/null @@ -1,29 +0,0 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -import javax.validation.constraints.NotNull; - -/** -* 支付商户信息 Base VO,提供给添加、修改、详细的子 VO 使用 -* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 -*/ -@Data -public class PayMerchantBaseVO { - - @Schema(description = "商户全称", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "商户全称不能为空") - private String name; - - @Schema(description = "商户简称", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "商户简称不能为空") - private String shortName; - - @Schema(description = "开启状态", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "开启状态不能为空") - private Integer status; - - @Schema(description = "备注") - private String remark; - -} diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantCreateReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantCreateReqVO.java deleted file mode 100644 index f63aa123f..000000000 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantCreateReqVO.java +++ /dev/null @@ -1,11 +0,0 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; - -@Schema(description = "管理后台 - 支付商户信息创建 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class PayMerchantCreateReqVO extends PayMerchantBaseVO { - -} diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantExcelVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantExcelVO.java deleted file mode 100644 index 821d55fe5..000000000 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantExcelVO.java +++ /dev/null @@ -1,40 +0,0 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; - -import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat; -import cn.iocoder.yudao.framework.excel.core.convert.DictConvert; -import com.alibaba.excel.annotation.ExcelProperty; -import lombok.Data; - -import java.time.LocalDateTime; - -/** - * 支付商户信息 Excel VO - * - * @author 芋艿 - */ -@Data -public class PayMerchantExcelVO { - - @ExcelProperty("商户编号") - private Long id; - - @ExcelProperty("商户号") - private String no; - - @ExcelProperty("商户全称") - private String name; - - @ExcelProperty("商户简称") - private String shortName; - - @ExcelProperty(value = "开启状态",converter = DictConvert.class) - @DictFormat("sys_common_status") - private Integer status; - - @ExcelProperty("备注") - private String remark; - - @ExcelProperty("创建时间") - private LocalDateTime createTime; - -} diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantExportReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantExportReqVO.java deleted file mode 100644 index 4903531c9..000000000 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantExportReqVO.java +++ /dev/null @@ -1,33 +0,0 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; - -import java.time.LocalDateTime; -import org.springframework.format.annotation.DateTimeFormat; - -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; - -@Schema(description = "管理后台 - 支付商户信息 Excel 导出 Request VO,参数和 PayMerchantPageReqVO 是一致的") -@Data -public class PayMerchantExportReqVO { - - @Schema(description = "商户号") - private String no; - - @Schema(description = "商户全称") - private String name; - - @Schema(description = "商户简称") - private String shortName; - - @Schema(description = "开启状态") - private Integer status; - - @Schema(description = "备注") - private String remark; - - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @Schema(description = "创建时间") - private LocalDateTime[] createTime; - -} diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantPageReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantPageReqVO.java deleted file mode 100644 index 0dccc4dab..000000000 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantPageReqVO.java +++ /dev/null @@ -1,36 +0,0 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; - -import java.time.LocalDateTime; -import cn.iocoder.yudao.framework.common.pojo.PageParam; -import org.springframework.format.annotation.DateTimeFormat; - -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; - -@Schema(description = "管理后台 - 支付商户信息分页 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class PayMerchantPageReqVO extends PageParam { - - @Schema(description = "商户号") - private String no; - - @Schema(description = "商户全称") - private String name; - - @Schema(description = "商户简称") - private String shortName; - - @Schema(description = "开启状态") - private Integer status; - - @Schema(description = "备注") - private String remark; - - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) - @Schema(description = "创建时间") - private LocalDateTime[] createTime; - -} diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantRespVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantRespVO.java deleted file mode 100644 index ca8d51884..000000000 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantRespVO.java +++ /dev/null @@ -1,25 +0,0 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; - -import java.time.LocalDateTime; - -@Schema(description = "管理后台 - 支付商户信息 Response VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class PayMerchantRespVO extends PayMerchantBaseVO { - - @Schema(description = "商户编号", requiredMode = Schema.RequiredMode.REQUIRED) - private Long id; - - @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) - private LocalDateTime createTime; - - @Schema(description = "商户号", requiredMode = Schema.RequiredMode.REQUIRED, example = "M233666999") - private String no; - -} diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateReqVO.java deleted file mode 100644 index 103c3d5a9..000000000 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateReqVO.java +++ /dev/null @@ -1,16 +0,0 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; -import javax.validation.constraints.*; - -@Schema(description = "管理后台 - 支付商户信息更新 Request VO") -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -public class PayMerchantUpdateReqVO extends PayMerchantBaseVO { - - @Schema(description = "商户编号", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "商户编号不能为空") - private Long id; - -} diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateStatusReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateStatusReqVO.java deleted file mode 100644 index eb3e8f1cf..000000000 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateStatusReqVO.java +++ /dev/null @@ -1,20 +0,0 @@ -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant; - -import io.swagger.v3.oas.annotations.media.Schema; -import lombok.Data; - -import javax.validation.constraints.NotNull; - -@Schema(description = "管理后台 - 商户更新状态 Request VO") -@Data -public class PayMerchantUpdateStatusReqVO { - - @Schema(description = "商户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") - @NotNull(message = "商户编号不能为空") - private Long id; - - @Schema(description = "状态,见 SysCommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") - @NotNull(message = "状态不能为空") - private Integer status; - -} diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java index a6a788297..fc753812a 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/PayOrderController.java @@ -10,12 +10,10 @@ import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum; import cn.iocoder.yudao.module.pay.controller.admin.order.vo.*; import cn.iocoder.yudao.module.pay.convert.order.PayOrderConvert; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO; import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO; -import cn.iocoder.yudao.module.pay.service.merchant.PayAppService; -import cn.iocoder.yudao.module.pay.service.merchant.PayMerchantService; +import cn.iocoder.yudao.module.pay.service.app.PayAppService; import cn.iocoder.yudao.module.pay.service.order.PayOrderExtensionService; import cn.iocoder.yudao.module.pay.service.order.PayOrderService; import io.swagger.v3.oas.annotations.Operation; @@ -48,8 +46,6 @@ public class PayOrderController { @Resource private PayOrderExtensionService orderExtensionService; @Resource - private PayMerchantService merchantService; - @Resource private PayAppService appService; @GetMapping("/get") @@ -71,13 +67,11 @@ public class PayOrderController { return success(new PayOrderDetailsRespVO()); } - PayMerchantDO merchantDO = merchantService.getMerchant(order.getMerchantId()); PayAppDO appDO = appService.getApp(order.getAppId()); PayChannelEnum channelEnum = PayChannelEnum.getByCode(order.getChannelCode()); // TODO @aquan:文案,都是前端 format; PayOrderDetailsRespVO respVO = PayOrderConvert.INSTANCE.orderDetailConvert(order); - respVO.setMerchantName(ObjectUtil.isNotNull(merchantDO) ? merchantDO.getName() : "未知商户"); respVO.setAppName(ObjectUtil.isNotNull(appDO) ? appDO.getName() : "未知应用"); respVO.setChannelCodeName(ObjectUtil.isNotNull(channelEnum) ? channelEnum.getName() : "未知渠道"); @@ -105,21 +99,16 @@ public class PayOrderController { return success(new PageResult<>(pageResult.getTotal())); } - // 处理商户ID数据 - Map merchantMap = merchantService.getMerchantMap( - CollectionUtils.convertList(pageResult.getList(), PayOrderDO::getMerchantId)); // 处理应用ID数据 Map appMap = appService.getAppMap( CollectionUtils.convertList(pageResult.getList(), PayOrderDO::getAppId)); List pageList = new ArrayList<>(pageResult.getList().size()); pageResult.getList().forEach(c -> { - PayMerchantDO merchantDO = merchantMap.get(c.getMerchantId()); PayAppDO appDO = appMap.get(c.getAppId()); PayChannelEnum channelEnum = PayChannelEnum.getByCode(c.getChannelCode()); PayOrderPageItemRespVO orderItem = PayOrderConvert.INSTANCE.pageConvertItemPage(c); - orderItem.setMerchantName(ObjectUtil.isNotNull(merchantDO) ? merchantDO.getName() : "未知商户"); orderItem.setAppName(ObjectUtil.isNotNull(appDO) ? appDO.getName() : "未知应用"); orderItem.setChannelCodeName(ObjectUtil.isNotNull(channelEnum) ? channelEnum.getName() : "未知渠道"); pageList.add(orderItem); @@ -133,16 +122,12 @@ public class PayOrderController { @OperateLog(type = EXPORT) public void exportOrderExcel(@Valid PayOrderExportReqVO exportReqVO, HttpServletResponse response) throws IOException { - List list = payOrderService.getOrderList(exportReqVO); if (CollectionUtil.isEmpty(list)) { ExcelUtils.write(response, "支付订单.xls", "数据", PayOrderExcelVO.class, new ArrayList<>()); } - // 处理商户ID数据 - Map merchantMap = merchantService.getMerchantMap( - CollectionUtils.convertList(list, PayOrderDO::getMerchantId)); // 处理应用ID数据 Map appMap = appService.getAppMap( CollectionUtils.convertList(list, PayOrderDO::getAppId)); @@ -152,13 +137,11 @@ public class PayOrderController { List excelDatum = new ArrayList<>(list.size()); list.forEach(c -> { - PayMerchantDO merchantDO = merchantMap.get(c.getMerchantId()); PayAppDO appDO = appMap.get(c.getAppId()); PayChannelEnum channelEnum = PayChannelEnum.getByCode(c.getChannelCode()); PayOrderExtensionDO orderExtensionDO = orderExtensionMap.get(c.getSuccessExtensionId()); PayOrderExcelVO excelItem = PayOrderConvert.INSTANCE.excelConvert(c); - excelItem.setMerchantName(ObjectUtil.isNotNull(merchantDO) ? merchantDO.getName() : "未知商户"); excelItem.setAppName(ObjectUtil.isNotNull(appDO) ? appDO.getName() : "未知应用"); excelItem.setChannelCodeName(ObjectUtil.isNotNull(channelEnum) ? channelEnum.getName() : "未知渠道"); excelItem.setNo(ObjectUtil.isNotNull(orderExtensionDO) ? orderExtensionDO.getNo() : ""); diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderBaseVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderBaseVO.java index e2c22aeed..97db64a17 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderBaseVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderBaseVO.java @@ -17,10 +17,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data public class PayOrderBaseVO { - @Schema(description = "商户编号", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "商户编号不能为空") - private Long merchantId; - @Schema(description = "应用编号", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "应用编号不能为空") private Long appId; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderDetailsRespVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderDetailsRespVO.java index 6a1d2c8f6..759450c93 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderDetailsRespVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderDetailsRespVO.java @@ -16,9 +16,6 @@ public class PayOrderDetailsRespVO extends PayOrderBaseVO { @Schema(description = "支付订单编号") private Long id; - @Schema(description = "商户名称") - private String merchantName; - @Schema(description = "应用名称") private String appName; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderExcelVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderExcelVO.java index 71b4879d7..540e6beec 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderExcelVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderExcelVO.java @@ -19,9 +19,6 @@ public class PayOrderExcelVO { @ExcelProperty("支付订单编号") private Long id; - @ExcelProperty(value = "商户名称") - private String merchantName; - @ExcelProperty(value = "应用名称") private String appName; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderExportReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderExportReqVO.java index a5783806c..b96f455ad 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderExportReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderExportReqVO.java @@ -12,9 +12,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data public class PayOrderExportReqVO { - @Schema(description = "商户编号") - private Long merchantId; - @Schema(description = "应用编号") private Long appId; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageItemRespVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageItemRespVO.java index 53ceb13d2..ada7c179b 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageItemRespVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageItemRespVO.java @@ -19,9 +19,6 @@ public class PayOrderPageItemRespVO extends PayOrderBaseVO { @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime createTime; - @Schema(description = "商户名称") - private String merchantName; - @Schema(description = "应用名称") private String appName; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageReqVO.java index 2ca72f9fc..4705feaf9 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/order/vo/PayOrderPageReqVO.java @@ -17,9 +17,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @ToString(callSuper = true) public class PayOrderPageReqVO extends PageParam { - @Schema(description = "商户编号") - private Long merchantId; - @Schema(description = "应用编号") private Long appId; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java index a49d42ec3..5f8446192 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/PayRefundController.java @@ -4,12 +4,10 @@ import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.ObjectUtil; import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.*; import cn.iocoder.yudao.module.pay.convert.refund.PayRefundConvert; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO; import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; -import cn.iocoder.yudao.module.pay.service.merchant.PayAppService; -import cn.iocoder.yudao.module.pay.service.merchant.PayMerchantService; +import cn.iocoder.yudao.module.pay.service.app.PayAppService; import cn.iocoder.yudao.module.pay.service.order.PayOrderService; import cn.iocoder.yudao.module.pay.service.refund.PayRefundService; import cn.iocoder.yudao.framework.common.pojo.CommonResult; @@ -48,8 +46,6 @@ public class PayRefundController { @Resource private PayRefundService refundService; @Resource - private PayMerchantService merchantService; - @Resource private PayAppService appService; @Resource private PayOrderService orderService; @@ -64,13 +60,11 @@ public class PayRefundController { return success(new PayRefundDetailsRespVO()); } - PayMerchantDO merchantDO = merchantService.getMerchant(refund.getMerchantId()); PayAppDO appDO = appService.getApp(refund.getAppId()); PayChannelEnum channelEnum = PayChannelEnum.getByCode(refund.getChannelCode()); PayOrderDO orderDO = orderService.getOrder(refund.getOrderId()); PayRefundDetailsRespVO refundDetail = PayRefundConvert.INSTANCE.refundDetailConvert(refund); - refundDetail.setMerchantName(ObjectUtil.isNotNull(merchantDO) ? merchantDO.getName() : "未知商户"); refundDetail.setAppName(ObjectUtil.isNotNull(appDO) ? appDO.getName() : "未知应用"); refundDetail.setChannelCodeName(ObjectUtil.isNotNull(channelEnum) ? channelEnum.getName() : "未知渠道"); refundDetail.setSubject(orderDO.getSubject()); @@ -87,21 +81,16 @@ public class PayRefundController { return success(new PageResult<>(pageResult.getTotal())); } - // 处理商户ID数据 - Map merchantMap = merchantService.getMerchantMap( - CollectionUtils.convertList(pageResult.getList(), PayRefundDO::getMerchantId)); // 处理应用ID数据 Map appMap = appService.getAppMap( CollectionUtils.convertList(pageResult.getList(), PayRefundDO::getAppId)); List list = new ArrayList<>(pageResult.getList().size()); pageResult.getList().forEach(c -> { - PayMerchantDO merchantDO = merchantMap.get(c.getMerchantId()); PayAppDO appDO = appMap.get(c.getAppId()); PayChannelEnum channelEnum = PayChannelEnum.getByCode(c.getChannelCode()); PayRefundPageItemRespVO item = PayRefundConvert.INSTANCE.pageItemConvert(c); - item.setMerchantName(ObjectUtil.isNotNull(merchantDO) ? merchantDO.getName() : "未知商户"); item.setAppName(ObjectUtil.isNotNull(appDO) ? appDO.getName() : "未知应用"); item.setChannelCodeName(ObjectUtil.isNotNull(channelEnum) ? channelEnum.getName() : "未知渠道"); list.add(item); @@ -123,9 +112,6 @@ public class PayRefundController { PayRefundExcelVO.class, new ArrayList<>()); } - // 处理商户ID数据 - Map merchantMap = merchantService.getMerchantMap( - CollectionUtils.convertList(list, PayRefundDO::getMerchantId)); // 处理应用ID数据 Map appMap = appService.getAppMap( CollectionUtils.convertList(list, PayRefundDO::getAppId)); @@ -136,12 +122,10 @@ public class PayRefundController { CollectionUtils.convertList(list, PayRefundDO::getOrderId)); list.forEach(c -> { - PayMerchantDO merchantDO = merchantMap.get(c.getMerchantId()); PayAppDO appDO = appMap.get(c.getAppId()); PayChannelEnum channelEnum = PayChannelEnum.getByCode(c.getChannelCode()); PayRefundExcelVO excelItem = PayRefundConvert.INSTANCE.excelConvert(c); - excelItem.setMerchantName(ObjectUtil.isNotNull(merchantDO) ? merchantDO.getName() : "未知商户"); excelItem.setAppName(ObjectUtil.isNotNull(appDO) ? appDO.getName() : "未知应用"); excelItem.setChannelCodeName(ObjectUtil.isNotNull(channelEnum) ? channelEnum.getName() : "未知渠道"); excelItem.setSubject(orderMap.get(c.getOrderId()).getSubject()); diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundBaseVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundBaseVO.java index 222c10bc6..35b791e10 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundBaseVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundBaseVO.java @@ -15,10 +15,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data public class PayRefundBaseVO { - @Schema(description = "商户编号", requiredMode = Schema.RequiredMode.REQUIRED) - @NotNull(message = "商户编号不能为空") - private Long merchantId; - @Schema(description = "应用编号", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "应用编号不能为空") private Long appId; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundDetailsRespVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundDetailsRespVO.java index 4f21dc1ef..f622dda79 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundDetailsRespVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundDetailsRespVO.java @@ -17,9 +17,6 @@ public class PayRefundDetailsRespVO extends PayRefundBaseVO { @Schema(description = "支付退款编号", requiredMode = Schema.RequiredMode.REQUIRED) private Long id; - @Schema(description = "商户名称") - private String merchantName; - @Schema(description = "应用名称") private String appName; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundExcelVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundExcelVO.java index c4ec3e733..5e412147b 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundExcelVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundExcelVO.java @@ -22,9 +22,6 @@ public class PayRefundExcelVO { @ExcelProperty("商品名称") private String subject; - @ExcelProperty(value = "商户名称") - private String merchantName; - @ExcelProperty(value = "应用名称") private String appName; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundExportReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundExportReqVO.java index bc7d7946b..02ef801b2 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundExportReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundExportReqVO.java @@ -12,9 +12,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @Data public class PayRefundExportReqVO { - @Schema(description = "商户编号") - private Long merchantId; - @Schema(description = "应用编号") private Long appId; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageItemRespVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageItemRespVO.java index be719565a..8c547c6e4 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageItemRespVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageItemRespVO.java @@ -16,9 +16,6 @@ public class PayRefundPageItemRespVO extends PayRefundBaseVO { @Schema(description = "支付订单编号", requiredMode = Schema.RequiredMode.REQUIRED) private Long id; - @Schema(description = "商户名称") - private String merchantName; - @Schema(description = "应用名称") private String appName; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageReqVO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageReqVO.java index 49d87f645..a7acc4db7 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageReqVO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/refund/vo/PayRefundPageReqVO.java @@ -17,9 +17,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ @ToString(callSuper = true) public class PayRefundPageReqVO extends PageParam { - @Schema(description = "商户编号") - private Long merchantId; - @Schema(description = "应用编号") private Long appId; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/channel/AppPayChannelController.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/channel/AppPayChannelController.java index 40cd0ae87..12323a7d5 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/channel/AppPayChannelController.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/channel/AppPayChannelController.java @@ -1,8 +1,8 @@ package cn.iocoder.yudao.module.pay.controller.app.channel; import cn.iocoder.yudao.framework.common.pojo.CommonResult; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; -import cn.iocoder.yudao.module.pay.service.merchant.PayChannelService; +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO; +import cn.iocoder.yudao.module.pay.service.channel.PayChannelService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.tags.Tag; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/app/PayAppConvert.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/app/PayAppConvert.java index 432699bc2..ef0be7e3d 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/app/PayAppConvert.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/app/PayAppConvert.java @@ -1,15 +1,16 @@ package cn.iocoder.yudao.module.pay.convert.app; -import java.util.*; - import cn.iocoder.yudao.framework.common.pojo.PageResult; - -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.*; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppCreateReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppPageItemRespVO; +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppRespVO; +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppUpdateReqVO; +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO; import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; +import java.util.List; + /** * 支付应用信息 Convert * @@ -22,8 +23,6 @@ public interface PayAppConvert { PayAppPageItemRespVO pageConvert (PayAppDO bean); - PayAppPageItemRespVO.PayMerchant convert(PayMerchantDO bean); - PayAppDO convert(PayAppCreateReqVO bean); PayAppDO convert(PayAppUpdateReqVO bean); @@ -34,6 +33,4 @@ public interface PayAppConvert { PageResult convertPage(PageResult page); - List convertList02(List list); - } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/channel/PayChannelConvert.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/channel/PayChannelConvert.java index 2535008ea..5baf598fd 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/channel/PayChannelConvert.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/channel/PayChannelConvert.java @@ -1,14 +1,10 @@ package cn.iocoder.yudao.module.pay.convert.channel; -import java.util.*; - import cn.iocoder.yudao.framework.common.pojo.PageResult; - -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelCreateReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelExcelVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelRespVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelUpdateReqVO; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelCreateReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelRespVO; +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelUpdateReqVO; +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.mapstruct.factory.Mappers; @@ -27,12 +23,6 @@ public interface PayChannelConvert { @Mapping(target = "config",expression = "java(cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString(bean.getConfig()))") PayChannelRespVO convert(PayChannelDO bean); - List convertList(List list); - PageResult convertPage(PageResult page); - List convertList02(List list); - - - } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/merchant/PayMerchantConvert.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/merchant/PayMerchantConvert.java deleted file mode 100644 index 1cb51a2bb..000000000 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/merchant/PayMerchantConvert.java +++ /dev/null @@ -1,32 +0,0 @@ -package cn.iocoder.yudao.module.pay.convert.merchant; - -import java.util.*; - -import cn.iocoder.yudao.framework.common.pojo.PageResult; - -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantCreateReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantExcelVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantRespVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantUpdateReqVO; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; -import org.mapstruct.Mapper; -import org.mapstruct.factory.Mappers; - -@Mapper -public interface PayMerchantConvert { - - PayMerchantConvert INSTANCE = Mappers.getMapper(PayMerchantConvert.class); - - PayMerchantDO convert(PayMerchantCreateReqVO bean); - - PayMerchantDO convert(PayMerchantUpdateReqVO bean); - - PayMerchantRespVO convert(PayMerchantDO bean); - - List convertList(List list); - - PageResult convertPage(PageResult page); - - List convertList02(List list); - -} diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/merchant/PayAppDO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/app/PayAppDO.java similarity index 88% rename from yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/merchant/PayAppDO.java rename to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/app/PayAppDO.java index 3fd02502c..9b073cc46 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/merchant/PayAppDO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/app/PayAppDO.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.pay.dal.dataobject.merchant; +package cn.iocoder.yudao.module.pay.dal.dataobject.app; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; @@ -54,11 +54,4 @@ public class PayAppDO extends BaseDO { */ private String refundNotifyUrl; - /** - * 商户编号 - * - * 关联 {@link PayMerchantDO#getId()} - */ - private Long merchantId; - } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/merchant/PayChannelDO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/channel/PayChannelDO.java similarity index 90% rename from yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/merchant/PayChannelDO.java rename to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/channel/PayChannelDO.java index 8bb73d159..72387eb1c 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/merchant/PayChannelDO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/channel/PayChannelDO.java @@ -1,9 +1,10 @@ -package cn.iocoder.yudao.module.pay.dal.dataobject.merchant; +package cn.iocoder.yudao.module.pay.dal.dataobject.channel; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.pay.core.client.PayClientConfig; import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum; import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO; import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; @@ -53,12 +54,6 @@ public class PayChannelDO extends TenantBaseDO { */ private String remark; - /** - * 商户编号 - * - * 关联 {@link PayMerchantDO#getId()} - */ - private Long merchantId; /** * 应用编号 * diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/merchant/PayMerchantDO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/merchant/PayMerchantDO.java deleted file mode 100644 index 035bce726..000000000 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/merchant/PayMerchantDO.java +++ /dev/null @@ -1,54 +0,0 @@ -package cn.iocoder.yudao.module.pay.dal.dataobject.merchant; - -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; -import com.baomidou.mybatisplus.annotation.*; -import lombok.*; - -/** - * 支付商户信息 DO - * 目前暂时没有特别的用途,主要为未来多商户提供基础。 - * - * @author 芋道源码 - */ -@TableName("pay_merchant") -@KeySequence("pay_merchant_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 -@Data -@EqualsAndHashCode(callSuper = true) -@ToString(callSuper = true) -@Builder -@NoArgsConstructor -@AllArgsConstructor -public class PayMerchantDO extends BaseDO { - - /** - * 商户编号,数据库自增 - */ - @TableId - private Long id; - /** - * 商户号 - * 例如说,M233666999 - * 只有新增时插入,不允许修改 - */ - private String no; - /** - * 商户全称 - */ - private String name; - /** - * 商户简称 - */ - private String shortName; - /** - * 状态 - * - * 枚举 {@link CommonStatusEnum} - */ - private Integer status; - /** - * 备注 - */ - private String remark; - -} diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/notify/PayNotifyTaskDO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/notify/PayNotifyTaskDO.java index e4d858089..d3d79c5f5 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/notify/PayNotifyTaskDO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/notify/PayNotifyTaskDO.java @@ -1,12 +1,11 @@ package cn.iocoder.yudao.module.pay.dal.dataobject.notify; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO; import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyStatusEnum; import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyTypeEnum; -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; @@ -42,12 +41,6 @@ public class PayNotifyTaskDO extends BaseDO { * 编号,自增 */ private Long id; - /** - * 商户编号 - * - * 关联 {@link PayMerchantDO#getId()} - */ - private Long merchantId; /** * 应用编号 * diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderDO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderDO.java index 56c062fd3..e44062f99 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderDO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderDO.java @@ -1,13 +1,12 @@ package cn.iocoder.yudao.module.pay.dal.dataobject.order; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; -import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum; -import cn.iocoder.yudao.module.pay.enums.refund.PayRefundTypeEnum; -import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum; +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO; +import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum; +import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; +import cn.iocoder.yudao.module.pay.enums.refund.PayRefundTypeEnum; import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.TableName; import lombok.*; @@ -33,12 +32,6 @@ public class PayOrderDO extends BaseDO { * 订单编号,数据库自增 */ private Long id; - /** - * 商户编号 - * - * 关联 {@link PayMerchantDO#getId()} - */ - private Long merchantId; /** * 应用编号 * diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderExtensionDO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderExtensionDO.java index ad377b2b5..a486e0562 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderExtensionDO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderExtensionDO.java @@ -1,6 +1,6 @@ package cn.iocoder.yudao.module.pay.dal.dataobject.order; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO; import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.KeySequence; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/refund/PayRefundDO.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/refund/PayRefundDO.java index fd6642daf..098778cd8 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/refund/PayRefundDO.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/refund/PayRefundDO.java @@ -1,13 +1,12 @@ package cn.iocoder.yudao.module.pay.dal.dataobject.refund; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum; +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO; import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum; import cn.iocoder.yudao.module.pay.enums.refund.PayRefundTypeEnum; -import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum; -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; import com.baomidou.mybatisplus.annotation.KeySequence; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; @@ -39,12 +38,6 @@ public class PayRefundDO extends BaseDO { @TableId private Long id; - /** - * 商户编号 - * - * 关联 {@link PayMerchantDO#getId()} - */ - private Long merchantId; /** * 应用编号 * diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/app/PayAppMapper.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/app/PayAppMapper.java new file mode 100644 index 000000000..6ac163a9e --- /dev/null +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/app/PayAppMapper.java @@ -0,0 +1,24 @@ +package cn.iocoder.yudao.module.pay.dal.mysql.app; + +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppPageReqVO; +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface PayAppMapper extends BaseMapperX { + + default PageResult selectPage(PayAppPageReqVO reqVO) { + return selectPage(reqVO, new QueryWrapperX() + .likeIfPresent("name", reqVO.getName()) + .eqIfPresent("status", reqVO.getStatus()) + .eqIfPresent("remark", reqVO.getRemark()) + .eqIfPresent("pay_notify_url", reqVO.getPayNotifyUrl()) + .eqIfPresent("refund_notify_url", reqVO.getRefundNotifyUrl()) + .betweenIfPresent("create_time", reqVO.getCreateTime()) + .orderByDesc("id")); + } + +} diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayChannelMapper.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/channel/PayChannelMapper.java similarity index 63% rename from yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayChannelMapper.java rename to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/channel/PayChannelMapper.java index 43cfdc528..2f7fd86fd 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayChannelMapper.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/channel/PayChannelMapper.java @@ -1,12 +1,11 @@ -package cn.iocoder.yudao.module.pay.dal.mysql.merchant; +package cn.iocoder.yudao.module.pay.dal.mysql.channel; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelExportReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelPageReqVO; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelPageReqVO; +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import org.apache.ibatis.annotations.Mapper; @@ -26,19 +25,6 @@ public interface PayChannelMapper extends BaseMapperX { .eqIfPresent("status", reqVO.getStatus()) .eqIfPresent("remark", reqVO.getRemark()) .eqIfPresent("fee_rate", reqVO.getFeeRate()) - .eqIfPresent("merchant_id", reqVO.getMerchantId()) - .eqIfPresent("app_id", reqVO.getAppId()) - .betweenIfPresent("create_time", reqVO.getCreateTime()) - .orderByDesc("id")); - } - - default List selectList(PayChannelExportReqVO reqVO) { - return selectList(new QueryWrapperX() - .eqIfPresent("code", reqVO.getCode()) - .eqIfPresent("status", reqVO.getStatus()) - .eqIfPresent("remark", reqVO.getRemark()) - .eqIfPresent("fee_rate", reqVO.getFeeRate()) - .eqIfPresent("merchant_id", reqVO.getMerchantId()) .eqIfPresent("app_id", reqVO.getAppId()) .betweenIfPresent("create_time", reqVO.getCreateTime()) .orderByDesc("id")); @@ -47,15 +33,13 @@ public interface PayChannelMapper extends BaseMapperX { /** * 根据条件获取渠道 * - * @param merchantId 商户编号 - * @param appI 应用编号 + * @param appId 应用编号 * @param code 渠道编码 * @return 数量 */ - default PayChannelDO selectOne(Long merchantId, Long appI, String code) { + default PayChannelDO selectOne(Long appId, String code) { return this.selectOne((new QueryWrapper().lambda() - .eq(PayChannelDO::getMerchantId, merchantId) - .eq(PayChannelDO::getAppId, appI) + .eq(PayChannelDO::getAppId, appId) .eq(PayChannelDO::getCode, code) )); } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayAppMapper.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayAppMapper.java deleted file mode 100644 index ef1ce0427..000000000 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayAppMapper.java +++ /dev/null @@ -1,53 +0,0 @@ -package cn.iocoder.yudao.module.pay.dal.mysql.merchant; - -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppExportReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppPageReqVO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import org.apache.ibatis.annotations.Mapper; - -import java.util.Collection; -import java.util.List; - -@Mapper -public interface PayAppMapper extends BaseMapperX { - - default PageResult selectPage(PayAppPageReqVO reqVO, Collection merchantIds) { - return selectPage(reqVO, new QueryWrapperX() - .likeIfPresent("name", reqVO.getName()) - .eqIfPresent("status", reqVO.getStatus()) - .eqIfPresent("remark", reqVO.getRemark()) - .eqIfPresent("pay_notify_url", reqVO.getPayNotifyUrl()) - .eqIfPresent("refund_notify_url", reqVO.getRefundNotifyUrl()) - .inIfPresent("merchant_id", merchantIds) - .betweenIfPresent("create_time", reqVO.getCreateTime()) - .orderByDesc("id")); - } - - default List selectList(PayAppExportReqVO reqVO, Collection merchantIds) { - return selectList(new QueryWrapperX() - .likeIfPresent("name", reqVO.getName()) - .eqIfPresent("status", reqVO.getStatus()) - .eqIfPresent("remark", reqVO.getRemark()) - .eqIfPresent("pay_notify_url", reqVO.getPayNotifyUrl()) - .eqIfPresent("refund_notify_url", reqVO.getRefundNotifyUrl()) - .inIfPresent("merchant_id", merchantIds) - .betweenIfPresent("create_time", reqVO.getCreateTime()) - .orderByDesc("id")); - } - - default List getListByMerchantId(Long merchantId) { - return selectList(new LambdaQueryWrapper() - .select(PayAppDO::getId, PayAppDO::getName) - .eq(PayAppDO::getMerchantId, merchantId)); - } - - // TODO @aquan:方法名补充 ByMerchantId - default Long selectCount(Long merchantId) { - return selectCount(new LambdaQueryWrapper().eq(PayAppDO::getMerchantId, merchantId)); - } - -} diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayMerchantMapper.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayMerchantMapper.java deleted file mode 100644 index c418aa958..000000000 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayMerchantMapper.java +++ /dev/null @@ -1,48 +0,0 @@ -package cn.iocoder.yudao.module.pay.dal.mysql.merchant; - -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantExportReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantPageReqVO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; -import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; -import org.apache.ibatis.annotations.Mapper; - -import java.util.List; - -@Mapper -public interface PayMerchantMapper extends BaseMapperX { - - default PageResult selectPage(PayMerchantPageReqVO reqVO) { - return selectPage(reqVO, new QueryWrapperX() - .likeIfPresent("no", reqVO.getNo()) - .likeIfPresent("name", reqVO.getName()) - .likeIfPresent("short_name", reqVO.getShortName()) - .eqIfPresent("status", reqVO.getStatus()) - .eqIfPresent("remark", reqVO.getRemark()) - .betweenIfPresent("create_time", reqVO.getCreateTime()) - .orderByDesc("id")); - } - - default List selectList(PayMerchantExportReqVO reqVO) { - return selectList(new QueryWrapperX() - .likeIfPresent("no", reqVO.getNo()) - .likeIfPresent("name", reqVO.getName()) - .likeIfPresent("short_name", reqVO.getShortName()) - .eqIfPresent("status", reqVO.getStatus()) - .eqIfPresent("remark", reqVO.getRemark()) - .betweenIfPresent("create_time", reqVO.getCreateTime()) - .orderByDesc("id")); - } - - /** - * 根据商户名称模糊查询商户集合 - * - * @param merchantName 商户名称 - * @return 商户集合 - */ - default List getMerchantListByName(String merchantName) { - return this.selectList(new QueryWrapperX() - .likeIfPresent("name", merchantName)); - } -} diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/order/PayOrderMapper.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/order/PayOrderMapper.java index 8d7daa4fb..5d90f41f9 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/order/PayOrderMapper.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/order/PayOrderMapper.java @@ -18,7 +18,6 @@ public interface PayOrderMapper extends BaseMapperX { default PageResult selectPage(PayOrderPageReqVO reqVO) { return selectPage(reqVO, new QueryWrapperX() - .eqIfPresent("merchant_id", reqVO.getMerchantId()) .eqIfPresent("app_id", reqVO.getAppId()) .eqIfPresent("channel_id", reqVO.getChannelId()) .eqIfPresent("channel_code", reqVO.getChannelCode()) @@ -33,7 +32,6 @@ public interface PayOrderMapper extends BaseMapperX { default List selectList(PayOrderExportReqVO reqVO) { return selectList(new QueryWrapperX() - .eqIfPresent("merchant_id", reqVO.getMerchantId()) .eqIfPresent("app_id", reqVO.getAppId()) .eqIfPresent("channel_id", reqVO.getChannelId()) .eqIfPresent("channel_code", reqVO.getChannelCode()) diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/refund/PayRefundMapper.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/refund/PayRefundMapper.java index 38fa4bc66..7614c8f8e 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/refund/PayRefundMapper.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/refund/PayRefundMapper.java @@ -16,7 +16,6 @@ public interface PayRefundMapper extends BaseMapperX { default PageResult selectPage(PayRefundPageReqVO reqVO) { return selectPage(reqVO, new QueryWrapperX() - .eqIfPresent("merchant_id", reqVO.getMerchantId()) .eqIfPresent("app_id", reqVO.getAppId()) .eqIfPresent("channel_code", reqVO.getChannelCode()) .likeIfPresent("merchant_refund_no", reqVO.getMerchantRefundNo()) @@ -29,7 +28,6 @@ public interface PayRefundMapper extends BaseMapperX { default List selectList(PayRefundExportReqVO reqVO) { return selectList(new QueryWrapperX() - .eqIfPresent("merchant_id", reqVO.getMerchantId()) .eqIfPresent("app_id", reqVO.getAppId()) .eqIfPresent("channel_code", reqVO.getChannelCode()) .likeIfPresent("merchant_refund_no", reqVO.getMerchantRefundNo()) diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayAppService.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/app/PayAppService.java similarity index 64% rename from yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayAppService.java rename to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/app/PayAppService.java index feb03e0a9..14dce0a18 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayAppService.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/app/PayAppService.java @@ -1,13 +1,12 @@ -package cn.iocoder.yudao.module.pay.service.merchant; +package cn.iocoder.yudao.module.pay.service.app; import cn.iocoder.yudao.framework.common.exception.ServiceException; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppCreateReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppExportReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppPageReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppUpdateReqVO; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppCreateReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppPageReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppUpdateReqVO; +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO; import javax.validation.Valid; import java.util.Collection; @@ -67,14 +66,6 @@ public interface PayAppService { */ PageResult getAppPage(PayAppPageReqVO pageReqVO); - /** - * 获得支付应用信息列表, 用于 Excel 导出 - * - * @param exportReqVO 查询条件 - * @return 支付应用信息列表 - */ - List getAppList(PayAppExportReqVO exportReqVO); - /** * 修改应用信息状态 * @@ -83,22 +74,14 @@ public interface PayAppService { */ void updateAppStatus(Long id, Integer status); - /** - * 根据商户 ID 获得支付应用信息列表, - * - * @param merchantId 商户 ID - * @return 支付应用信息列表 - */ - List getListByMerchantId(Long merchantId); - /** * 获得指定编号的商户 Map * - * @param appIdList 应用编号集合 + * @param ids 应用编号集合 * @return 商户 Map */ - default Map getAppMap(Collection appIdList) { - List list = this.getAppList(appIdList); + default Map getAppMap(Collection ids) { + List list = getAppList(ids); return CollectionUtils.convertMap(list, PayAppDO::getId); } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayAppServiceImpl.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/app/PayAppServiceImpl.java similarity index 64% rename from yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayAppServiceImpl.java rename to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/app/PayAppServiceImpl.java index 1a7e2bebf..5f70fb5fe 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayAppServiceImpl.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/app/PayAppServiceImpl.java @@ -1,21 +1,16 @@ -package cn.iocoder.yudao.module.pay.service.merchant; +package cn.iocoder.yudao.module.pay.service.app; -import cn.hutool.core.collection.CollectionUtil; -import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppCreateReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppExportReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppPageReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppUpdateReqVO; +import cn.iocoder.yudao.framework.common.pojo.PageResult; +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppCreateReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppPageReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppUpdateReqVO; import cn.iocoder.yudao.module.pay.convert.app.PayAppConvert; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; -import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayAppMapper; -import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayMerchantMapper; +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO; +import cn.iocoder.yudao.module.pay.dal.mysql.app.PayAppMapper; import cn.iocoder.yudao.module.pay.dal.mysql.order.PayOrderMapper; import cn.iocoder.yudao.module.pay.dal.mysql.refund.PayRefundMapper; -import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants; import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum; @@ -24,11 +19,12 @@ import org.springframework.stereotype.Service; import org.springframework.validation.annotation.Validated; import javax.annotation.Resource; -import java.util.*; +import java.util.Collection; +import java.util.List; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; -import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.*; +import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.PAY_APP_EXIST_TRANSACTION_ORDER_CANT_DELETE; +import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.PAY_APP_NOT_FOUND; /** * 支付应用信息 Service 实现类 @@ -41,9 +37,7 @@ public class PayAppServiceImpl implements PayAppService { @Resource private PayAppMapper appMapper; - // TODO @aquan:使用对方的 Service。模块与模块之间,避免直接调用对方的 mapper - @Resource - private PayMerchantMapper merchantMapper; + // TODO 芋艿:不能调用对方的 mapper @Resource private PayOrderMapper orderMapper; @Resource @@ -95,33 +89,7 @@ public class PayAppServiceImpl implements PayAppService { @Override public PageResult getAppPage(PayAppPageReqVO pageReqVO) { - Set merchantIdList = this.getMerchantCondition(pageReqVO.getMerchantName()); - if (StrUtil.isNotBlank(pageReqVO.getMerchantName()) && CollectionUtil.isEmpty(merchantIdList)) { - return new PageResult<>(); - } - return appMapper.selectPage(pageReqVO, merchantIdList); - } - - @Override - public List getAppList(PayAppExportReqVO exportReqVO) { - Set merchantIdList = this.getMerchantCondition(exportReqVO.getMerchantName()); - if (StrUtil.isNotBlank(exportReqVO.getMerchantName()) && CollectionUtil.isEmpty(merchantIdList)) { - return new ArrayList<>(); - } - return appMapper.selectList(exportReqVO, merchantIdList); - } - - /** - * 获取商户编号集合,根据商户名称模糊查询得到所有的商户编号集合 - * - * @param merchantName 商户名称 - * @return 商户编号集合 - */ - private Set getMerchantCondition(String merchantName) { - if (StrUtil.isBlank(merchantName)) { - return Collections.emptySet(); - } - return convertSet(merchantMapper.getMerchantListByName(merchantName), PayMerchantDO::getId); + return appMapper.selectPage(pageReqVO); } @Override @@ -135,11 +103,6 @@ public class PayAppServiceImpl implements PayAppService { appMapper.updateById(app); } - @Override - public List getListByMerchantId(Long merchantId) { - return appMapper.getListByMerchantId(merchantId); - } - /** * 检查商户是否存在 * diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelService.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/channel/PayChannelService.java similarity index 71% rename from yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelService.java rename to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/channel/PayChannelService.java index e9eac87f5..3c634b8a9 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelService.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/channel/PayChannelService.java @@ -1,12 +1,11 @@ -package cn.iocoder.yudao.module.pay.service.merchant; +package cn.iocoder.yudao.module.pay.service.channel; import cn.iocoder.yudao.framework.common.exception.ServiceException; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelCreateReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelExportReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelPageReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelUpdateReqVO; import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelCreateReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelPageReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelUpdateReqVO; +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO; import javax.validation.Valid; import java.util.Collection; @@ -58,20 +57,10 @@ public interface PayChannelService { * 获得支付渠道分页 * * @param pageReqVO 分页查询 - * @return 支付渠道 - * 分页 + * @return 支付渠道分页 */ PageResult getChannelPage(PayChannelPageReqVO pageReqVO); - /** - * 获得支付渠道 - * 列表, 用于 Excel 导出 - * - * @param exportReqVO 查询条件 - * @return 支付渠道列表 - */ - List getChannelList(PayChannelExportReqVO exportReqVO); - /** * 根据支付应用ID集合获得支付渠道列表 * @@ -83,12 +72,11 @@ public interface PayChannelService { /** * 根据条件获取渠道 * - * @param merchantId 商户编号 * @param appid 应用编号 * @param code 渠道编码 * @return 数量 */ - PayChannelDO getChannelByConditions(Long merchantId, Long appid, String code); + PayChannelDO getChannelByConditions(Long appid, String code); /** * 支付渠道的合法性 diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelServiceImpl.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/channel/PayChannelServiceImpl.java similarity index 82% rename from yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelServiceImpl.java rename to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/channel/PayChannelServiceImpl.java index 23772a72a..de3d51ba7 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelServiceImpl.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/channel/PayChannelServiceImpl.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.pay.service.merchant; +package cn.iocoder.yudao.module.pay.service.channel; import cn.hutool.core.util.ObjectUtil; import cn.hutool.json.JSONUtil; @@ -9,13 +9,12 @@ import cn.iocoder.yudao.framework.pay.core.client.PayClientConfig; import cn.iocoder.yudao.framework.pay.core.client.PayClientFactory; import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum; import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelCreateReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelExportReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelPageReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelUpdateReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelCreateReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelPageReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelUpdateReqVO; import cn.iocoder.yudao.module.pay.convert.channel.PayChannelConvert; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; -import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayChannelMapper; +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO; +import cn.iocoder.yudao.module.pay.dal.mysql.channel.PayChannelMapper; import cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; @@ -71,7 +70,7 @@ public class PayChannelServiceImpl implements PayChannelService { @Override public Long createChannel(PayChannelCreateReqVO reqVO) { // 断言是否有重复的 - PayChannelDO channelDO = this.getChannelByConditions(reqVO.getMerchantId(), reqVO.getAppId(), reqVO.getCode()); + PayChannelDO channelDO = this.getChannelByConditions(reqVO.getAppId(), reqVO.getCode()); if (ObjectUtil.isNotNull(channelDO)) { throw exception(CHANNEL_EXIST_SAME_CHANNEL_ERROR); } @@ -120,33 +119,14 @@ public class PayChannelServiceImpl implements PayChannelService { return channelMapper.selectPage(pageReqVO); } - @Override - public List getChannelList(PayChannelExportReqVO exportReqVO) { - return channelMapper.selectList(exportReqVO); - } - - /** - * 根据支付应用ID集合获得支付渠道列表 - * - * @param appIds 应用编号集合 - * @return 支付渠道列表 - */ @Override public List getChannelListByAppIds(Collection appIds) { return channelMapper.getChannelListByAppIds(appIds); } - /** - * 根据条件获取渠道 - * - * @param merchantId 商户编号 - * @param appid 应用编号 - * @param code 渠道编码 - * @return 数量 - */ @Override - public PayChannelDO getChannelByConditions(Long merchantId, Long appid, String code) { - return this.channelMapper.selectOne(merchantId, appid, code); + public PayChannelDO getChannelByConditions(Long appid, String code) { + return this.channelMapper.selectOne(appid, code); } /** diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantService.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantService.java deleted file mode 100644 index 40f02b99c..000000000 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantService.java +++ /dev/null @@ -1,104 +0,0 @@ -package cn.iocoder.yudao.module.pay.service.merchant; - -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantCreateReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantExportReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantPageReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantUpdateReqVO; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; - -import javax.validation.Valid; -import java.util.Collection; -import java.util.List; -import java.util.Map; - -/** - * 支付商户信息 Service 接口 - * - * @author aquan - */ -public interface PayMerchantService { - - /** - * 创建支付商户信息 - * - * @param createReqVO 创建信息 - * @return 编号 - */ - Long createMerchant(@Valid PayMerchantCreateReqVO createReqVO); - - /** - * 更新支付商户信息 - * - * @param updateReqVO 更新信息 - */ - void updateMerchant(@Valid PayMerchantUpdateReqVO updateReqVO); - - /** - * 删除支付商户信息 - * - * @param id 编号 - */ - void deleteMerchant(Long id); - - /** - * 获得支付商户信息 - * - * @param id 编号 - * @return 支付商户信息 - */ - PayMerchantDO getMerchant(Long id); - - /** - * 获得支付商户信息列表 - * - * @param ids 编号 - * @return 支付商户信息列表 - */ - List getMerchantList(Collection ids); - - /** - * 获得支付商户信息分页 - * - * @param pageReqVO 分页查询 - * @return 支付商户信息分页 - */ - PageResult getMerchantPage(PayMerchantPageReqVO pageReqVO); - - /** - * 获得支付商户信息列表, 用于 Excel 导出 - * - * @param exportReqVO 查询条件 - * @return 支付商户信息列表 - */ - List getMerchantList(PayMerchantExportReqVO exportReqVO); - - /** - * 修改商户状态 - * - * @param id 商户编号 - * @param status 状态 - */ - void updateMerchantStatus(Long id, Integer status); - - /** - * 根据商户名称模糊查询商户集合 - * - * @param merchantName 商户名称 - * @return 商户集合 - */ - List getMerchantListByName(String merchantName); - - /** - * 获得指定编号的商户 Map - * - * @param merchantIds 商户编号数组 - * @return 商户 Map - */ - default Map getMerchantMap(Collection merchantIds) { - List list = this.getMerchantList(merchantIds); - return CollectionUtils.convertMap(list, PayMerchantDO::getId); - } - -} diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantServiceImpl.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantServiceImpl.java deleted file mode 100644 index c14a87d7d..000000000 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantServiceImpl.java +++ /dev/null @@ -1,148 +0,0 @@ -package cn.iocoder.yudao.module.pay.service.merchant; - -import cn.hutool.core.date.DateUtil; -import cn.hutool.core.util.ObjectUtil; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantCreateReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantExportReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantPageReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantUpdateReqVO; -import cn.iocoder.yudao.module.pay.convert.merchant.PayMerchantConvert; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; -import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayAppMapper; -import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayMerchantMapper; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import com.google.common.annotations.VisibleForTesting; -import org.springframework.stereotype.Service; -import org.springframework.validation.annotation.Validated; - -import javax.annotation.Resource; -import java.time.LocalDateTime; -import java.util.Collection; -import java.util.List; - -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; -import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.*; - -/** - * 支付商户信息 Service 实现类 - * - * @author aquan - */ -@Service -@Validated -public class PayMerchantServiceImpl implements PayMerchantService { - - @Resource - private PayMerchantMapper merchantMapper; - - @Resource - private PayAppMapper appMapper; - - @Override - public Long createMerchant(PayMerchantCreateReqVO createReqVO) { - // 插入 - PayMerchantDO merchant = PayMerchantConvert.INSTANCE.convert(createReqVO); - merchant.setNo(this.generateMerchantNo()); - merchantMapper.insert(merchant); - // 返回 - return merchant.getId(); - } - - @Override - public void updateMerchant(PayMerchantUpdateReqVO updateReqVO) { - // 校验存在 - this.validateMerchantExists(updateReqVO.getId()); - // 更新 - PayMerchantDO updateObj = PayMerchantConvert.INSTANCE.convert(updateReqVO); - merchantMapper.updateById(updateObj); - } - - @Override - public void deleteMerchant(Long id) { - // 校验 - this.validateMerchantExists(id); - this.validateAppExists(id); - // 删除 - merchantMapper.deleteById(id); - } - - @Override - public PayMerchantDO getMerchant(Long id) { - return merchantMapper.selectById(id); - } - - @Override - public List getMerchantList(Collection ids) { - return merchantMapper.selectBatchIds(ids); - } - - @Override - public PageResult getMerchantPage(PayMerchantPageReqVO pageReqVO) { - return merchantMapper.selectPage(pageReqVO); - } - - @Override - public List getMerchantList(PayMerchantExportReqVO exportReqVO) { - return merchantMapper.selectList(exportReqVO); - } - - @Override - public void updateMerchantStatus(Long id, Integer status) { - // 校验商户存在 - this.checkMerchantExists(id); - // 更新状态 - PayMerchantDO merchant = new PayMerchantDO(); - merchant.setId(id); - merchant.setStatus(status); - merchantMapper.updateById(merchant); - } - - @Override - public List getMerchantListByName(String merchantName) { - return this.merchantMapper.getMerchantListByName(merchantName); - } - - @VisibleForTesting - public void checkMerchantExists(Long id) { - if (id == null) { - return; - } - PayMerchantDO merchant = merchantMapper.selectById(id); - if (merchant == null) { - throw exception(PAY_MERCHANT_NOT_EXISTS); - } - } - - /** - * 校验商户是否存在 - * - * @param id 商户 ID - */ - private void validateMerchantExists(Long id) { - if (ObjectUtil.isNull(merchantMapper.selectById(id))) { - throw exception(PAY_MERCHANT_NOT_EXISTS); - } - } - - /** - * 校验商户是否还存在支付应用 - * - * @param id 商户ID - */ - private void validateAppExists(Long id) { - if (appMapper.selectCount(id) > 0) { - throw exception(PAY_MERCHANT_EXIST_APP_CANT_DELETE); - } - } - - // TODO @芋艿:后续增加下合适的算法 - /** - * 根据年月日时分秒毫秒生成商户号 - * - * @return 商户号 - */ - private String generateMerchantNo() { - return "M" + DateUtil.format(LocalDateTime.now(), "yyyyMMddHHmmssSSS"); - } - -} diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/notify/PayNotifyServiceImpl.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/notify/PayNotifyServiceImpl.java index 73cfe7e68..43179b716 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/notify/PayNotifyServiceImpl.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/notify/PayNotifyServiceImpl.java @@ -91,14 +91,14 @@ public class PayNotifyServiceImpl implements PayNotifyService { task.setType(reqDTO.getType()).setDataId(reqDTO.getDataId()); task.setStatus(PayNotifyStatusEnum.WAITING.getStatus()).setNextNotifyTime(LocalDateTime.now()) .setNotifyTimes(0).setMaxNotifyTimes(PayNotifyTaskDO.NOTIFY_FREQUENCY.length + 1); - // 补充 merchantId + appId + notifyUrl 字段 + // 补充 appId + notifyUrl 字段 if (Objects.equals(task.getType(), PayNotifyTypeEnum.ORDER.getType())) { PayOrderDO order = orderService.getOrder(task.getDataId()); // 不进行非空判断,有问题直接异常 - task.setMerchantId(order.getMerchantId()).setAppId(order.getAppId()). + task.setAppId(order.getAppId()). setMerchantOrderId(order.getMerchantOrderId()).setNotifyUrl(order.getNotifyUrl()); } else if (Objects.equals(task.getType(), PayNotifyTypeEnum.REFUND.getType())) { PayRefundDO refundDO = refundService.getRefund(task.getDataId()); - task.setMerchantId(refundDO.getMerchantId()).setAppId(refundDO.getAppId()) + task.setAppId(refundDO.getAppId()) .setMerchantOrderId(refundDO.getMerchantOrderId()).setNotifyUrl(refundDO.getNotifyUrl()); } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceImpl.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceImpl.java index f8f6f54b4..ff3313ff0 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceImpl.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceImpl.java @@ -18,8 +18,8 @@ import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderPageReqVO; import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderSubmitReqVO; import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderSubmitRespVO; import cn.iocoder.yudao.module.pay.convert.order.PayOrderConvert; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO; import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO; import cn.iocoder.yudao.module.pay.dal.mysql.order.PayOrderExtensionMapper; @@ -28,8 +28,8 @@ import cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants; import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyTypeEnum; import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum; import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; -import cn.iocoder.yudao.module.pay.service.merchant.PayAppService; -import cn.iocoder.yudao.module.pay.service.merchant.PayChannelService; +import cn.iocoder.yudao.module.pay.service.app.PayAppService; +import cn.iocoder.yudao.module.pay.service.channel.PayChannelService; import cn.iocoder.yudao.module.pay.service.notify.PayNotifyService; import cn.iocoder.yudao.module.pay.service.notify.dto.PayNotifyTaskCreateReqDTO; import lombok.extern.slf4j.Slf4j; @@ -109,8 +109,7 @@ public class PayOrderServiceImpl implements PayOrderService { } // 创建支付交易单 - order = PayOrderConvert.INSTANCE.convert(reqDTO) - .setMerchantId(app.getMerchantId()).setAppId(app.getId()); + order = PayOrderConvert.INSTANCE.convert(reqDTO).setAppId(app.getId()); // 商户相关字段 order.setNotifyUrl(app.getPayNotifyUrl()) .setNotifyStatus(PayOrderNotifyStatusEnum.NO.getStatus()); diff --git a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceImpl.java b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceImpl.java index 3c63f39f2..9d113b84d 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceImpl.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceImpl.java @@ -14,8 +14,8 @@ import cn.iocoder.yudao.framework.pay.core.enums.refund.PayNotifyRefundStatusEnu import cn.iocoder.yudao.module.pay.api.refund.dto.PayRefundCreateReqDTO; import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundExportReqVO; import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundPageReqVO; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO; +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO; import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO; import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; @@ -27,8 +27,8 @@ import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum; import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum; import cn.iocoder.yudao.module.pay.enums.refund.PayRefundTypeEnum; -import cn.iocoder.yudao.module.pay.service.merchant.PayAppService; -import cn.iocoder.yudao.module.pay.service.merchant.PayChannelService; +import cn.iocoder.yudao.module.pay.service.app.PayAppService; +import cn.iocoder.yudao.module.pay.service.channel.PayChannelService; import cn.iocoder.yudao.module.pay.service.notify.PayNotifyService; import cn.iocoder.yudao.module.pay.service.notify.dto.PayNotifyTaskCreateReqDTO; import cn.iocoder.yudao.module.pay.service.order.PayOrderExtensionService; @@ -141,7 +141,6 @@ public class PayRefundServiceImpl implements PayRefundService { .channelOrderNo(order.getChannelOrderNo()) .channelCode(order.getChannelCode()) .channelId(order.getChannelId()) - .merchantId(order.getMerchantId()) .orderId(order.getId()) .merchantRefundNo(merchantRefundId) // TODO 芋艿:需要优化 .notifyUrl(app.getRefundNotifyUrl()) diff --git a/yudao-module-pay/yudao-module-pay-biz/src/test-integration/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayChannelMapperIntegrationTest.java b/yudao-module-pay/yudao-module-pay-biz/src/test-integration/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayChannelMapperIntegrationTest.java index c33bcb713..2150a8a15 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/test-integration/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayChannelMapperIntegrationTest.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/test-integration/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayChannelMapperIntegrationTest.java @@ -29,7 +29,6 @@ public class PayChannelMapperIntegrationTest extends BaseDbIntegrationTest { payChannelDO.setCode(PayChannelEnum.WX_PUB.getCode()); payChannelDO.setStatus(CommonStatusEnum.ENABLE.getStatus()); payChannelDO.setFeeRate(1D); - payChannelDO.setMerchantId(1L); payChannelDO.setAppId(6L); // 配置 WXPayClientConfig config = new WXPayClientConfig(); @@ -55,7 +54,6 @@ public class PayChannelMapperIntegrationTest extends BaseDbIntegrationTest { payChannelDO.setCode(PayChannelEnum.ALIPAY_QR.getCode()); payChannelDO.setStatus(CommonStatusEnum.ENABLE.getStatus()); payChannelDO.setFeeRate(1D); - payChannelDO.setMerchantId(1L); payChannelDO.setAppId(6L); // 配置 AlipayPayClientConfig config = new AlipayPayClientConfig(); diff --git a/yudao-module-pay/yudao-module-pay-biz/src/test-integration/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceIntegrationTest.java b/yudao-module-pay/yudao-module-pay-biz/src/test-integration/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceIntegrationTest.java index f6f953635..983bd16b5 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/test-integration/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceIntegrationTest.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/test-integration/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceIntegrationTest.java @@ -1,7 +1,7 @@ package cn.iocoder.yudao.module.pay.service.order; -import cn.iocoder.yudao.module.pay.service.merchant.PayAppServiceImpl; -import cn.iocoder.yudao.module.pay.service.merchant.PayChannelServiceImpl; +import cn.iocoder.yudao.module.pay.service.channel.PayAppServiceImpl; +import cn.iocoder.yudao.module.pay.service.channel.PayChannelServiceImpl; import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderCreateReqDTO; import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderSubmitReqDTO; import cn.iocoder.yudao.module.pay.test.BaseDbIntegrationTest; diff --git a/yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayAppServiceTest.java b/yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/app/PayAppServiceTest.java similarity index 54% rename from yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayAppServiceTest.java rename to yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/app/PayAppServiceTest.java index 95851a551..3fad0745b 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayAppServiceTest.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/app/PayAppServiceTest.java @@ -1,26 +1,19 @@ -package cn.iocoder.yudao.module.pay.service.merchant; +package cn.iocoder.yudao.module.pay.service.app; import cn.hutool.core.util.RandomUtil; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppCreateReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppExportReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppPageReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppUpdateReqVO; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; -import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayAppMapper; -import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayMerchantMapper; +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppCreateReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppPageReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppUpdateReqVO; +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO; +import cn.iocoder.yudao.module.pay.dal.mysql.app.PayAppMapper; import org.junit.jupiter.api.Test; -import org.mockito.Mockito; -import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.context.annotation.Import; import javax.annotation.Resource; import java.time.LocalDateTime; -import java.util.Collections; -import java.util.List; import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildTime; import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; @@ -40,9 +33,6 @@ public class PayAppServiceTest extends BaseDbUnitTest { @Resource private PayAppMapper appMapper; - @MockBean(name = "payMerchantMapper") - private PayMerchantMapper payMerchantMapper; - @Test public void testCreateApp_success() { // 准备参数 @@ -112,9 +102,6 @@ public class PayAppServiceTest extends BaseDbUnitTest { @Test public void testGetAppPage() { - Long merchantId = 1L; - Long mismatchMerchantId = 2L; - // mock 数据 PayAppDO dbApp = randomPojo(PayAppDO.class, o -> { // 等会查询到 o.setName("灿灿姐的杂货铺"); @@ -122,24 +109,9 @@ public class PayAppServiceTest extends BaseDbUnitTest { o.setRemark("敏敏姐的小卖铺"); o.setPayNotifyUrl("https://www.hc.com"); o.setRefundNotifyUrl("https://www.xm.com"); - o.setMerchantId(merchantId); o.setCreateTime(buildTime(2021,11,20)); }); - // mock 数据 - PayMerchantDO dbMerchant = randomPojo(PayMerchantDO.class, o -> { // 等会查询到 - o.setId(merchantId); - o.setNo("M1008611"); - o.setName("灿哥的杂货铺"); - o.setShortName("灿灿子"); - o.setStatus(CommonStatusEnum.ENABLE.getStatus()); - o.setRemark("灿哥的杂货铺"); - o.setCreateTime(buildTime(2021,11,3)); - }); - - Mockito.when(payMerchantMapper.getMerchantListByName(dbMerchant.getName())) - .thenReturn(Collections.singletonList(dbMerchant)); - appMapper.insert(dbApp); // 测试 name 不匹配 appMapper.insert(cloneIgnoreId(dbApp, o -> o.setName("敏敏姐的杂货铺"))); @@ -151,8 +123,6 @@ public class PayAppServiceTest extends BaseDbUnitTest { appMapper.insert(cloneIgnoreId(dbApp, o -> o.setPayNotifyUrl("xm.com"))); // 测试 refundNotifyUrl 不匹配 appMapper.insert(cloneIgnoreId(dbApp, o -> o.setRefundNotifyUrl("hc.com"))); - // 测试 merchantId 不匹配 - appMapper.insert(cloneIgnoreId(dbApp, o -> o.setMerchantId(mismatchMerchantId))); // 测试 createTime 不匹配 appMapper.insert(cloneIgnoreId(dbApp, o -> o.setCreateTime(buildTime(2021,12,21)))); // 准备参数 @@ -162,7 +132,6 @@ public class PayAppServiceTest extends BaseDbUnitTest { reqVO.setRemark("敏敏姐的小卖铺"); reqVO.setPayNotifyUrl("https://www.hc.com"); reqVO.setRefundNotifyUrl("https://www.xm.com"); - reqVO.setMerchantName(dbMerchant.getName()); reqVO.setCreateTime((new LocalDateTime[]{buildTime(2021,11,19),buildTime(2021,11,21)})); // 调用 @@ -173,66 +142,4 @@ public class PayAppServiceTest extends BaseDbUnitTest { assertPojoEquals(dbApp, pageResult.getList().get(0)); } - @Test // TODO 请修改 null 为需要的值 - public void testGetAppList() { - Long merchantId = 1L; - Long mismatchMerchantId = 2L; - - // mock 数据 - PayAppDO dbApp = randomPojo(PayAppDO.class, o -> { // 等会查询到 - o.setName("灿灿姐的杂货铺"); - o.setStatus(CommonStatusEnum.ENABLE.getStatus()); - o.setRemark("敏敏姐的小卖铺"); - o.setPayNotifyUrl("https://www.hc.com"); - o.setRefundNotifyUrl("https://www.xm.com"); - o.setMerchantId(merchantId); - o.setCreateTime(buildTime(2021,11,20)); - }); - - // mock 数据 - PayMerchantDO dbMerchant = randomPojo(PayMerchantDO.class, o -> { // 等会查询到 - o.setId(merchantId); - o.setNo("M1008611"); - o.setName("灿哥的杂货铺"); - o.setShortName("灿灿子"); - o.setStatus(CommonStatusEnum.ENABLE.getStatus()); - o.setRemark("灿哥的杂货铺"); - o.setCreateTime(buildTime(2021,11,3)); - }); - - Mockito.when(payMerchantMapper.getMerchantListByName(dbMerchant.getName())) - .thenReturn(Collections.singletonList(dbMerchant)); - - appMapper.insert(dbApp); - // 测试 name 不匹配 - appMapper.insert(cloneIgnoreId(dbApp, o -> o.setName("敏敏姐的杂货铺"))); - // 测试 status 不匹配 - appMapper.insert(cloneIgnoreId(dbApp, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus()))); - // 测试 remark 不匹配 - appMapper.insert(cloneIgnoreId(dbApp, o -> o.setRemark("灿灿姐的小卖部"))); - // 测试 payNotifyUrl 不匹配 - appMapper.insert(cloneIgnoreId(dbApp, o -> o.setPayNotifyUrl("xm.com"))); - // 测试 refundNotifyUrl 不匹配 - appMapper.insert(cloneIgnoreId(dbApp, o -> o.setRefundNotifyUrl("hc.com"))); - // 测试 merchantId 不匹配 - appMapper.insert(cloneIgnoreId(dbApp, o -> o.setMerchantId(mismatchMerchantId))); - // 测试 createTime 不匹配 - appMapper.insert(cloneIgnoreId(dbApp, o -> o.setCreateTime(buildTime(2021,12,21)))); - // 准备参数 - PayAppExportReqVO reqVO = new PayAppExportReqVO(); - reqVO.setName("灿灿姐的杂货铺"); - reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); - reqVO.setRemark("敏敏姐的小卖铺"); - reqVO.setPayNotifyUrl("https://www.hc.com"); - reqVO.setRefundNotifyUrl("https://www.xm.com"); - reqVO.setMerchantName(dbMerchant.getName()); - reqVO.setCreateTime((new LocalDateTime[]{buildTime(2021,11,19),buildTime(2021,11,21)})); - - // 调用 - List list = appService.getAppList(reqVO); - // 断言 - assertEquals(1, list.size()); - assertPojoEquals(dbApp, list.get(0)); - } - } diff --git a/yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelServiceTest.java b/yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/channel/PayChannelServiceTest.java similarity index 77% rename from yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelServiceTest.java rename to yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/channel/PayChannelServiceTest.java index 94d7dea2f..614af37f5 100644 --- a/yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelServiceTest.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/channel/PayChannelServiceTest.java @@ -1,4 +1,4 @@ -package cn.iocoder.yudao.module.pay.service.merchant; +package cn.iocoder.yudao.module.pay.service.channel; import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; @@ -7,12 +7,11 @@ import cn.iocoder.yudao.framework.pay.core.client.impl.alipay.AlipayPayClientCon import cn.iocoder.yudao.framework.pay.core.client.impl.weixin.WxPayClientConfig; import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum; import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelCreateReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelExportReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelPageReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelUpdateReqVO; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; -import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayChannelMapper; +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelCreateReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelPageReqVO; +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelUpdateReqVO; +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO; +import cn.iocoder.yudao.module.pay.dal.mysql.channel.PayChannelMapper; import com.alibaba.fastjson.JSON; import org.junit.jupiter.api.Test; import org.springframework.boot.test.mock.mockito.MockBean; @@ -21,7 +20,6 @@ import org.springframework.context.annotation.Import; import javax.annotation.Resource; import javax.validation.Validator; import java.time.LocalDateTime; -import java.util.List; import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildTime; import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; @@ -211,7 +209,6 @@ public class PayChannelServiceTest extends BaseDbUnitTest { o.setStatus(CommonStatusEnum.ENABLE.getStatus()); o.setRemark("灿灿子的支付渠道"); o.setFeeRate(0.03); - o.setMerchantId(1L); o.setAppId(1L); o.setConfig(payClientConfig); o.setCreateTime(buildTime(2021,11,20)); @@ -239,11 +236,6 @@ public class PayChannelServiceTest extends BaseDbUnitTest { o.setConfig(payClientConfig); o.setFeeRate(1.23); })); - // 测试 merchantId 不匹配 - channelMapper.insert(cloneIgnoreId(dbChannel, o -> { - o.setConfig(payClientConfig); - o.setMerchantId(2L); - })); // 测试 appId 不匹配 channelMapper.insert(cloneIgnoreId(dbChannel, o -> { o.setConfig(payClientConfig); @@ -260,7 +252,6 @@ public class PayChannelServiceTest extends BaseDbUnitTest { reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); reqVO.setRemark("灿灿子的支付渠道"); reqVO.setFeeRate(0.03); - reqVO.setMerchantId(1L); reqVO.setAppId(1L); reqVO.setConfig(JSON.toJSONString(payClientConfig)); reqVO.setCreateTime((new LocalDateTime[]{buildTime(2021,11,19),buildTime(2021,11,21)})); @@ -275,77 +266,6 @@ public class PayChannelServiceTest extends BaseDbUnitTest { } - @Test - public void testGetChannelList() { - // mock 数据 - AlipayPayClientConfig payClientConfig = getCertificateConfig(); - PayChannelDO dbChannel = randomPojo(PayChannelDO.class, o -> { // 等会查询到 - o.setCode(PayChannelEnum.ALIPAY_APP.getCode()); - o.setStatus(CommonStatusEnum.ENABLE.getStatus()); - o.setRemark("灿灿子的支付渠道"); - o.setFeeRate(0.03); - o.setMerchantId(1L); - o.setAppId(1L); - o.setConfig(payClientConfig); - o.setCreateTime(buildTime(2021,11,20)); - }); - channelMapper.insert(dbChannel); - // 执行拷贝的时候会出现异常,所以在插入后要重置为null 后续在写入新的 - dbChannel.setConfig(null); - // 测试 code 不匹配 - channelMapper.insert(cloneIgnoreId(dbChannel, o -> { - o.setConfig(payClientConfig); - o.setCode(PayChannelEnum.WX_PUB.getCode()); - })); - // 测试 status 不匹配 - channelMapper.insert(cloneIgnoreId(dbChannel, o -> { - o.setConfig(payClientConfig); - o.setStatus(CommonStatusEnum.DISABLE.getStatus()); - })); - // 测试 remark 不匹配 - channelMapper.insert(cloneIgnoreId(dbChannel, o ->{ - o.setConfig(payClientConfig); - o.setRemark("敏敏子的渠道"); - })); - // 测试 feeRate 不匹配 - channelMapper.insert(cloneIgnoreId(dbChannel, o -> { - o.setConfig(payClientConfig); - o.setFeeRate(1.23); - })); - // 测试 merchantId 不匹配 - channelMapper.insert(cloneIgnoreId(dbChannel, o -> { - o.setConfig(payClientConfig); - o.setMerchantId(2L); - })); - // 测试 appId 不匹配 - channelMapper.insert(cloneIgnoreId(dbChannel, o -> { - o.setConfig(payClientConfig); - o.setAppId(2L); - })); - // 测试 createTime 不匹配 - channelMapper.insert(cloneIgnoreId(dbChannel, o -> { - o.setConfig(payClientConfig); - o.setCreateTime(buildTime(2021, 10, 20)); - })); - // 准备参数 - PayChannelExportReqVO reqVO = new PayChannelExportReqVO(); - reqVO.setCode(PayChannelEnum.ALIPAY_APP.getCode()); - reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); - reqVO.setRemark("灿灿子的支付渠道"); - reqVO.setFeeRate(0.03); - reqVO.setMerchantId(1L); - reqVO.setAppId(1L); - reqVO.setConfig(JSON.toJSONString(payClientConfig)); - reqVO.setCreateTime((new LocalDateTime[]{buildTime(2021,11,19),buildTime(2021,11,21)})); - - // 调用 - List list = channelService.getChannelList(reqVO); - // 断言 - assertEquals(1, list.size()); - assertPojoEquals(dbChannel, list.get(0), "config"); - assertPojoEquals(payClientConfig, list.get(0).getConfig()); - } - public WxPayClientConfig getV2Config() { return new WxPayClientConfig() .setAppId("APP00001") diff --git a/yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantServiceTest.java b/yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantServiceTest.java deleted file mode 100644 index de3f6904f..000000000 --- a/yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantServiceTest.java +++ /dev/null @@ -1,191 +0,0 @@ -package cn.iocoder.yudao.module.pay.service.merchant; - -import cn.hutool.core.util.RandomUtil; -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; -import cn.iocoder.yudao.framework.common.pojo.PageResult; -import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantCreateReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantExportReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantPageReqVO; -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantUpdateReqVO; -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; -import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayMerchantMapper; -import org.junit.jupiter.api.Test; -import org.springframework.context.annotation.Import; - -import javax.annotation.Resource; -import java.time.LocalDateTime; -import java.util.List; - -import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildTime; -import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; -import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals; -import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException; -import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId; -import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo; -import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.PAY_MERCHANT_NOT_EXISTS; -import static org.junit.jupiter.api.Assertions.*; - -/** -* {@link PayMerchantServiceImpl} 的单元测试类 -* -* @author aquan -*/ -@Import(PayMerchantServiceImpl.class) -public class PayMerchantServiceTest extends BaseDbUnitTest { - - @Resource - private PayMerchantServiceImpl merchantService; - - @Resource - private PayMerchantMapper merchantMapper; - - @Test - public void testCreateMerchant_success() { - // 准备参数 - PayMerchantCreateReqVO reqVO = randomPojo(PayMerchantCreateReqVO.class,o -> - o.setStatus(RandomUtil.randomEle(CommonStatusEnum.values()).getStatus())); - - // 调用 - Long merchantId = merchantService.createMerchant(reqVO); - // 断言 - assertNotNull(merchantId); - // 校验记录的属性是否正确 - PayMerchantDO merchant = merchantMapper.selectById(merchantId); - assertPojoEquals(reqVO, merchant); - } - - @Test - public void testUpdateMerchant_success() { - // mock 数据 - PayMerchantDO dbMerchant = randomPojo(PayMerchantDO.class, o -> - o.setStatus(CommonStatusEnum.ENABLE.getStatus())); - merchantMapper.insert(dbMerchant);// @Sql: 先插入出一条存在的数据 - // 准备参数 - PayMerchantUpdateReqVO reqVO = randomPojo(PayMerchantUpdateReqVO.class, o -> { - o.setId(dbMerchant.getId()); // 设置更新的 ID - o.setStatus(CommonStatusEnum.DISABLE.getStatus()); - }); - - // 调用 - merchantService.updateMerchant(reqVO); - // 校验是否更新正确 - PayMerchantDO merchant = merchantMapper.selectById(reqVO.getId()); // 获取最新的 - assertPojoEquals(reqVO, merchant); - } - - @Test - public void testUpdateMerchant_notExists() { - // 准备参数 - PayMerchantUpdateReqVO reqVO = randomPojo(PayMerchantUpdateReqVO.class); - - // 调用, 并断言异常 - assertServiceException(() -> merchantService.updateMerchant(reqVO), PAY_MERCHANT_NOT_EXISTS); - } - - @Test - public void testDeleteMerchant_success() { - // mock 数据 - PayMerchantDO dbMerchant = randomPojo(PayMerchantDO.class, - o-> o.setStatus(CommonStatusEnum.ENABLE.getStatus())); - merchantMapper.insert(dbMerchant);// @Sql: 先插入出一条存在的数据 - // 准备参数 - Long id = dbMerchant.getId(); - - // 调用 - merchantService.deleteMerchant(id); - // 校验数据不存在了 - assertNull(merchantMapper.selectById(id)); - } - - @Test - public void testDeleteMerchant_notExists() { - // 准备参数 - Long id = randomLongId(); - - // 调用, 并断言异常 - assertServiceException(() -> merchantService.deleteMerchant(id), PAY_MERCHANT_NOT_EXISTS); - } - - @Test - public void testGetMerchantPage() { - // mock 数据 - PayMerchantDO dbMerchant = randomPojo(PayMerchantDO.class, o -> { // 等会查询到 - o.setNo("M1008611"); - o.setName("灿哥的杂货铺"); - o.setShortName("灿灿子"); - o.setStatus(CommonStatusEnum.ENABLE.getStatus()); - o.setRemark("灿哥的杂货铺"); - o.setCreateTime(buildTime(2021,11,3)); - }); - merchantMapper.insert(dbMerchant); - // 测试 no 不匹配 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setNo("M200000"))); - // 测试 name 不匹配 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setName("斌哥的杂货铺"))); - // 测试 shortName 不匹配 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setShortName("斌斌子"))); - // 测试 status 不匹配 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus()))); - // 测试 remark 不匹配 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setRemark("斌哥的杂货铺"))); - // 测试 createTime 不匹配 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setCreateTime(buildTime(2022,12,4)))); - // 准备参数 - PayMerchantPageReqVO reqVO = new PayMerchantPageReqVO(); - reqVO.setNo("M1008611"); - reqVO.setName("灿哥的杂货铺"); - reqVO.setShortName("灿灿子"); - reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); - reqVO.setRemark("灿哥的杂货铺"); - reqVO.setCreateTime((new LocalDateTime[]{buildTime(2021,11,2),buildTime(2021,11,4)})); - - // 调用 - PageResult pageResult = merchantService.getMerchantPage(reqVO); - // 断言 - assertEquals(1, pageResult.getTotal()); - assertEquals(1, pageResult.getList().size()); - assertPojoEquals(dbMerchant, pageResult.getList().get(0)); - } - - @Test - public void testGetMerchantList() { - // mock 数据 - PayMerchantDO dbMerchant = randomPojo(PayMerchantDO.class, o -> { // 等会查询到 - o.setNo("M1008611"); - o.setName("灿哥的杂货铺"); - o.setShortName("灿灿子"); - o.setStatus(CommonStatusEnum.ENABLE.getStatus()); - o.setRemark("灿哥的杂货铺"); - o.setCreateTime(buildTime(2021,11,3)); - }); - merchantMapper.insert(dbMerchant); - // 测试 no 不匹配 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setNo("M200000"))); - // 测试 name 不匹配 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setName("斌哥的杂货铺"))); - // 测试 shortName 不匹配 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setShortName("斌斌子"))); - // 测试 status 不匹配 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus()))); - // 测试 remark 不匹配 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setRemark("斌哥的杂货铺"))); - // 测试 createTime 不匹配 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setCreateTime(buildTime(2022,12,4)))); - // 准备参数 - PayMerchantExportReqVO reqVO = new PayMerchantExportReqVO(); - reqVO.setNo("M1008611"); - reqVO.setName("灿哥的杂货铺"); - reqVO.setShortName("灿灿子"); - reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); - reqVO.setRemark("灿哥的杂货铺"); - reqVO.setCreateTime((new LocalDateTime[]{buildTime(2021,11,2),buildTime(2021,11,4)})); - - // 调用 - List list = merchantService.getMerchantList(reqVO); - // 断言 - assertEquals(1, list.size()); - assertPojoEquals(dbMerchant, list.get(0)); - } - -} diff --git a/yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceTest.java b/yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceTest.java index ccfaf687f..eaad15c03 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceTest.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceTest.java @@ -14,8 +14,8 @@ import cn.iocoder.yudao.module.pay.dal.mysql.order.PayOrderMapper; import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum; import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; import cn.iocoder.yudao.module.pay.enums.refund.PayRefundTypeEnum; -import cn.iocoder.yudao.module.pay.service.merchant.PayAppService; -import cn.iocoder.yudao.module.pay.service.merchant.PayChannelService; +import cn.iocoder.yudao.module.pay.service.app.PayAppService; +import cn.iocoder.yudao.module.pay.service.channel.PayChannelService; import cn.iocoder.yudao.module.pay.service.notify.PayNotifyService; import org.junit.jupiter.api.Test; import org.springframework.boot.test.mock.mockito.MockBean; @@ -67,7 +67,6 @@ public class PayOrderServiceTest extends BaseDbUnitTest { // mock 数据 PayOrderDO dbOrder = randomPojo(PayOrderDO.class, o -> { // 等会查询到 - o.setMerchantId(1L); o.setAppId(1L); o.setChannelId(1L); o.setChannelCode(PayChannelEnum.WX_PUB.getCode()); @@ -94,8 +93,6 @@ public class PayOrderServiceTest extends BaseDbUnitTest { o.setUpdateTime(LocalDateTime.of(2018, 1, 1, 10, 10, 15)); }); orderMapper.insert(dbOrder); - // 测试 merchantId 不匹配 - orderMapper.insert(cloneIgnoreId(dbOrder, o -> o.setMerchantId(2L))); // 测试 appId 不匹配 orderMapper.insert(cloneIgnoreId(dbOrder, o -> o.setAppId(2L))); // 测试 channelId 不匹配 @@ -115,7 +112,6 @@ public class PayOrderServiceTest extends BaseDbUnitTest { 1)))); // 准备参数 PayOrderPageReqVO reqVO = new PayOrderPageReqVO(); - reqVO.setMerchantId(1L); reqVO.setAppId(1L); reqVO.setChannelId(1L); reqVO.setChannelCode(PayChannelEnum.WX_PUB.getCode()); @@ -139,7 +135,6 @@ public class PayOrderServiceTest extends BaseDbUnitTest { String merchantOrderId = generateNo(); String channelOrderId = generateNo(); PayOrderDO dbOrder = randomPojo(PayOrderDO.class, o -> { // 等会查询到 - o.setMerchantId(1L); o.setAppId(1L); o.setChannelId(1L); o.setChannelCode(PayChannelEnum.WX_PUB.getCode()); @@ -167,8 +162,6 @@ public class PayOrderServiceTest extends BaseDbUnitTest { }); orderMapper.insert(dbOrder); - // 测试 merchantId 不匹配 - orderMapper.insert(cloneIgnoreId(dbOrder, o -> o.setMerchantId(2L))); // 测试 appId 不匹配 orderMapper.insert(cloneIgnoreId(dbOrder, o -> o.setAppId(2L))); // 测试 channelId 不匹配 @@ -188,7 +181,6 @@ public class PayOrderServiceTest extends BaseDbUnitTest { 1)))); // 准备参数 PayOrderExportReqVO reqVO = new PayOrderExportReqVO(); - reqVO.setMerchantId(1L); reqVO.setAppId(1L); reqVO.setChannelId(1L); reqVO.setChannelCode(PayChannelEnum.WX_PUB.getCode()); diff --git a/yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceTest.java b/yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceTest.java index c0d657cea..74c965e4b 100755 --- a/yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceTest.java +++ b/yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/refund/PayRefundServiceTest.java @@ -12,8 +12,8 @@ import cn.iocoder.yudao.module.pay.dal.mysql.refund.PayRefundMapper; import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum; import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum; import cn.iocoder.yudao.module.pay.enums.refund.PayRefundTypeEnum; -import cn.iocoder.yudao.module.pay.service.merchant.PayAppService; -import cn.iocoder.yudao.module.pay.service.merchant.PayChannelService; +import cn.iocoder.yudao.module.pay.service.app.PayAppService; +import cn.iocoder.yudao.module.pay.service.channel.PayChannelService; import cn.iocoder.yudao.module.pay.service.notify.PayNotifyService; import cn.iocoder.yudao.module.pay.service.order.PayOrderExtensionService; import cn.iocoder.yudao.module.pay.service.order.PayOrderService; @@ -58,7 +58,6 @@ public class PayRefundServiceTest extends BaseDbUnitTest { public void testGetRefundPage() { // mock 数据 PayRefundDO dbRefund = randomPojo(PayRefundDO.class, o -> { // 等会查询到 - o.setMerchantId(1L); o.setAppId(1L); o.setChannelId(1L); o.setChannelCode(PayChannelEnum.WX_PUB.getCode()); @@ -86,8 +85,6 @@ public class PayRefundServiceTest extends BaseDbUnitTest { o.setUpdateTime(LocalDateTime.of(2021, 1, 1, 10, 10, 35)); }); refundMapper.insert(dbRefund); - // 测试 merchantId 不匹配 - refundMapper.insert(cloneIgnoreId(dbRefund, o -> o.setMerchantId(2L))); // 测试 appId 不匹配 refundMapper.insert(cloneIgnoreId(dbRefund, o -> o.setAppId(2L))); // 测试 channelCode 不匹配 @@ -106,7 +103,6 @@ public class PayRefundServiceTest extends BaseDbUnitTest { o.setCreateTime(LocalDateTime.of(2022, 1, 1, 10, 10, 10)))); // 准备参数 PayRefundPageReqVO reqVO = new PayRefundPageReqVO(); - reqVO.setMerchantId(1L); reqVO.setAppId(1L); reqVO.setChannelCode(PayChannelEnum.WX_PUB.getCode()); reqVO.setMerchantRefundNo("MRF0000001"); @@ -127,7 +123,6 @@ public class PayRefundServiceTest extends BaseDbUnitTest { public void testGetRefundList() { // mock 数据 PayRefundDO dbRefund = randomPojo(PayRefundDO.class, o -> { // 等会查询到 - o.setMerchantId(1L); o.setAppId(1L); o.setChannelId(1L); o.setChannelCode(PayChannelEnum.WX_PUB.getCode()); @@ -155,8 +150,6 @@ public class PayRefundServiceTest extends BaseDbUnitTest { o.setUpdateTime(LocalDateTime.of(2021, 1, 1, 10, 10, 35)); }); refundMapper.insert(dbRefund); - // 测试 merchantId 不匹配 - refundMapper.insert(cloneIgnoreId(dbRefund, o -> o.setMerchantId(2L))); // 测试 appId 不匹配 refundMapper.insert(cloneIgnoreId(dbRefund, o -> o.setAppId(2L))); // 测试 channelCode 不匹配 @@ -176,7 +169,6 @@ public class PayRefundServiceTest extends BaseDbUnitTest { // 准备参数 PayRefundExportReqVO reqVO = new PayRefundExportReqVO(); - reqVO.setMerchantId(1L); reqVO.setAppId(1L); reqVO.setChannelCode(PayChannelEnum.WX_PUB.getCode()); reqVO.setMerchantRefundNo("MRF0000001"); diff --git a/yudao-ui-admin/src/api/pay/channel.js b/yudao-ui-admin/src/api/pay/channel.js index de66770bd..68e203807 100644 --- a/yudao-ui-admin/src/api/pay/channel.js +++ b/yudao-ui-admin/src/api/pay/channel.js @@ -27,16 +27,6 @@ export function deleteChannel(id) { }) } -// 获得支付渠道 -// export function getChannel(id) { -// return request({ -// url: '/pay/channel/get?id=' + id, -// method: 'get' -// }) -// } - - - // 获得支付渠道分页 export function getChannelPage(query) { return request({ @@ -46,22 +36,11 @@ export function getChannelPage(query) { }) } -// 导出支付渠道Excel -export function exportChannelExcel(query) { - return request({ - url: '/pay/channel/export-excel', - method: 'get', - params: query, - responseType: 'blob' - }) -} - // 获得支付渠道 -export function getChannel(merchantId,appId,code) { +export function getChannel(appId,code) { return request({ url: '/pay/channel/get-channel', params:{ - merchantId:merchantId, appId:appId, code:code }, diff --git a/yudao-ui-admin/src/api/pay/merchant.js b/yudao-ui-admin/src/api/pay/merchant.js deleted file mode 100644 index 51b604ee2..000000000 --- a/yudao-ui-admin/src/api/pay/merchant.js +++ /dev/null @@ -1,77 +0,0 @@ -import request from '@/utils/request' - -// 创建支付商户信息 -export function createMerchant(data) { - return request({ - url: '/pay/merchant/create', - method: 'post', - data: data - }) -} - -// 更新支付商户信息 -export function updateMerchant(data) { - return request({ - url: '/pay/merchant/update', - method: 'put', - data: data - }) -} - -// 支付商户状态修改 -export function changeMerchantStatus(id, status) { - const data = { - id, - status - } - return request({ - url: '/pay/merchant/update-status', - method: 'put', - data: data - }) -} - -// 删除支付商户信息 -export function deleteMerchant(id) { - return request({ - url: '/pay/merchant/delete?id=' + id, - method: 'delete' - }) -} - -// 获得支付商户信息 -export function getMerchant(id) { - return request({ - url: '/pay/merchant/get?id=' + id, - method: 'get' - }) -} -// 根据商户名称搜索商户列表 -export function getMerchantListByName(name) { - return request({ - url: '/pay/merchant/list-by-name', - params:{ - name:name - }, - method: 'get' - }) -} - -// 获得支付商户信息分页 -export function getMerchantPage(query) { - return request({ - url: '/pay/merchant/page', - method: 'get', - params: query - }) -} - -// 导出支付商户信息 Excel -export function exportMerchantExcel(query) { - return request({ - url: '/pay/merchant/export-excel', - method: 'get', - params: query, - responseType: 'blob' - }) -} diff --git a/yudao-ui-admin/src/views/pay/app/components/aliPayChannelForm.vue b/yudao-ui-admin/src/views/pay/app/components/aliPayChannelForm.vue index b395420bf..db893e689 100644 --- a/yudao-ui-admin/src/views/pay/app/components/aliPayChannelForm.vue +++ b/yudao-ui-admin/src/views/pay/app/components/aliPayChannelForm.vue @@ -131,7 +131,6 @@ const defaultForm = { remark: '', feeRate: null, appId: '', - merchantId: null, aliPayConfig: { appId: '', serverUrl: null, @@ -161,13 +160,6 @@ export default { "appId": null, // 渠道编码 "payCode": null, - // 商户对象 - "payMerchant": { - // 编号 - "id": null, - // 名称 - "name": null - }, } }, data() { @@ -249,7 +241,6 @@ export default { if (newVal.aliPayOpen) { this.form.code = newVal.payCode; this.form.appId = newVal.appId; - this.form.merchantId = newVal.payMerchant.id; // 只有在初次进来为编辑 并且为加载中的时候才回去请求数据 if (newVal.edit === true && newVal.loading) { this.title = "编辑支付渠道"; @@ -264,7 +255,7 @@ export default { methods: { init() { - getChannel(this.transferParam.payMerchant.id, this.transferParam.appId, this.transferParam.payCode) + getChannel(this.transferParam.appId, this.transferParam.payCode) .then(response => { this.form.id = response.data.id; this.form.feeRate = response.data.feeRate; diff --git a/yudao-ui-admin/src/views/pay/app/components/wechatChannelForm.vue b/yudao-ui-admin/src/views/pay/app/components/wechatChannelForm.vue index 09c06e816..b28fd4d2b 100644 --- a/yudao-ui-admin/src/views/pay/app/components/wechatChannelForm.vue +++ b/yudao-ui-admin/src/views/pay/app/components/wechatChannelForm.vue @@ -95,7 +95,6 @@ const defaultForm = { remark: '', feeRate: null, appId: '', - merchantId: null, weChatConfig: { appId: '', mchId: '', @@ -123,13 +122,6 @@ export default { "appId": null, // 渠道编码 "payCode": null, - // 商户对象 - "payMerchant": { - // 编号 - "id": null, - // 名称 - "name": null - }, } }, data() { @@ -200,7 +192,6 @@ export default { if (newVal.wechatOpen) { this.form.code = newVal.payCode; this.form.appId = newVal.appId; - this.form.merchantId = newVal.payMerchant.id; // 只有在初次进来为编辑 并且为加载中的时候才回去请求数据 if (newVal.edit && newVal.loading) { this.title = "编辑支付渠道"; @@ -214,7 +205,7 @@ export default { }, methods: { init() { - getChannel(this.transferParam.payMerchant.id, this.transferParam.appId, this.transferParam.payCode) + getChannel(this.transferParam.appId, this.transferParam.payCode) .then(response => { this.form.id = response.data.id; this.form.feeRate = response.data.feeRate; diff --git a/yudao-ui-admin/src/views/pay/app/index.vue b/yudao-ui-admin/src/views/pay/app/index.vue index bea522ef1..b779b1b38 100644 --- a/yudao-ui-admin/src/views/pay/app/index.vue +++ b/yudao-ui-admin/src/views/pay/app/index.vue @@ -7,10 +7,6 @@ - - - 新增 - - 导出 - - @@ -174,23 +165,6 @@ - - - - - - @@ -221,10 +195,9 @@ diff --git a/yudao-ui-admin/src/views/pay/order/index.vue b/yudao-ui-admin/src/views/pay/order/index.vue index ecf70bb7a..1a0aeb486 100755 --- a/yudao-ui-admin/src/views/pay/order/index.vue +++ b/yudao-ui-admin/src/views/pay/order/index.vue @@ -3,13 +3,6 @@ - - - - - @@ -70,12 +63,9 @@ - -