Commit 5d2d52020ea71c39294812ae3740155e2c767168

Authored by YunaiV
1 parent 4682650e

mall + pay:简化 pay 的复杂度

1. 移除 merchant 表设计
2. 移除 app 和 channel 的导出
Showing 86 changed files with 187 additions and 3379 deletions
sql/mysql/menu.sql deleted
1 --- 菜单 SQL  
2 -INSERT INTO system_menu(  
3 - name, permission, type, sort, parent_id,  
4 - path, icon, component, status, component_name  
5 -)  
6 -VALUES (  
7 - '积分设置管理', '', 2, 0, 2162,  
8 - 'config', '', 'point/config/index', 0, 'PointConfig'  
9 -);  
10 -  
11 --- 按钮父菜单ID  
12 --- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码  
13 -SELECT @parentId := LAST_INSERT_ID();  
14 -  
15 --- 按钮 SQL  
16 -INSERT INTO system_menu(  
17 - name, permission, type, sort, parent_id,  
18 - path, icon, component, status  
19 -)  
20 -VALUES (  
21 - '积分设置查询', 'point:config:query', 3, 1, @parentId,  
22 - '', '', '', 0  
23 -);  
24 -INSERT INTO system_menu(  
25 - name, permission, type, sort, parent_id,  
26 - path, icon, component, status  
27 -)  
28 -VALUES (  
29 - '积分设置创建', 'point:config:create', 3, 2, @parentId,  
30 - '', '', '', 0  
31 -);  
32 -INSERT INTO system_menu(  
33 - name, permission, type, sort, parent_id,  
34 - path, icon, component, status  
35 -)  
36 -VALUES (  
37 - '积分设置更新', 'point:config:update', 3, 3, @parentId,  
38 - '', '', '', 0  
39 -);  
40 -INSERT INTO system_menu(  
41 - name, permission, type, sort, parent_id,  
42 - path, icon, component, status  
43 -)  
44 -VALUES (  
45 - '积分设置删除', 'point:config:delete', 3, 4, @parentId,  
46 - '', '', '', 0  
47 -);  
48 -INSERT INTO system_menu(  
49 - name, permission, type, sort, parent_id,  
50 - path, icon, component, status  
51 -)  
52 -VALUES (  
53 - '积分设置导出', 'point:config:export', 3, 5, @parentId,  
54 - '', '', '', 0  
55 -);  
56 -  
57 -  
58 -  
59 --- 菜单 SQL  
60 -INSERT INTO system_menu(  
61 - name, permission, type, sort, parent_id,  
62 - path, icon, component, status, component_name  
63 -)  
64 -VALUES (  
65 - '积分签到规则管理', '', 2, 0, 2162,  
66 - 'sign-in-config', '', 'point/signInConfig/index', 0, 'SignInConfig'  
67 -);  
68 -  
69 --- 按钮父菜单ID  
70 --- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码  
71 -SELECT @parentId := LAST_INSERT_ID();  
72 -  
73 --- 按钮 SQL  
74 -INSERT INTO system_menu(  
75 - name, permission, type, sort, parent_id,  
76 - path, icon, component, status  
77 -)  
78 -VALUES (  
79 - '积分签到规则查询', 'point:sign-in-config:query', 3, 1, @parentId,  
80 - '', '', '', 0  
81 -);  
82 -INSERT INTO system_menu(  
83 - name, permission, type, sort, parent_id,  
84 - path, icon, component, status  
85 -)  
86 -VALUES (  
87 - '积分签到规则创建', 'point:sign-in-config:create', 3, 2, @parentId,  
88 - '', '', '', 0  
89 -);  
90 -INSERT INTO system_menu(  
91 - name, permission, type, sort, parent_id,  
92 - path, icon, component, status  
93 -)  
94 -VALUES (  
95 - '积分签到规则更新', 'point:sign-in-config:update', 3, 3, @parentId,  
96 - '', '', '', 0  
97 -);  
98 -INSERT INTO system_menu(  
99 - name, permission, type, sort, parent_id,  
100 - path, icon, component, status  
101 -)  
102 -VALUES (  
103 - '积分签到规则删除', 'point:sign-in-config:delete', 3, 4, @parentId,  
104 - '', '', '', 0  
105 -);  
106 -INSERT INTO system_menu(  
107 - name, permission, type, sort, parent_id,  
108 - path, icon, component, status  
109 -)  
110 -VALUES (  
111 - '积分签到规则导出', 'point:sign-in-config:export', 3, 5, @parentId,  
112 - '', '', '', 0  
113 -);  
114 -  
115 -  
116 --- 菜单 SQL  
117 -INSERT INTO system_menu(  
118 - name, permission, type, sort, parent_id,  
119 - path, icon, component, status, component_name  
120 -)  
121 -VALUES (  
122 - '用户积分记录管理', '', 2, 0, 2162,  
123 - 'record', '', 'point/record/index', 0, 'PointRecord'  
124 -);  
125 -  
126 --- 按钮父菜单ID  
127 --- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码  
128 -SELECT @parentId := LAST_INSERT_ID();  
129 -  
130 --- 按钮 SQL  
131 -INSERT INTO system_menu(  
132 - name, permission, type, sort, parent_id,  
133 - path, icon, component, status  
134 -)  
135 -VALUES (  
136 - '用户积分记录查询', 'point:record:query', 3, 1, @parentId,  
137 - '', '', '', 0  
138 -);  
139 -INSERT INTO system_menu(  
140 - name, permission, type, sort, parent_id,  
141 - path, icon, component, status  
142 -)  
143 -VALUES (  
144 - '用户积分记录创建', 'point:record:create', 3, 2, @parentId,  
145 - '', '', '', 0  
146 -);  
147 -INSERT INTO system_menu(  
148 - name, permission, type, sort, parent_id,  
149 - path, icon, component, status  
150 -)  
151 -VALUES (  
152 - '用户积分记录更新', 'point:record:update', 3, 3, @parentId,  
153 - '', '', '', 0  
154 -);  
155 -INSERT INTO system_menu(  
156 - name, permission, type, sort, parent_id,  
157 - path, icon, component, status  
158 -)  
159 -VALUES (  
160 - '用户积分记录删除', 'point:record:delete', 3, 4, @parentId,  
161 - '', '', '', 0  
162 -);  
163 -INSERT INTO system_menu(  
164 - name, permission, type, sort, parent_id,  
165 - path, icon, component, status  
166 -)  
167 -VALUES (  
168 - '用户积分记录导出', 'point:record:export', 3, 5, @parentId,  
169 - '', '', '', 0  
170 -);  
171 -  
172 -  
173 -  
174 --- 菜单 SQL  
175 -INSERT INTO system_menu(  
176 - name, permission, type, sort, parent_id,  
177 - path, icon, component, status, component_name  
178 -)  
179 -VALUES (  
180 - '用户签到积分管理', '', 2, 0, 2162,  
181 - 'sign-in-record', '', 'point/signInRecord/index', 0, 'SignInRecord'  
182 -);  
183 -  
184 --- 按钮父菜单ID  
185 --- 暂时只支持 MySQL。如果你是 Oracle、PostgreSQL、SQLServer 的话,需要手动修改 @parentId 的部分的代码  
186 -SELECT @parentId := LAST_INSERT_ID();  
187 -  
188 --- 按钮 SQL  
189 -INSERT INTO system_menu(  
190 - name, permission, type, sort, parent_id,  
191 - path, icon, component, status  
192 -)  
193 -VALUES (  
194 - '用户签到积分查询', 'point:sign-in-record:query', 3, 1, @parentId,  
195 - '', '', '', 0  
196 -);  
197 -INSERT INTO system_menu(  
198 - name, permission, type, sort, parent_id,  
199 - path, icon, component, status  
200 -)  
201 -VALUES (  
202 - '用户签到积分创建', 'point:sign-in-record:create', 3, 2, @parentId,  
203 - '', '', '', 0  
204 -);  
205 -INSERT INTO system_menu(  
206 - name, permission, type, sort, parent_id,  
207 - path, icon, component, status  
208 -)  
209 -VALUES (  
210 - '用户签到积分更新', 'point:sign-in-record:update', 3, 3, @parentId,  
211 - '', '', '', 0  
212 -);  
213 -INSERT INTO system_menu(  
214 - name, permission, type, sort, parent_id,  
215 - path, icon, component, status  
216 -)  
217 -VALUES (  
218 - '用户签到积分删除', 'point:sign-in-record:delete', 3, 4, @parentId,  
219 - '', '', '', 0  
220 -);  
221 -INSERT INTO system_menu(  
222 - name, permission, type, sort, parent_id,  
223 - path, icon, component, status  
224 -)  
225 -VALUES (  
226 - '用户签到积分导出', 'point:sign-in-record:export', 3, 5, @parentId,  
227 - '', '', '', 0  
228 -);  
229 -  
230 -  
sql/mysql/optional/mall.sql deleted
1 -/*  
2 - Navicat Premium Data Transfer  
3 -  
4 - Source Server : 127.0.0.1 MySQL  
5 - Source Server Type : MySQL  
6 - Source Server Version : 80026  
7 - Source Host : localhost:3306  
8 - Source Schema : ruoyi-vue-pro  
9 -  
10 - Target Server Type : MySQL  
11 - Target Server Version : 80026  
12 - File Encoding : 65001  
13 -  
14 - Date: 01/08/2022 23:01:36  
15 -*/  
16 -  
17 -SET NAMES utf8mb4;  
18 -SET FOREIGN_KEY_CHECKS = 0;  
19 -  
20 --- ----------------------------  
21 --- Table structure for market_activity  
22 --- ----------------------------  
23 -DROP TABLE IF EXISTS `market_activity`;  
24 -CREATE TABLE `market_activity` (  
25 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '活动编号',  
26 - `title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT '活动标题',  
27 - `activity_type` tinyint NOT NULL COMMENT '活动类型',  
28 - `status` tinyint NOT NULL DEFAULT -1 COMMENT '活动状态',  
29 - `start_time` datetime NOT NULL COMMENT '开始时间',  
30 - `end_time` datetime NOT NULL COMMENT '结束时间',  
31 - `invalid_time` datetime NULL DEFAULT NULL COMMENT '失效时间',  
32 - `delete_time` datetime NULL DEFAULT NULL COMMENT '删除时间',  
33 - `time_limited_discount` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '限制折扣字符串,使用 JSON 序列化成字符串存储',  
34 - `full_privilege` varchar(2000) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '限制折扣字符串,使用 JSON 序列化成字符串存储',  
35 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',  
36 - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
37 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',  
38 - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
39 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
40 - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',  
41 - PRIMARY KEY (`id`) USING BTREE  
42 -) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '促销活动';  
43 -  
44 --- ----------------------------  
45 --- Records of market_activity  
46 --- ----------------------------  
47 -BEGIN;  
48 -COMMIT;  
49 -  
50 --- ----------------------------  
51 --- Table structure for market_banner  
52 --- ----------------------------  
53 -DROP TABLE IF EXISTS `market_banner`;  
54 -CREATE TABLE `market_banner` (  
55 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'Banner编号',  
56 - `title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '' COMMENT 'Banner标题',  
57 - `pic_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '图片URL',  
58 - `status` tinyint NOT NULL DEFAULT -1 COMMENT '活动状态',  
59 - `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '跳转地址',  
60 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建者',  
61 - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
62 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新者',  
63 - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
64 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
65 - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',  
66 - `sort` tinyint NULL DEFAULT NULL COMMENT '排序',  
67 - `memo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '描述',  
68 - PRIMARY KEY (`id`) USING BTREE  
69 -) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'Banner管理';  
70 -  
71 --- ----------------------------  
72 --- Records of market_banner  
73 --- ----------------------------  
74 -BEGIN;  
75 -COMMIT;  
76 -  
77 --- ----------------------------  
78 --- Table structure for member_address  
79 --- ----------------------------  
80 -DROP TABLE IF EXISTS `member_address`;  
81 -CREATE TABLE `member_address` (  
82 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '收件地址编号',  
83 - `user_id` bigint NOT NULL COMMENT '用户编号',  
84 - `name` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '收件人名称',  
85 - `mobile` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '手机号',  
86 - `area_id` bigint NOT NULL COMMENT '地区编码',  
87 - `post_code` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '邮编',  
88 - `detail_address` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '收件详细地址',  
89 - `defaulted` bit(1) NOT NULL COMMENT '是否默认',  
90 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',  
91 - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
92 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',  
93 - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
94 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
95 - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',  
96 - PRIMARY KEY (`id`) USING BTREE,  
97 - INDEX `idx_userId`(`user_id` ASC) USING BTREE  
98 -) ENGINE = InnoDB AUTO_INCREMENT = 21 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '用户收件地址';  
99 -  
100 --- ----------------------------  
101 --- Records of member_address  
102 --- ----------------------------  
103 -BEGIN;  
104 -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);  
105 -COMMIT;  
106 -  
107 --- ----------------------------  
108 --- Table structure for product_brand  
109 --- ----------------------------  
110 -DROP TABLE IF EXISTS `product_brand`;  
111 -CREATE TABLE `product_brand` (  
112 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '品牌编号',  
113 - `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '品牌名称',  
114 - `pic_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '品牌图片',  
115 - `sort` int NULL DEFAULT 0 COMMENT '品牌排序',  
116 - `description` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '品牌描述',  
117 - `status` tinyint NOT NULL COMMENT '状态',  
118 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',  
119 - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
120 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',  
121 - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
122 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
123 - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',  
124 - PRIMARY KEY (`id`) USING BTREE  
125 -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商品品牌';  
126 -  
127 --- ----------------------------  
128 --- Records of product_brand  
129 --- ----------------------------  
130 -BEGIN;  
131 -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);  
132 -COMMIT;  
133 -  
134 --- ----------------------------  
135 --- Table structure for product_category  
136 --- ----------------------------  
137 -DROP TABLE IF EXISTS `product_category`;  
138 -CREATE TABLE `product_category` (  
139 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '分类编号',  
140 - `parent_id` bigint NOT NULL COMMENT '父分类编号',  
141 - `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '分类名称',  
142 - `pic_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '移动端分类图',  
143 - `big_pic_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'PC 端分类图',  
144 - `sort` int DEFAULT '0' COMMENT '分类排序',  
145 - `status` tinyint NOT NULL COMMENT '开启状态',  
146 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '创建者',  
147 - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
148 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '更新者',  
149 - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
150 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
151 - `tenant_id` bigint NOT NULL DEFAULT '0' COMMENT '租户编号',  
152 - PRIMARY KEY (`id`) USING BTREE  
153 -) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='商品分类';  
154 -  
155 --- ----------------------------  
156 --- Records of product_category  
157 --- ----------------------------  
158 -BEGIN;  
159 -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);  
160 -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);  
161 -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);  
162 -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);  
163 -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);  
164 -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);  
165 -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);  
166 -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);  
167 -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);  
168 -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);  
169 -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);  
170 -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);  
171 -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);  
172 -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);  
173 -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);  
174 -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);  
175 -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);  
176 -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);  
177 -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);  
178 -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);  
179 -COMMIT;  
180 -  
181 --- ----------------------------  
182 --- Table structure for product_property  
183 --- ----------------------------  
184 -DROP TABLE IF EXISTS `product_property`;  
185 -CREATE TABLE `product_property` (  
186 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',  
187 - `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '规格名称',  
188 - `status` tinyint DEFAULT NULL COMMENT '状态: 0 开启 ,1 禁用',  
189 - `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
190 - `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
191 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人',  
192 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新人',  
193 - `tenant_id` bigint NOT NULL DEFAULT '0' COMMENT '租户编号',  
194 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
195 - `remark` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',  
196 - PRIMARY KEY (`id`) USING BTREE,  
197 - KEY `idx_name` (`name`(32)) USING BTREE COMMENT '规格名称索引'  
198 -) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='规格名称';  
199 -  
200 --- ----------------------------  
201 --- Records of product_property  
202 --- ----------------------------  
203 -BEGIN;  
204 -COMMIT;  
205 -  
206 --- ----------------------------  
207 --- Table structure for product_property_value  
208 --- ----------------------------  
209 -DROP TABLE IF EXISTS `product_property_value`;  
210 -CREATE TABLE `product_property_value` (  
211 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',  
212 - `property_id` bigint DEFAULT NULL COMMENT '规格键id',  
213 - `name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '规格值名字',  
214 - `status` tinyint DEFAULT NULL COMMENT '状态: 1 开启 ,2 禁用',  
215 - `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
216 - `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
217 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人',  
218 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '更新人',  
219 - `tenant_id` bigint NOT NULL DEFAULT '0' COMMENT '租户编号',  
220 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
221 - `remark` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '备注',  
222 - PRIMARY KEY (`id`) USING BTREE  
223 -) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='规格值';  
224 -  
225 --- ----------------------------  
226 --- Records of product_property_value  
227 --- ----------------------------  
228 -BEGIN;  
229 -COMMIT;  
230 -  
231 --- ----------------------------  
232 --- Table structure for product_sku  
233 --- ----------------------------  
234 -DROP TABLE IF EXISTS `product_sku`;  
235 -CREATE TABLE `product_sku` (  
236 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',  
237 - `spu_id` bigint NOT NULL COMMENT 'spu编号',  
238 - `properties` varchar(512) DEFAULT NULL COMMENT '属性数组,JSON 格式 [{propertId: , valueId: }, {propertId: , valueId: }]',  
239 - `price` int NOT NULL DEFAULT '-1' COMMENT '商品价格,单位:分',  
240 - `market_price` int DEFAULT NULL COMMENT '市场价,单位:分',  
241 - `cost_price` int NOT NULL DEFAULT '-1' COMMENT '成本价,单位: 分',  
242 - `bar_code` varchar(64) DEFAULT NULL COMMENT 'SKU 的条形码',  
243 - `pic_url` varchar(256) NOT NULL COMMENT '图片地址',  
244 - `stock` int DEFAULT NULL COMMENT '库存',  
245 - `weight` double DEFAULT NULL COMMENT '商品重量,单位:kg 千克',  
246 - `volume` double DEFAULT NULL COMMENT '商品体积,单位:m^3 平米',  
247 - `sub_commission_first_price` int DEFAULT NULL COMMENT '一级分销的佣金,单位:分',  
248 - `sub_commission_second_price` int DEFAULT NULL COMMENT '二级分销的佣金,单位:分',  
249 - `sales_count` int DEFAULT NULL COMMENT '商品销量',  
250 - `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
251 - `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
252 - `creator` varchar(64) DEFAULT NULL COMMENT '创建人',  
253 - `updater` double(64,0) DEFAULT NULL COMMENT '更新人',  
254 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
255 - `tenant_id` bigint NOT NULL DEFAULT '0' COMMENT '租户编号',  
256 -PRIMARY KEY (`id`) USING BTREE  
257 -) ENGINE=InnoDB COMMENT='商品sku';  
258 -  
259 --- ----------------------------  
260 --- Records of product_sku  
261 --- ----------------------------  
262 -BEGIN;  
263 -COMMIT;  
264 -  
265 --- ----------------------------  
266 --- Table structure for product_spu  
267 --- ----------------------------  
268 -DROP TABLE IF EXISTS `product_spu`;  
269 -CREATE TABLE `product_spu` (  
270 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '商品 SPU 编号,自增',  
271 - `name` varchar(128) NOT NULL COMMENT '商品名称',  
272 - `keyword` varchar(256) DEFAULT NULL COMMENT '关键字',  
273 - `introduction` varchar(256) COMMENT '商品简介',  
274 - `description` text COMMENT '商品详情',  
275 - `bar_code` varchar(64) DEFAULT NULL COMMENT '条形码',  
276 - `category_id` bigint NOT NULL COMMENT '商品分类编号',  
277 - `brand_id` int DEFAULT NULL COMMENT '商品品牌编号',  
278 - `pic_url` varchar(256) NOT NULL COMMENT '商品封面图',  
279 - `slider_pic_urls` varchar(2000) DEFAULT '' COMMENT '商品轮播图地址\n 数组,以逗号分隔\n 最多上传15张',  
280 - `video_url` varchar(256) DEFAULT NULL COMMENT '商品视频',  
281 - `unit` tinyint NOT NULL COMMENT '单位',  
282 - `sort` int NOT NULL DEFAULT '0' COMMENT '排序字段',  
283 - `status` tinyint NOT NULL COMMENT '商品状态: 0 上架(开启) 1 下架(禁用)-1 回收',  
284 - `spec_type` bit(1) DEFAULT NULL COMMENT '规格类型:0 单规格 1 多规格',  
285 - `price` int NOT NULL DEFAULT '-1' COMMENT '商品价格,单位使用:分',  
286 - `market_price` int DEFAULT NULL COMMENT '市场价,单位使用:分',  
287 - `cost_price` int NOT NULL DEFAULT '-1' COMMENT '成本价,单位: 分',  
288 - `stock` int NOT NULL DEFAULT '0' COMMENT '库存',  
289 - `delivery_template_id` bigint NOT NULL COMMENT '物流配置模板编号',  
290 - `recommend_hot` bit(1) DEFAULT NULL COMMENT '是否热卖推荐: 0 默认 1 热卖',  
291 - `recommend_benefit` bit(1) DEFAULT NULL COMMENT '是否优惠推荐: 0 默认 1 优选',  
292 - `recommend_best` bit(1) DEFAULT NULL COMMENT '是否精品推荐: 0 默认 1 精品',  
293 - `recommend_new` bit(1) DEFAULT NULL COMMENT '是否新品推荐: 0 默认 1 新品',  
294 - `recommend_good` bit(1) DEFAULT NULL COMMENT '是否优品推荐',  
295 - `give_integral` int NOT NULL COMMENT '赠送积分',  
296 - `give_coupon_template_ids` varchar(512) DEFAULT '' COMMENT '赠送的优惠劵编号的数组',  
297 - `sub_commission_type` bit(1) DEFAULT NULL COMMENT '分销类型',  
298 - `activity_orders` varchar(16) NOT NULL DEFAULT '' COMMENT '活动显示排序0=默认, 1=秒杀,2=砍价,3=拼团',  
299 - `sales_count` int DEFAULT '0' COMMENT '商品销量',  
300 - `virtual_sales_count` int DEFAULT '0' COMMENT '虚拟销量',  
301 - `browse_count` int DEFAULT '0' COMMENT '商品点击量',  
302 - `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
303 - `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
304 - `creator` varchar(64) DEFAULT NULL COMMENT '创建人',  
305 - `updater` varchar(64) DEFAULT NULL COMMENT '更新人',  
306 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
307 - `tenant_id` bigint NOT NULL DEFAULT '0' COMMENT '租户编号',  
308 - PRIMARY KEY (`id`) USING BTREE  
309 -) ENGINE=InnoDB COMMENT='商品spu';  
310 -  
311 --- ----------------------------  
312 --- Table structure for product_favorite  
313 --- ----------------------------  
314 -DROP TABLE IF EXISTS `product_favorite`;  
315 -CREATE TABLE `product_favorite` (  
316 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号,自增',  
317 - `spu_id` bigint NOT NULL COMMENT '商品 SPU 编号',  
318 - `user_id` bigint NOT NULL COMMENT '用户id',  
319 - `type` int(10) NOT NULL DEFAULT 1 COMMENT '类型1:收藏 2:点赞',  
320 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',  
321 - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
322 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',  
323 - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
324 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
325 - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',  
326 - PRIMARY KEY (`id`) USING BTREE  
327 -) ENGINE=InnoDB COMMENT='商品收藏表';  
328 -  
329 --- Table structure for trade_delivery_express_template  
330 --- ----------------------------  
331 -DROP TABLE IF EXISTS `trade_delivery_express_template`;  
332 -CREATE TABLE `trade_delivery_express_template` (  
333 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',  
334 - `name` varchar(64) NOT NULL COMMENT '模板名称',  
335 - `charge_mode` tinyint NOT NULL COMMENT '配送计费方式',  
336 - `sort` int NOT NULL DEFAULT 0 COMMENT '排序',  
337 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',  
338 - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
339 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',  
340 - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
341 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
342 - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',  
343 - PRIMARY KEY (`id`) USING BTREE  
344 -) ENGINE=InnoDB COMMENT='快递运费模板';  
345 -  
346 --- ----------------------------  
347 --- Table structure for trade_delivery_express_template_free  
348 --- ----------------------------  
349 -DROP TABLE IF EXISTS `trade_delivery_express_template_free`;  
350 -CREATE TABLE `trade_delivery_express_template_free` (  
351 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',  
352 - `template_id` bigint NOT NULL COMMENT '快递运费模板编号',  
353 - `area_ids` varchar(100) NOT NULL COMMENT '包邮区域 ids',  
354 - `free_price` int NOT NULL COMMENT '包邮金额,单位:分',  
355 - `free_count` int NOT NULL DEFAULT 0 COMMENT '包邮件数,',  
356 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',  
357 - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
358 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',  
359 - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
360 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
361 - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',  
362 - PRIMARY KEY (`id`) USING BTREE  
363 -) ENGINE=InnoDB COMMENT='快递运费模板包邮配置';  
364 -  
365 --- ----------------------------  
366 --- Table structure for trade_delivery_express_template_charge  
367 --- ----------------------------  
368 -DROP TABLE IF EXISTS `trade_delivery_express_template_charge`;  
369 -CREATE TABLE `trade_delivery_express_template_charge` (  
370 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号,自增',  
371 - `template_id` bigint NOT NULL COMMENT '快递运费模板编号',  
372 - `area_ids` varchar(100) NOT NULL COMMENT '配送区域 ids',  
373 - `charge_mode` tinyint NOT NULL COMMENT '配送计费方式',  
374 - `start_count` double NOT NULL COMMENT '首件数量',  
375 - `start_price` int NOT NULL COMMENT '起步价,单位:分',  
376 - `extra_count` double NOT NULL COMMENT '续件数量',  
377 - `extra_price` int NOT NULL COMMENT '额外价,单位:分',  
378 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',  
379 - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
380 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',  
381 - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
382 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
383 - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',  
384 - PRIMARY KEY (`id`) USING BTREE  
385 -) ENGINE=InnoDB COMMENT='快递运费模板计费配置';  
386 -  
387 --- ----------------------------  
388 --- Table structure for trade_delivery_pick_up_store  
389 --- ----------------------------  
390 -DROP TABLE IF EXISTS `trade_delivery_pick_up_store`;  
391 -CREATE TABLE `trade_delivery_pick_up_store` (  
392 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',  
393 - `name` varchar(64) NOT NULL COMMENT '门店名称',  
394 - `introduction` varchar(256) COMMENT '门店简介',  
395 - `phone` varchar(16) NOT NULL COMMENT '门店手机',  
396 - `area_id` int NOT NULL COMMENT '区域编号',  
397 - `detail_address` varchar(256) NOT NULL COMMENT '门店详细地址',  
398 - `logo` varchar(256) NOT NULL COMMENT '门店 logo',  
399 - `opening_time` time NOT NULL COMMENT '营业开始时间',  
400 - `closing_time` time NOT NULL COMMENT '营业结束时间',  
401 - `latitude` double NOT NULL COMMENT '纬度',  
402 - `longitude` double NOT NULL COMMENT '经度',  
403 - `status` tinyint NOT NULL DEFAULT 0 COMMENT '门店状态',  
404 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',  
405 - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
406 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',  
407 - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
408 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
409 - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',  
410 - PRIMARY KEY (`id`) USING BTREE  
411 -) ENGINE=InnoDB COMMENT='自提门店';  
412 -  
413 --- ----------------------------  
414 --- Table structure for trade_delivery_pick_up_store_staff  
415 --- ----------------------------  
416 -DROP TABLE IF EXISTS `trade_delivery_pick_up_store_staff`;  
417 -CREATE TABLE `trade_delivery_pick_up_store_staff` (  
418 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号,自增',  
419 - store_id bigint NOT NULL COMMENT '自提门店编号',  
420 - `status` tinyint NOT NULL DEFAULT 0 COMMENT '状态',  
421 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',  
422 - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
423 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',  
424 - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
425 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
426 - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',  
427 - PRIMARY KEY (`id`) USING BTREE  
428 -) ENGINE=InnoDB COMMENT='自提门店店员';  
429 -  
430 --- ----------------------------  
431 --- Table structure for trade_delivery_express  
432 --- ----------------------------  
433 -DROP TABLE IF EXISTS `trade_delivery_express`;  
434 -CREATE TABLE `trade_delivery_express` (  
435 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',  
436 - `code` varchar(64) NOT NULL COMMENT '快递公司编码',  
437 - `name` varchar(64) NOT NULL COMMENT '快递公司名称',  
438 - `logo` varchar(256) COMMENT '快递公司 logo',  
439 - `sort` int NOT NULL DEFAULT 0 COMMENT '排序',  
440 - `status` tinyint NOT NULL DEFAULT 0 COMMENT '状态',  
441 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',  
442 - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
443 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',  
444 - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
445 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
446 - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',  
447 - PRIMARY KEY (`id`) USING BTREE  
448 -) ENGINE=InnoDB COMMENT='快递公司';  
449 -  
450 --- ----------------------------  
451 --- 页面装修表  
452 --- ----------------------------  
453 -DROP TABLE IF EXISTS `promotion_decorate_component`;  
454 -CREATE TABLE `promotion_decorate_component` (  
455 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '编号',  
456 - `page_id` int NOT NULL COMMENT '所属页面id',  
457 - `code` varchar(64) NOT NULL COMMENT '组件编码',  
458 - `value` json NOT NULL COMMENT '组件值:json 格式。包含配置和数据',  
459 - `status` tinyint NOT NULL DEFAULT 0 COMMENT '状态',  
460 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',  
461 - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
462 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',  
463 - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
464 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
465 - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',  
466 - PRIMARY KEY (`id`) USING BTREE  
467 -) ENGINE=InnoDB COMMENT='页面装修表';  
468 -  
469 -SET FOREIGN_KEY_CHECKS = 1;  
470 -  
471 -BEGIN;  
472 -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');  
473 -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');  
474 -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');  
475 -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');  
476 -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');  
477 -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');  
478 -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');  
479 -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');  
480 -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');  
481 -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');  
482 -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');  
483 -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');  
484 -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');  
485 -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');  
486 -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');  
487 -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');  
488 -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');  
489 -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');  
490 -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');  
491 -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');  
492 -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');  
493 -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');  
494 -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');  
495 -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');  
496 -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');  
497 -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');  
498 -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');  
499 -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');  
500 -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');  
501 -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');  
502 -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');  
503 -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');  
504 -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');  
505 -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');  
506 -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');  
507 -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');  
508 -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');  
509 -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');  
510 -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');  
511 -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');  
512 -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');  
513 -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');  
514 -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');  
515 -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');  
516 -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');  
517 -BEGIN;  
518 -  
519 --- ----------------------------  
520 --- 字典管理,添加商品单位字典 product_unit  
521 --- ----------------------------  
522 -BEGIN;  
523 -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');  
524 -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');  
525 -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');  
526 -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');  
527 -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');  
528 -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');  
529 -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');  
530 -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');  
531 -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');  
532 -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');  
533 -COMMIT;  
534 -  
535 --- ----------------------------  
536 --- 数字字典,快递计费方式  
537 --- ----------------------------  
538 -BEGIN;  
539 -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');  
540 -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');  
541 -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');  
542 -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');  
543 -COMMIT;  
544 -  
545 --- ----------------------------  
546 --- 门店管理 菜单  
547 --- ----------------------------  
548 -BEGIN;  
549 -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');  
550 -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');  
551 -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');  
552 -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');  
553 -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');  
554 -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');  
555 -COMMIT;  
sql/mysql/ruoyi-vue-pro.sql
@@ -876,294 +876,6 @@ BEGIN; @@ -876,294 +876,6 @@ BEGIN;
876 COMMIT; 876 COMMIT;
877 877
878 -- ---------------------------- 878 -- ----------------------------
879 --- Table structure for pay_app  
880 --- ----------------------------  
881 -DROP TABLE IF EXISTS `pay_app`;  
882 -CREATE TABLE `pay_app` (  
883 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '应用编号',  
884 - `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '应用名',  
885 - `status` tinyint NOT NULL COMMENT '开启状态',  
886 - `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注',  
887 - `pay_notify_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '支付结果的回调地址',  
888 - `refund_notify_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '退款结果的回调地址',  
889 - `merchant_id` bigint NOT NULL COMMENT '商户编号',  
890 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',  
891 - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
892 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',  
893 - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
894 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
895 - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',  
896 - PRIMARY KEY (`id`) USING BTREE  
897 -) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '支付应用信息';  
898 -  
899 --- ----------------------------  
900 --- Records of pay_app  
901 --- ----------------------------  
902 -BEGIN;  
903 -COMMIT;  
904 -  
905 --- ----------------------------  
906 --- Table structure for pay_channel  
907 --- ----------------------------  
908 -DROP TABLE IF EXISTS `pay_channel`;  
909 -CREATE TABLE `pay_channel` (  
910 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '商户编号',  
911 - `code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '渠道编码',  
912 - `status` tinyint NOT NULL COMMENT '开启状态',  
913 - `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注',  
914 - `fee_rate` double NOT NULL DEFAULT 0 COMMENT '渠道费率,单位:百分比',  
915 - `merchant_id` bigint NOT NULL COMMENT '商户编号',  
916 - `app_id` bigint NOT NULL COMMENT '应用编号',  
917 - `config` varchar(4096) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '支付渠道配置',  
918 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',  
919 - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
920 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',  
921 - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
922 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
923 - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',  
924 - PRIMARY KEY (`id`) USING BTREE  
925 -) ENGINE = InnoDB AUTO_INCREMENT = 22 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '支付渠道\n';  
926 -  
927 --- ----------------------------  
928 --- Records of pay_channel  
929 --- ----------------------------  
930 -BEGIN;  
931 -COMMIT;  
932 -  
933 --- ----------------------------  
934 --- Table structure for pay_demo_order  
935 --- ----------------------------  
936 -DROP TABLE IF EXISTS `pay_demo_order`;  
937 -CREATE TABLE `pay_demo_order` (  
938 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '订单编号',  
939 - `user_id` bigint UNSIGNED NOT NULL COMMENT '用户编号',  
940 - `spu_id` bigint NOT NULL COMMENT '商品编号',  
941 - `spu_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '商品名字',  
942 - `price` int NOT NULL COMMENT '价格,单位:分',  
943 - `payed` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否已支付:[0:未支付 1:已经支付过]',  
944 - `pay_order_id` bigint NULL DEFAULT NULL COMMENT '支付订单编号',  
945 - `pay_channel_code` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL COMMENT '支付成功的支付渠道',  
946 - `pay_time` datetime NULL DEFAULT NULL COMMENT '订单支付时间',  
947 - `pay_refund_id` bigint NULL DEFAULT NULL COMMENT '退款订单编号',  
948 - `refund_price` int NOT NULL DEFAULT 0 COMMENT '退款金额,单位:分',  
949 - `refund_time` datetime NULL DEFAULT NULL COMMENT '退款时间',  
950 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '' COMMENT '创建者',  
951 - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
952 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT '' COMMENT '更新者',  
953 - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
954 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
955 - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',  
956 - PRIMARY KEY (`id`) USING BTREE  
957 -) ENGINE = InnoDB AUTO_INCREMENT = 72 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '示例订单\n';  
958 -  
959 --- ----------------------------  
960 --- Records of pay_demo_order  
961 --- ----------------------------  
962 -BEGIN;  
963 -COMMIT;  
964 -  
965 --- ----------------------------  
966 --- Table structure for pay_merchant  
967 --- ----------------------------  
968 -DROP TABLE IF EXISTS `pay_merchant`;  
969 -CREATE TABLE `pay_merchant` (  
970 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '商户编号',  
971 - `no` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商户号',  
972 - `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商户全称',  
973 - `short_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商户简称',  
974 - `status` tinyint NOT NULL COMMENT '开启状态',  
975 - `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '备注',  
976 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',  
977 - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
978 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',  
979 - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
980 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
981 - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',  
982 - PRIMARY KEY (`id`) USING BTREE  
983 -) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '支付商户信息';  
984 -  
985 --- ----------------------------  
986 --- Records of pay_merchant  
987 --- ----------------------------  
988 -BEGIN;  
989 -COMMIT;  
990 -  
991 --- ----------------------------  
992 --- Table structure for pay_notify_log  
993 --- ----------------------------  
994 -DROP TABLE IF EXISTS `pay_notify_log`;  
995 -CREATE TABLE `pay_notify_log` (  
996 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '日志编号',  
997 - `task_id` bigint NOT NULL COMMENT '通知任务编号',  
998 - `notify_times` tinyint NOT NULL COMMENT '第几次被通知',  
999 - `response` varchar(2048) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '请求参数',  
1000 - `status` tinyint NOT NULL COMMENT '通知状态',  
1001 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',  
1002 - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
1003 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',  
1004 - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
1005 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
1006 - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',  
1007 - PRIMARY KEY (`id`) USING BTREE  
1008 -) ENGINE = InnoDB AUTO_INCREMENT = 371964 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '支付通知 App 的日志';  
1009 -  
1010 --- ----------------------------  
1011 --- Records of pay_notify_log  
1012 --- ----------------------------  
1013 -BEGIN;  
1014 -COMMIT;  
1015 -  
1016 --- ----------------------------  
1017 --- Table structure for pay_notify_task  
1018 --- ----------------------------  
1019 -DROP TABLE IF EXISTS `pay_notify_task`;  
1020 -CREATE TABLE `pay_notify_task` (  
1021 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '任务编号',  
1022 - `merchant_id` bigint NOT NULL COMMENT '商户编号',  
1023 - `app_id` bigint NOT NULL COMMENT '应用编号',  
1024 - `type` tinyint NOT NULL COMMENT '通知类型',  
1025 - `data_id` bigint NOT NULL COMMENT '数据编号',  
1026 - `status` tinyint NOT NULL COMMENT '通知状态',  
1027 - `merchant_order_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商户订单编号',  
1028 - `next_notify_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '下一次通知时间',  
1029 - `last_execute_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后一次执行时间',  
1030 - `notify_times` tinyint NOT NULL COMMENT '当前通知次数',  
1031 - `max_notify_times` tinyint NOT NULL COMMENT '最大可通知次数',  
1032 - `notify_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '异步通知地址',  
1033 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',  
1034 - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
1035 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',  
1036 - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
1037 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
1038 - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',  
1039 - PRIMARY KEY (`id`) USING BTREE  
1040 -) ENGINE = InnoDB AUTO_INCREMENT = 151 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '商户支付、退款等的通知\n';  
1041 -  
1042 --- ----------------------------  
1043 --- Records of pay_notify_task  
1044 --- ----------------------------  
1045 -BEGIN;  
1046 -COMMIT;  
1047 -  
1048 --- ----------------------------  
1049 --- Table structure for pay_order  
1050 --- ----------------------------  
1051 -DROP TABLE IF EXISTS `pay_order`;  
1052 -CREATE TABLE `pay_order` (  
1053 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '支付订单编号',  
1054 - `merchant_id` bigint NOT NULL COMMENT '商户编号',  
1055 - `app_id` bigint NOT NULL COMMENT '应用编号',  
1056 - `channel_id` bigint NULL DEFAULT NULL COMMENT '渠道编号',  
1057 - `channel_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '渠道编码',  
1058 - `merchant_order_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商户订单编号',  
1059 - `subject` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商品标题',  
1060 - `body` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商品描述',  
1061 - `notify_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '异步通知地址',  
1062 - `notify_status` tinyint NOT NULL COMMENT '通知商户支付结果的回调状态',  
1063 - `amount` bigint NOT NULL COMMENT '支付金额,单位:分',  
1064 - `channel_fee_rate` double NULL DEFAULT 0 COMMENT '渠道手续费,单位:百分比',  
1065 - `channel_fee_amount` bigint NULL DEFAULT 0 COMMENT '渠道手续金额,单位:分',  
1066 - `status` tinyint NOT NULL COMMENT '支付状态',  
1067 - `user_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户 IP',  
1068 - `expire_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '订单失效时间',  
1069 - `success_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '订单支付成功时间',  
1070 - `notify_time` datetime NULL DEFAULT CURRENT_TIMESTAMP COMMENT '订单支付通知时间',  
1071 - `success_extension_id` bigint NULL DEFAULT NULL COMMENT '支付成功的订单拓展单编号',  
1072 - `refund_status` tinyint NOT NULL COMMENT '退款状态',  
1073 - `refund_times` tinyint NOT NULL COMMENT '退款次数',  
1074 - `refund_amount` bigint NOT NULL COMMENT '退款总金额,单位:分',  
1075 - `channel_user_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '渠道用户编号',  
1076 - `channel_order_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '渠道订单号',  
1077 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',  
1078 - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
1079 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',  
1080 - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
1081 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
1082 - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',  
1083 - PRIMARY KEY (`id`) USING BTREE  
1084 -) ENGINE = InnoDB AUTO_INCREMENT = 171 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '支付订单\n';  
1085 -  
1086 --- ----------------------------  
1087 --- Records of pay_order  
1088 --- ----------------------------  
1089 -BEGIN;  
1090 -COMMIT;  
1091 -  
1092 --- ----------------------------  
1093 --- Table structure for pay_order_extension  
1094 --- ----------------------------  
1095 -DROP TABLE IF EXISTS `pay_order_extension`;  
1096 -CREATE TABLE `pay_order_extension` (  
1097 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '支付订单编号',  
1098 - `no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '支付订单号',  
1099 - `order_id` bigint NOT NULL COMMENT '支付订单编号',  
1100 - `channel_id` bigint NOT NULL COMMENT '渠道编号',  
1101 - `channel_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '渠道编码',  
1102 - `user_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户 IP',  
1103 - `status` tinyint NOT NULL COMMENT '支付状态',  
1104 - `channel_extras` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '支付渠道的额外参数',  
1105 - `channel_notify_data` varchar(4096) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '支付渠道异步通知的内容',  
1106 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',  
1107 - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
1108 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',  
1109 - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
1110 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
1111 - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',  
1112 - PRIMARY KEY (`id`) USING BTREE  
1113 -) ENGINE = InnoDB AUTO_INCREMENT = 383 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '支付订单\n';  
1114 -  
1115 --- ----------------------------  
1116 --- Records of pay_order_extension  
1117 --- ----------------------------  
1118 -BEGIN;  
1119 -COMMIT;  
1120 -  
1121 --- ----------------------------  
1122 --- Table structure for pay_refund  
1123 --- ----------------------------  
1124 -DROP TABLE IF EXISTS `pay_refund`;  
1125 -CREATE TABLE `pay_refund` (  
1126 - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '支付退款编号',  
1127 - `merchant_id` bigint NOT NULL COMMENT '商户编号',  
1128 - `app_id` bigint NOT NULL COMMENT '应用编号',  
1129 - `channel_id` bigint NOT NULL COMMENT '渠道编号',  
1130 - `channel_code` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '渠道编码',  
1131 - `order_id` bigint NOT NULL COMMENT '支付订单编号 pay_order 表id',  
1132 - `trade_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '交易订单号 pay_extension 表no 字段',  
1133 - `merchant_order_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商户订单编号(商户系统生成)',  
1134 - `merchant_refund_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '商户退款订单号(商户系统生成)',  
1135 - `notify_url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '异步通知商户地址',  
1136 - `notify_status` tinyint NOT NULL COMMENT '通知商户退款结果的回调状态',  
1137 - `status` tinyint NOT NULL COMMENT '退款状态',  
1138 - `type` tinyint NOT NULL COMMENT '退款类型(部分退款,全部退款)',  
1139 - `pay_amount` bigint NOT NULL COMMENT '支付金额,单位分',  
1140 - `refund_amount` bigint NOT NULL COMMENT '退款金额,单位分',  
1141 - `reason` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '退款原因',  
1142 - `user_ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '用户 IP',  
1143 - `channel_order_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '渠道订单号,pay_order 中的channel_order_no 对应',  
1144 - `channel_refund_no` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '渠道退款单号,渠道返回',  
1145 - `channel_error_code` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '渠道调用报错时,错误码',  
1146 - `channel_error_msg` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '渠道调用报错时,错误信息',  
1147 - `channel_extras` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL COMMENT '支付渠道的额外参数',  
1148 - `expire_time` datetime NULL DEFAULT NULL COMMENT '退款失效时间',  
1149 - `success_time` datetime NULL DEFAULT NULL COMMENT '退款成功时间',  
1150 - `notify_time` datetime NULL DEFAULT NULL COMMENT '退款通知时间',  
1151 - `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',  
1152 - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',  
1153 - `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',  
1154 - `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',  
1155 - `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',  
1156 - `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',  
1157 - PRIMARY KEY (`id`) USING BTREE  
1158 -) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '退款订单';  
1159 -  
1160 --- ----------------------------  
1161 --- Records of pay_refund  
1162 --- ----------------------------  
1163 -BEGIN;  
1164 -COMMIT;  
1165 -  
1166 --- ----------------------------  
1167 -- Table structure for system_dept 879 -- Table structure for system_dept
1168 -- ---------------------------- 880 -- ----------------------------
1169 DROP TABLE IF EXISTS `system_dept`; 881 DROP TABLE IF EXISTS `system_dept`;
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayAppController.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/PayAppController.java
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant; 1 +package cn.iocoder.yudao.module.pay.controller.admin.app;
2 2
3 import cn.hutool.core.collection.CollUtil; 3 import cn.hutool.core.collection.CollUtil;
4 import cn.iocoder.yudao.framework.common.pojo.CommonResult; 4 import cn.iocoder.yudao.framework.common.pojo.CommonResult;
5 import cn.iocoder.yudao.framework.common.pojo.PageResult; 5 import cn.iocoder.yudao.framework.common.pojo.PageResult;
6 import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; 6 import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
7 -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;  
8 -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;  
9 import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum; 7 import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum;
10 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.*; 8 +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.*;
11 import cn.iocoder.yudao.module.pay.convert.app.PayAppConvert; 9 import cn.iocoder.yudao.module.pay.convert.app.PayAppConvert;
12 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO;  
13 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO;  
14 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO;  
15 -import cn.iocoder.yudao.module.pay.service.merchant.PayAppService;  
16 -import cn.iocoder.yudao.module.pay.service.merchant.PayChannelService;  
17 -import cn.iocoder.yudao.module.pay.service.merchant.PayMerchantService;  
18 -import io.swagger.v3.oas.annotations.tags.Tag;  
19 -import io.swagger.v3.oas.annotations.Parameter; 10 +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO;
  11 +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO;
  12 +import cn.iocoder.yudao.module.pay.service.app.PayAppService;
  13 +import cn.iocoder.yudao.module.pay.service.channel.PayChannelService;
20 import io.swagger.v3.oas.annotations.Operation; 14 import io.swagger.v3.oas.annotations.Operation;
  15 +import io.swagger.v3.oas.annotations.Parameter;
  16 +import io.swagger.v3.oas.annotations.tags.Tag;
21 import lombok.extern.slf4j.Slf4j; 17 import lombok.extern.slf4j.Slf4j;
22 import org.springframework.security.access.prepost.PreAuthorize; 18 import org.springframework.security.access.prepost.PreAuthorize;
23 import org.springframework.validation.annotation.Validated; 19 import org.springframework.validation.annotation.Validated;
24 import org.springframework.web.bind.annotation.*; 20 import org.springframework.web.bind.annotation.*;
25 21
26 import javax.annotation.Resource; 22 import javax.annotation.Resource;
27 -import javax.servlet.http.HttpServletResponse;  
28 import javax.validation.Valid; 23 import javax.validation.Valid;
29 -import java.io.IOException;  
30 import java.util.*; 24 import java.util.*;
31 25
32 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; 26 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
33 -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;  
34 27
35 @Slf4j 28 @Slf4j
36 @Tag(name = "管理后台 - 支付应用信息") 29 @Tag(name = "管理后台 - 支付应用信息")
@@ -43,8 +36,6 @@ public class PayAppController { @@ -43,8 +36,6 @@ public class PayAppController {
43 private PayAppService appService; 36 private PayAppService appService;
44 @Resource 37 @Resource
45 private PayChannelService channelService; 38 private PayChannelService channelService;
46 - @Resource  
47 - private PayMerchantService merchantService;  
48 39
49 @PostMapping("/create") 40 @PostMapping("/create")
50 @Operation(summary = "创建支付应用信息") 41 @Operation(summary = "创建支付应用信息")
@@ -112,17 +103,11 @@ public class PayAppController { @@ -112,17 +103,11 @@ public class PayAppController {
112 // TODO @aquan:可以基于 appId 简历一个 multiMap。这样下面,直接 get 到之后,CollUtil buildSet 即可 103 // TODO @aquan:可以基于 appId 简历一个 multiMap。这样下面,直接 get 到之后,CollUtil buildSet 即可
113 Iterator<PayChannelDO> iterator = channels.iterator(); 104 Iterator<PayChannelDO> iterator = channels.iterator();
114 105
115 - // 得到所有的商户信息  
116 - Collection<Long> merchantIds = CollectionUtils.convertList(pageResult.getList(), PayAppDO::getMerchantId);  
117 - Map<Long, PayMerchantDO> deptMap = merchantService.getMerchantMap(merchantIds);  
118 -  
119 // 利用反射将渠道数据复制到返回的数据结构中去 106 // 利用反射将渠道数据复制到返回的数据结构中去
120 List<PayAppPageItemRespVO> appList = new ArrayList<>(pageResult.getList().size()); 107 List<PayAppPageItemRespVO> appList = new ArrayList<>(pageResult.getList().size());
121 pageResult.getList().forEach(app -> { 108 pageResult.getList().forEach(app -> {
122 // 写入应用信息的数据 109 // 写入应用信息的数据
123 PayAppPageItemRespVO respVO = PayAppConvert.INSTANCE.pageConvert(app); 110 PayAppPageItemRespVO respVO = PayAppConvert.INSTANCE.pageConvert(app);
124 - // 写入商户的数据  
125 - respVO.setPayMerchant(PayAppConvert.INSTANCE.convert(deptMap.get(app.getMerchantId())));  
126 // 写入支付渠道信息的数据 111 // 写入支付渠道信息的数据
127 Set<String> channelCodes = new HashSet<>(PayChannelEnum.values().length); 112 Set<String> channelCodes = new HashSet<>(PayChannelEnum.values().length);
128 while (iterator.hasNext()) { 113 while (iterator.hasNext()) {
@@ -139,25 +124,4 @@ public class PayAppController { @@ -139,25 +124,4 @@ public class PayAppController {
139 return success(new PageResult<>(appList, pageResult.getTotal())); 124 return success(new PageResult<>(appList, pageResult.getTotal()));
140 } 125 }
141 126
142 - @GetMapping("/export-excel")  
143 - @Operation(summary = "导出支付应用信息 Excel")  
144 - @PreAuthorize("@ss.hasPermission('pay:app:export')")  
145 - @OperateLog(type = EXPORT)  
146 - public void exportAppExcel(@Valid PayAppExportReqVO exportReqVO,  
147 - HttpServletResponse response) throws IOException {  
148 - List<PayAppDO> list = appService.getAppList(exportReqVO);  
149 - // 导出 Excel  
150 - List<PayAppExcelVO> datas = PayAppConvert.INSTANCE.convertList02(list);  
151 - ExcelUtils.write(response, "支付应用信息.xls", "数据", PayAppExcelVO.class, datas);  
152 - }  
153 -  
154 - @GetMapping("/list-merchant-id")  
155 - @Operation(summary = "根据商户 ID 查询支付应用信息")  
156 - @Parameter(name = "merchantId", description = "商户ID", required = true, example = "1")  
157 - @PreAuthorize("@ss.hasPermission('pay:merchant:query')")  
158 - public CommonResult<List<PayAppRespVO>> getMerchantListByName(@RequestParam Long merchantId) {  
159 - List<PayAppDO> appListDO = appService.getListByMerchantId(merchantId);  
160 - return success(PayAppConvert.INSTANCE.convertList(appListDO));  
161 - }  
162 -  
163 } 127 }
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppBaseVO.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppBaseVO.java
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; 1 +package cn.iocoder.yudao.module.pay.controller.admin.app.vo;
2 import io.swagger.v3.oas.annotations.media.Schema; 2 import io.swagger.v3.oas.annotations.media.Schema;
3 import lombok.*; 3 import lombok.*;
4 import javax.validation.constraints.*; 4 import javax.validation.constraints.*;
@@ -29,8 +29,4 @@ public class PayAppBaseVO { @@ -29,8 +29,4 @@ public class PayAppBaseVO {
29 @NotNull(message = "退款结果的回调地址不能为空") 29 @NotNull(message = "退款结果的回调地址不能为空")
30 private String refundNotifyUrl; 30 private String refundNotifyUrl;
31 31
32 - @Schema(description = "商户编号", requiredMode = Schema.RequiredMode.REQUIRED)  
33 - @NotNull(message = "商户编号不能为空")  
34 - private Long merchantId;  
35 -  
36 } 32 }
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppCreateReqVO.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppCreateReqVO.java
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; 1 +package cn.iocoder.yudao.module.pay.controller.admin.app.vo;
2 import io.swagger.v3.oas.annotations.media.Schema; 2 import io.swagger.v3.oas.annotations.media.Schema;
3 import lombok.*; 3 import lombok.*;
4 4
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppPageItemRespVO.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppPageItemRespVO.java
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; 1 +package cn.iocoder.yudao.module.pay.controller.admin.app.vo;
2 2
3 import io.swagger.v3.oas.annotations.media.Schema; 3 import io.swagger.v3.oas.annotations.media.Schema;
4 import lombok.Data; 4 import lombok.Data;
@@ -20,25 +20,7 @@ public class PayAppPageItemRespVO extends PayAppBaseVO { @@ -20,25 +20,7 @@ public class PayAppPageItemRespVO extends PayAppBaseVO {
20 @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) 20 @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
21 private LocalDateTime createTime; 21 private LocalDateTime createTime;
22 22
23 - /**  
24 - * 所属商户  
25 - */  
26 - private PayMerchant payMerchant;  
27 -  
28 - @Schema(description = "商户")  
29 - @Data  
30 - public static class PayMerchant {  
31 -  
32 - @Schema(description = "商户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")  
33 - private Long id;  
34 -  
35 - @Schema(description = "商户名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "研发部")  
36 - private String name;  
37 -  
38 - }  
39 -  
40 - @Schema(description = "渠道编码集合", requiredMode = Schema.RequiredMode.REQUIRED, example = "alipay_pc,alipay_wap...") 23 + @Schema(description = "渠道编码集合", requiredMode = Schema.RequiredMode.REQUIRED, example = "[alipay_pc, alipay_wap]")
41 private Set<String> channelCodes; 24 private Set<String> channelCodes;
42 25
43 -  
44 } 26 }
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppPageReqVO.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppPageReqVO.java
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app;  
2 -import io.swagger.v3.oas.annotations.media.Schema;  
3 -import lombok.*; 1 +package cn.iocoder.yudao.module.pay.controller.admin.app.vo;
4 2
5 -import java.time.LocalDateTime;  
6 import cn.iocoder.yudao.framework.common.pojo.PageParam; 3 import cn.iocoder.yudao.framework.common.pojo.PageParam;
  4 +import io.swagger.v3.oas.annotations.media.Schema;
  5 +import lombok.Data;
  6 +import lombok.EqualsAndHashCode;
  7 +import lombok.ToString;
7 import org.springframework.format.annotation.DateTimeFormat; 8 import org.springframework.format.annotation.DateTimeFormat;
8 9
  10 +import java.time.LocalDateTime;
  11 +
9 import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; 12 import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
10 13
11 @Schema(description = "管理后台 - 支付应用信息分页 Request VO") 14 @Schema(description = "管理后台 - 支付应用信息分页 Request VO")
@@ -29,9 +32,6 @@ public class PayAppPageReqVO extends PageParam { @@ -29,9 +32,6 @@ public class PayAppPageReqVO extends PageParam {
29 @Schema(description = "退款结果的回调地址") 32 @Schema(description = "退款结果的回调地址")
30 private String refundNotifyUrl; 33 private String refundNotifyUrl;
31 34
32 - @Schema(description = "商户名称")  
33 - private String merchantName;  
34 -  
35 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) 35 @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
36 @Schema(description = "创建时间") 36 @Schema(description = "创建时间")
37 private LocalDateTime[] createTime; 37 private LocalDateTime[] createTime;
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppRespVO.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppRespVO.java
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; 1 +package cn.iocoder.yudao.module.pay.controller.admin.app.vo;
2 import io.swagger.v3.oas.annotations.media.Schema; 2 import io.swagger.v3.oas.annotations.media.Schema;
3 import lombok.*; 3 import lombok.*;
4 4
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppUpdateReqVO.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppUpdateReqVO.java
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; 1 +package cn.iocoder.yudao.module.pay.controller.admin.app.vo;
2 import io.swagger.v3.oas.annotations.media.Schema; 2 import io.swagger.v3.oas.annotations.media.Schema;
3 import lombok.*; 3 import lombok.*;
4 import javax.validation.constraints.*; 4 import javax.validation.constraints.*;
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppUpdateStatusReqVO.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/app/vo/PayAppUpdateStatusReqVO.java
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app; 1 +package cn.iocoder.yudao.module.pay.controller.admin.app.vo;
2 2
3 import io.swagger.v3.oas.annotations.media.Schema; 3 import io.swagger.v3.oas.annotations.media.Schema;
4 import lombok.Data; 4 import lombok.Data;
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayChannelController.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/PayChannelController.java
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant; 1 +package cn.iocoder.yudao.module.pay.controller.admin.channel;
2 2
3 import cn.iocoder.yudao.framework.common.pojo.CommonResult; 3 import cn.iocoder.yudao.framework.common.pojo.CommonResult;
4 import cn.iocoder.yudao.framework.common.pojo.PageResult; 4 import cn.iocoder.yudao.framework.common.pojo.PageResult;
5 -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;  
6 -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;  
7 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.*; 5 +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelCreateReqVO;
  6 +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelPageReqVO;
  7 +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelRespVO;
  8 +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelUpdateReqVO;
8 import cn.iocoder.yudao.module.pay.convert.channel.PayChannelConvert; 9 import cn.iocoder.yudao.module.pay.convert.channel.PayChannelConvert;
9 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO;  
10 -import cn.iocoder.yudao.module.pay.service.merchant.PayChannelService; 10 +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO;
  11 +import cn.iocoder.yudao.module.pay.service.channel.PayChannelService;
11 import io.swagger.v3.oas.annotations.Operation; 12 import io.swagger.v3.oas.annotations.Operation;
12 import io.swagger.v3.oas.annotations.Parameter; 13 import io.swagger.v3.oas.annotations.Parameter;
13 import io.swagger.v3.oas.annotations.Parameters; 14 import io.swagger.v3.oas.annotations.Parameters;
@@ -17,15 +18,12 @@ import org.springframework.validation.annotation.Validated; @@ -17,15 +18,12 @@ import org.springframework.validation.annotation.Validated;
17 import org.springframework.web.bind.annotation.*; 18 import org.springframework.web.bind.annotation.*;
18 19
19 import javax.annotation.Resource; 20 import javax.annotation.Resource;
20 -import javax.servlet.http.HttpServletResponse;  
21 import javax.validation.Valid; 21 import javax.validation.Valid;
22 -import java.io.IOException;  
23 import java.util.List; 22 import java.util.List;
24 import java.util.Set; 23 import java.util.Set;
25 24
26 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; 25 import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
27 import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet; 26 import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
28 -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;  
29 27
30 @Tag(name = "管理后台 - 支付渠道") 28 @Tag(name = "管理后台 - 支付渠道")
31 @RestController 29 @RestController
@@ -77,34 +75,17 @@ public class PayChannelController { @@ -77,34 +75,17 @@ public class PayChannelController {
77 return success(PayChannelConvert.INSTANCE.convertPage(pageResult)); 75 return success(PayChannelConvert.INSTANCE.convertPage(pageResult));
78 } 76 }
79 77
80 - @GetMapping("/export-excel")  
81 - @Operation(summary = "导出支付渠道Excel")  
82 - @PreAuthorize("@ss.hasPermission('pay:channel:export')")  
83 - @OperateLog(type = EXPORT)  
84 - public void exportChannelExcel(@Valid PayChannelExportReqVO exportReqVO,  
85 - HttpServletResponse response) throws IOException {  
86 - List<PayChannelDO> list = channelService.getChannelList(exportReqVO);  
87 - // 导出 Excel  
88 - List<PayChannelExcelVO> datas = PayChannelConvert.INSTANCE.convertList02(list);  
89 - ExcelUtils.write(response, "支付渠道.xls", "数据", PayChannelExcelVO.class, datas);  
90 - }  
91 -  
92 // TODO 芋艿:需要 review 下实现 78 // TODO 芋艿:需要 review 下实现
93 @GetMapping("/get-channel") 79 @GetMapping("/get-channel")
94 @Operation(summary = "根据条件查询微信支付渠道") 80 @Operation(summary = "根据条件查询微信支付渠道")
95 @Parameters({ 81 @Parameters({
96 - @Parameter(name = "merchantId", description = "商户编号",  
97 - required = true, example = "1"),  
98 - @Parameter(name = "appId", description = "应用编号",  
99 - required = true, example = "1"),  
100 - @Parameter(name = "code", description = "支付渠道编码",  
101 - required = true, example = "wx_pub") 82 + @Parameter(name = "appId", description = "应用编号", required = true, example = "1"),
  83 + @Parameter(name = "code", description = "支付渠道编码", required = true, example = "wx_pub")
102 }) 84 })
103 @PreAuthorize("@ss.hasPermission('pay:channel:query')") 85 @PreAuthorize("@ss.hasPermission('pay:channel:query')")
104 - public CommonResult<PayChannelRespVO> getChannel(  
105 - @RequestParam Long merchantId, @RequestParam Long appId, @RequestParam String code) { 86 + public CommonResult<PayChannelRespVO> getChannel(@RequestParam Long appId, @RequestParam String code) {
106 // 獲取渠道 87 // 獲取渠道
107 - PayChannelDO channel = channelService.getChannelByConditions(merchantId, appId, code); 88 + PayChannelDO channel = channelService.getChannelByConditions(appId, code);
108 if (channel == null) { 89 if (channel == null) {
109 return success(new PayChannelRespVO()); 90 return success(new PayChannelRespVO());
110 } 91 }
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelBaseVO.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelBaseVO.java
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; 1 +package cn.iocoder.yudao.module.pay.controller.admin.channel.vo;
2 import io.swagger.v3.oas.annotations.media.Schema; 2 import io.swagger.v3.oas.annotations.media.Schema;
3 import lombok.*; 3 import lombok.*;
4 import javax.validation.constraints.*; 4 import javax.validation.constraints.*;
@@ -25,10 +25,6 @@ public class PayChannelBaseVO { @@ -25,10 +25,6 @@ public class PayChannelBaseVO {
25 @NotNull(message = "渠道费率,单位:百分比不能为空") 25 @NotNull(message = "渠道费率,单位:百分比不能为空")
26 private Double feeRate; 26 private Double feeRate;
27 27
28 - @Schema(description = "商户编号", requiredMode = Schema.RequiredMode.REQUIRED)  
29 - @NotNull(message = "商户编号不能为空")  
30 - private Long merchantId;  
31 -  
32 @Schema(description = "应用编号", requiredMode = Schema.RequiredMode.REQUIRED) 28 @Schema(description = "应用编号", requiredMode = Schema.RequiredMode.REQUIRED)
33 @NotNull(message = "应用编号不能为空") 29 @NotNull(message = "应用编号不能为空")
34 private Long appId; 30 private Long appId;
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelCreateReqVO.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelCreateReqVO.java
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; 1 +package cn.iocoder.yudao.module.pay.controller.admin.channel.vo;
2 2
3 import io.swagger.v3.oas.annotations.media.Schema; 3 import io.swagger.v3.oas.annotations.media.Schema;
4 import lombok.Data; 4 import lombok.Data;
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelPageReqVO.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelPageReqVO.java
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel;  
2 -import io.swagger.v3.oas.annotations.media.Schema;  
3 -import lombok.*; 1 +package cn.iocoder.yudao.module.pay.controller.admin.channel.vo;
4 2
5 -import java.time.LocalDateTime;  
6 import cn.iocoder.yudao.framework.common.pojo.PageParam; 3 import cn.iocoder.yudao.framework.common.pojo.PageParam;
  4 +import io.swagger.v3.oas.annotations.media.Schema;
  5 +import lombok.Data;
  6 +import lombok.EqualsAndHashCode;
  7 +import lombok.ToString;
7 import org.springframework.format.annotation.DateTimeFormat; 8 import org.springframework.format.annotation.DateTimeFormat;
8 9
  10 +import java.time.LocalDateTime;
  11 +
9 import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; 12 import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
10 13
11 @Schema(description = "管理后台 - 支付渠道 分页 Request VO") 14 @Schema(description = "管理后台 - 支付渠道 分页 Request VO")
@@ -26,9 +29,6 @@ public class PayChannelPageReqVO extends PageParam { @@ -26,9 +29,6 @@ public class PayChannelPageReqVO extends PageParam {
26 @Schema(description = "渠道费率,单位:百分比") 29 @Schema(description = "渠道费率,单位:百分比")
27 private Double feeRate; 30 private Double feeRate;
28 31
29 - @Schema(description = "商户编号")  
30 - private Long merchantId;  
31 -  
32 @Schema(description = "应用编号") 32 @Schema(description = "应用编号")
33 private Long appId; 33 private Long appId;
34 34
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelRespVO.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelRespVO.java
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; 1 +package cn.iocoder.yudao.module.pay.controller.admin.channel.vo;
2 import io.swagger.v3.oas.annotations.media.Schema; 2 import io.swagger.v3.oas.annotations.media.Schema;
3 import lombok.*; 3 import lombok.*;
4 4
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelUpdateReqVO.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/channel/vo/PayChannelUpdateReqVO.java
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel; 1 +package cn.iocoder.yudao.module.pay.controller.admin.channel.vo;
2 import io.swagger.v3.oas.annotations.media.Schema; 2 import io.swagger.v3.oas.annotations.media.Schema;
3 import lombok.*; 3 import lombok.*;
4 import javax.validation.constraints.*; 4 import javax.validation.constraints.*;
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/PayMerchantController.java deleted
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant;  
2 -  
3 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.*;  
4 -import cn.iocoder.yudao.module.pay.convert.merchant.PayMerchantConvert;  
5 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO;  
6 -import cn.iocoder.yudao.module.pay.service.merchant.PayMerchantService;  
7 -import cn.iocoder.yudao.framework.common.pojo.CommonResult;  
8 -import cn.iocoder.yudao.framework.common.pojo.PageResult;  
9 -import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;  
10 -import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;  
11 -import io.swagger.v3.oas.annotations.tags.Tag;  
12 -import io.swagger.v3.oas.annotations.Parameter;  
13 -import io.swagger.v3.oas.annotations.Operation;  
14 -import org.springframework.security.access.prepost.PreAuthorize;  
15 -import org.springframework.validation.annotation.Validated;  
16 -import org.springframework.web.bind.annotation.*;  
17 -  
18 -import javax.annotation.Resource;  
19 -import javax.servlet.http.HttpServletResponse;  
20 -import javax.validation.Valid;  
21 -import java.io.IOException;  
22 -import java.util.Collection;  
23 -import java.util.List;  
24 -  
25 -import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;  
26 -import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;  
27 -  
28 -@Tag(name = "支付商户信息")  
29 -@RestController  
30 -@RequestMapping("/pay/merchant")  
31 -@Validated  
32 -public class PayMerchantController {  
33 -  
34 - @Resource  
35 - private PayMerchantService merchantService;  
36 -  
37 - @PostMapping("/create")  
38 - @Operation(summary = "创建支付商户信息")  
39 - @PreAuthorize("@ss.hasPermission('pay:merchant:create')")  
40 - public CommonResult<Long> createMerchant(@Valid @RequestBody PayMerchantCreateReqVO createReqVO) {  
41 - return success(merchantService.createMerchant(createReqVO));  
42 - }  
43 -  
44 - @PutMapping("/update")  
45 - @Operation(summary = "更新支付商户信息")  
46 - @PreAuthorize("@ss.hasPermission('pay:merchant:update')")  
47 - public CommonResult<Boolean> updateMerchant(@Valid @RequestBody PayMerchantUpdateReqVO updateReqVO) {  
48 - merchantService.updateMerchant(updateReqVO);  
49 - return success(true);  
50 - }  
51 -  
52 - @PutMapping("/update-status")  
53 - @Operation(summary = "修改支付商户状态")  
54 - @PreAuthorize("@ss.hasPermission('pay:merchant:update')")  
55 - public CommonResult<Boolean> updateMerchantStatus(@Valid @RequestBody PayMerchantUpdateStatusReqVO reqVO) {  
56 - merchantService.updateMerchantStatus(reqVO.getId(), reqVO.getStatus());  
57 - return success(true);  
58 - }  
59 -  
60 - @DeleteMapping("/delete")  
61 - @Operation(summary = "删除支付商户信息")  
62 - @Parameter(name = "id", description = "编号", required = true)  
63 - @PreAuthorize("@ss.hasPermission('pay:merchant:delete')")  
64 - public CommonResult<Boolean> deleteMerchant(@RequestParam("id") Long id) {  
65 - merchantService.deleteMerchant(id);  
66 - return success(true);  
67 - }  
68 -  
69 - @GetMapping("/get")  
70 - @Operation(summary = "获得支付商户信息")  
71 - @Parameter(name = "id", description = "编号", required = true, example = "1024")  
72 - @PreAuthorize("@ss.hasPermission('pay:merchant:query')")  
73 - public CommonResult<PayMerchantRespVO> getMerchant(@RequestParam("id") Long id) {  
74 - PayMerchantDO merchant = merchantService.getMerchant(id);  
75 - return success(PayMerchantConvert.INSTANCE.convert(merchant));  
76 - }  
77 -  
78 - @GetMapping("/list-by-name")  
79 - @Operation(summary = "根据商户名称获得支付商户信息列表")  
80 - @Parameter(name = "name", description = "商户名称", example = "芋道")  
81 - @PreAuthorize("@ss.hasPermission('pay:merchant:query')")  
82 - public CommonResult<List<PayMerchantRespVO>> getMerchantListByName(@RequestParam(required = false) String name) {  
83 - List<PayMerchantDO> merchantListDO = merchantService.getMerchantListByName(name);  
84 - return success(PayMerchantConvert.INSTANCE.convertList(merchantListDO));  
85 - }  
86 -  
87 - @GetMapping("/list")  
88 - @Operation(summary = "获得支付商户信息列表")  
89 - @Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048")  
90 - @PreAuthorize("@ss.hasPermission('pay:merchant:query')")  
91 - public CommonResult<List<PayMerchantRespVO>> getMerchantList(@RequestParam("ids") Collection<Long> ids) {  
92 - List<PayMerchantDO> list = merchantService.getMerchantList(ids);  
93 - return success(PayMerchantConvert.INSTANCE.convertList(list));  
94 - }  
95 -  
96 - @GetMapping("/page")  
97 - @Operation(summary = "获得支付商户信息分页")  
98 - @PreAuthorize("@ss.hasPermission('pay:merchant:query')")  
99 - public CommonResult<PageResult<PayMerchantRespVO>> getMerchantPage(@Valid PayMerchantPageReqVO pageVO) {  
100 - PageResult<PayMerchantDO> pageResult = merchantService.getMerchantPage(pageVO);  
101 - return success(PayMerchantConvert.INSTANCE.convertPage(pageResult));  
102 - }  
103 -  
104 - @GetMapping("/export-excel")  
105 - @Operation(summary = "导出支付商户信息 Excel")  
106 - @PreAuthorize("@ss.hasPermission('pay:merchant:export')")  
107 - @OperateLog(type = EXPORT)  
108 - public void exportMerchantExcel(@Valid PayMerchantExportReqVO exportReqVO,  
109 - HttpServletResponse response) throws IOException {  
110 - List<PayMerchantDO> list = merchantService.getMerchantList(exportReqVO);  
111 - // 导出 Excel  
112 - List<PayMerchantExcelVO> datas = PayMerchantConvert.INSTANCE.convertList02(list);  
113 - ExcelUtils.write(response, "支付商户信息.xls", "数据", PayMerchantExcelVO.class, datas);  
114 - }  
115 -  
116 -}  
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppExcelVO.java deleted
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app;  
2 -  
3 -import com.alibaba.excel.annotation.ExcelProperty;  
4 -import lombok.Data;  
5 -  
6 -import java.time.LocalDateTime;  
7 -  
8 -/**  
9 - * 支付应用信息 Excel VO  
10 - *  
11 - * @author 芋艿  
12 - */  
13 -@Data  
14 -public class PayAppExcelVO {  
15 -  
16 - @ExcelProperty("应用编号")  
17 - private Long id;  
18 -  
19 - @ExcelProperty("应用名")  
20 - private String name;  
21 -  
22 - @ExcelProperty("开启状态")  
23 - private Integer status;  
24 -  
25 - @ExcelProperty("备注")  
26 - private String remark;  
27 -  
28 - @ExcelProperty("支付结果的回调地址")  
29 - private String payNotifyUrl;  
30 -  
31 - @ExcelProperty("退款结果的回调地址")  
32 - private String refundNotifyUrl;  
33 -  
34 - @ExcelProperty("商户编号")  
35 - private Long merchantId;  
36 -  
37 - @ExcelProperty("创建时间")  
38 - private LocalDateTime createTime;  
39 -  
40 -}  
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/app/PayAppExportReqVO.java deleted
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app;  
2 -import io.swagger.v3.oas.annotations.media.Schema;  
3 -import lombok.*;  
4 -  
5 -import java.time.LocalDateTime;  
6 -import org.springframework.format.annotation.DateTimeFormat;  
7 -  
8 -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;  
9 -  
10 -@Schema(description = "管理后台 - 支付应用信息 Excel 导出 Request VO,参数和 PayAppPageReqVO 是一致的")  
11 -@Data  
12 -public class PayAppExportReqVO {  
13 -  
14 - @Schema(description = "应用名")  
15 - private String name;  
16 -  
17 - @Schema(description = "开启状态")  
18 - private Integer status;  
19 -  
20 - @Schema(description = "备注")  
21 - private String remark;  
22 -  
23 - @Schema(description = "支付结果的回调地址")  
24 - private String payNotifyUrl;  
25 -  
26 - @Schema(description = "退款结果的回调地址")  
27 - private String refundNotifyUrl;  
28 -  
29 - @Schema(description = "商户名称")  
30 - private String merchantName;  
31 -  
32 - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)  
33 - @Schema(description = "创建时间")  
34 - private LocalDateTime[] createTime;  
35 -  
36 -}  
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelExcelVO.java deleted
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel;  
2 -  
3 -import lombok.*;  
4 -  
5 -import java.time.LocalDateTime;  
6 -  
7 -import com.alibaba.excel.annotation.ExcelProperty;  
8 -  
9 -/**  
10 - * 支付渠道 Excel VO  
11 - *  
12 - * @author 芋艿  
13 - */  
14 -@Data  
15 -public class PayChannelExcelVO {  
16 -  
17 - @ExcelProperty("商户编号")  
18 - private Long id;  
19 -  
20 - @ExcelProperty("渠道编码")  
21 - private String code;  
22 -  
23 - @ExcelProperty("开启状态")  
24 - private Integer status;  
25 -  
26 - @ExcelProperty("备注")  
27 - private String remark;  
28 -  
29 - @ExcelProperty("渠道费率,单位:百分比")  
30 - private Double feeRate;  
31 -  
32 - @ExcelProperty("商户编号")  
33 - private Long merchantId;  
34 -  
35 - @ExcelProperty("应用编号")  
36 - private Long appId;  
37 -  
38 - /**  
39 - * todo @芋艿 mapStruct 存在转换问题  
40 - * java: Can't map property "PayClientConfig payChannelDO.config" to "String payChannelExcelVO.config".  
41 - * Consider to declare/implement a mapping method: "String map(PayClientConfig value)".  
42 - */  
43 - /// @ExcelProperty("支付渠道配置")  
44 - /// private String config;  
45 -  
46 - @ExcelProperty("创建时间")  
47 - private LocalDateTime createTime;  
48 -  
49 -}  
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/channel/PayChannelExportReqVO.java deleted
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel;  
2 -import io.swagger.v3.oas.annotations.media.Schema;  
3 -import lombok.*;  
4 -  
5 -import java.time.LocalDateTime;  
6 -import org.springframework.format.annotation.DateTimeFormat;  
7 -  
8 -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;  
9 -  
10 -@Schema(description = "管理后台 - 支付渠道 Excel 导出 Request VO,参数和 PayChannelPageReqVO 是一致的")  
11 -@Data  
12 -public class PayChannelExportReqVO {  
13 -  
14 - @Schema(description = "渠道编码")  
15 - private String code;  
16 -  
17 - @Schema(description = "开启状态")  
18 - private Integer status;  
19 -  
20 - @Schema(description = "备注")  
21 - private String remark;  
22 -  
23 - @Schema(description = "渠道费率,单位:百分比")  
24 - private Double feeRate;  
25 -  
26 - @Schema(description = "商户编号")  
27 - private Long merchantId;  
28 -  
29 - @Schema(description = "应用编号")  
30 - private Long appId;  
31 -  
32 - @Schema(description = "支付渠道配置")  
33 - private String config;  
34 -  
35 - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)  
36 - @Schema(description = "创建时间")  
37 - private LocalDateTime[] createTime;  
38 -  
39 -}  
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantBaseVO.java deleted
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant;  
2 -import io.swagger.v3.oas.annotations.media.Schema;  
3 -import lombok.Data;  
4 -  
5 -import javax.validation.constraints.NotNull;  
6 -  
7 -/**  
8 -* 支付商户信息 Base VO,提供给添加、修改、详细的子 VO 使用  
9 -* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成  
10 -*/  
11 -@Data  
12 -public class PayMerchantBaseVO {  
13 -  
14 - @Schema(description = "商户全称", requiredMode = Schema.RequiredMode.REQUIRED)  
15 - @NotNull(message = "商户全称不能为空")  
16 - private String name;  
17 -  
18 - @Schema(description = "商户简称", requiredMode = Schema.RequiredMode.REQUIRED)  
19 - @NotNull(message = "商户简称不能为空")  
20 - private String shortName;  
21 -  
22 - @Schema(description = "开启状态", requiredMode = Schema.RequiredMode.REQUIRED)  
23 - @NotNull(message = "开启状态不能为空")  
24 - private Integer status;  
25 -  
26 - @Schema(description = "备注")  
27 - private String remark;  
28 -  
29 -}  
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantCreateReqVO.java deleted
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant;  
2 -import io.swagger.v3.oas.annotations.media.Schema;  
3 -import lombok.*;  
4 -  
5 -@Schema(description = "管理后台 - 支付商户信息创建 Request VO")  
6 -@Data  
7 -@EqualsAndHashCode(callSuper = true)  
8 -@ToString(callSuper = true)  
9 -public class PayMerchantCreateReqVO extends PayMerchantBaseVO {  
10 -  
11 -}  
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantExcelVO.java deleted
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant;  
2 -  
3 -import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;  
4 -import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;  
5 -import com.alibaba.excel.annotation.ExcelProperty;  
6 -import lombok.Data;  
7 -  
8 -import java.time.LocalDateTime;  
9 -  
10 -/**  
11 - * 支付商户信息 Excel VO  
12 - *  
13 - * @author 芋艿  
14 - */  
15 -@Data  
16 -public class PayMerchantExcelVO {  
17 -  
18 - @ExcelProperty("商户编号")  
19 - private Long id;  
20 -  
21 - @ExcelProperty("商户号")  
22 - private String no;  
23 -  
24 - @ExcelProperty("商户全称")  
25 - private String name;  
26 -  
27 - @ExcelProperty("商户简称")  
28 - private String shortName;  
29 -  
30 - @ExcelProperty(value = "开启状态",converter = DictConvert.class)  
31 - @DictFormat("sys_common_status")  
32 - private Integer status;  
33 -  
34 - @ExcelProperty("备注")  
35 - private String remark;  
36 -  
37 - @ExcelProperty("创建时间")  
38 - private LocalDateTime createTime;  
39 -  
40 -}  
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantExportReqVO.java deleted
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant;  
2 -import io.swagger.v3.oas.annotations.media.Schema;  
3 -import lombok.*;  
4 -  
5 -import java.time.LocalDateTime;  
6 -import org.springframework.format.annotation.DateTimeFormat;  
7 -  
8 -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;  
9 -  
10 -@Schema(description = "管理后台 - 支付商户信息 Excel 导出 Request VO,参数和 PayMerchantPageReqVO 是一致的")  
11 -@Data  
12 -public class PayMerchantExportReqVO {  
13 -  
14 - @Schema(description = "商户号")  
15 - private String no;  
16 -  
17 - @Schema(description = "商户全称")  
18 - private String name;  
19 -  
20 - @Schema(description = "商户简称")  
21 - private String shortName;  
22 -  
23 - @Schema(description = "开启状态")  
24 - private Integer status;  
25 -  
26 - @Schema(description = "备注")  
27 - private String remark;  
28 -  
29 - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)  
30 - @Schema(description = "创建时间")  
31 - private LocalDateTime[] createTime;  
32 -  
33 -}  
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantPageReqVO.java deleted
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant;  
2 -import io.swagger.v3.oas.annotations.media.Schema;  
3 -import lombok.*;  
4 -  
5 -import java.time.LocalDateTime;  
6 -import cn.iocoder.yudao.framework.common.pojo.PageParam;  
7 -import org.springframework.format.annotation.DateTimeFormat;  
8 -  
9 -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;  
10 -  
11 -@Schema(description = "管理后台 - 支付商户信息分页 Request VO")  
12 -@Data  
13 -@EqualsAndHashCode(callSuper = true)  
14 -@ToString(callSuper = true)  
15 -public class PayMerchantPageReqVO extends PageParam {  
16 -  
17 - @Schema(description = "商户号")  
18 - private String no;  
19 -  
20 - @Schema(description = "商户全称")  
21 - private String name;  
22 -  
23 - @Schema(description = "商户简称")  
24 - private String shortName;  
25 -  
26 - @Schema(description = "开启状态")  
27 - private Integer status;  
28 -  
29 - @Schema(description = "备注")  
30 - private String remark;  
31 -  
32 - @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)  
33 - @Schema(description = "创建时间")  
34 - private LocalDateTime[] createTime;  
35 -  
36 -}  
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantRespVO.java deleted
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant;  
2 -  
3 -import io.swagger.v3.oas.annotations.media.Schema;  
4 -import lombok.Data;  
5 -import lombok.EqualsAndHashCode;  
6 -import lombok.ToString;  
7 -  
8 -import java.time.LocalDateTime;  
9 -  
10 -@Schema(description = "管理后台 - 支付商户信息 Response VO")  
11 -@Data  
12 -@EqualsAndHashCode(callSuper = true)  
13 -@ToString(callSuper = true)  
14 -public class PayMerchantRespVO extends PayMerchantBaseVO {  
15 -  
16 - @Schema(description = "商户编号", requiredMode = Schema.RequiredMode.REQUIRED)  
17 - private Long id;  
18 -  
19 - @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)  
20 - private LocalDateTime createTime;  
21 -  
22 - @Schema(description = "商户号", requiredMode = Schema.RequiredMode.REQUIRED, example = "M233666999")  
23 - private String no;  
24 -  
25 -}  
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateReqVO.java deleted
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant;  
2 -import io.swagger.v3.oas.annotations.media.Schema;  
3 -import lombok.*;  
4 -import javax.validation.constraints.*;  
5 -  
6 -@Schema(description = "管理后台 - 支付商户信息更新 Request VO")  
7 -@Data  
8 -@EqualsAndHashCode(callSuper = true)  
9 -@ToString(callSuper = true)  
10 -public class PayMerchantUpdateReqVO extends PayMerchantBaseVO {  
11 -  
12 - @Schema(description = "商户编号", requiredMode = Schema.RequiredMode.REQUIRED)  
13 - @NotNull(message = "商户编号不能为空")  
14 - private Long id;  
15 -  
16 -}  
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/merchant/vo/merchant/PayMerchantUpdateStatusReqVO.java deleted
1 -package cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant;  
2 -  
3 -import io.swagger.v3.oas.annotations.media.Schema;  
4 -import lombok.Data;  
5 -  
6 -import javax.validation.constraints.NotNull;  
7 -  
8 -@Schema(description = "管理后台 - 商户更新状态 Request VO")  
9 -@Data  
10 -public class PayMerchantUpdateStatusReqVO {  
11 -  
12 - @Schema(description = "商户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")  
13 - @NotNull(message = "商户编号不能为空")  
14 - private Long id;  
15 -  
16 - @Schema(description = "状态,见 SysCommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")  
17 - @NotNull(message = "状态不能为空")  
18 - private Integer status;  
19 -  
20 -}  
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; @@ -10,12 +10,10 @@ import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
10 import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum; 10 import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum;
11 import cn.iocoder.yudao.module.pay.controller.admin.order.vo.*; 11 import cn.iocoder.yudao.module.pay.controller.admin.order.vo.*;
12 import cn.iocoder.yudao.module.pay.convert.order.PayOrderConvert; 12 import cn.iocoder.yudao.module.pay.convert.order.PayOrderConvert;
13 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO;  
14 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; 13 +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO;
15 import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; 14 import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO;
16 import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO; 15 import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO;
17 -import cn.iocoder.yudao.module.pay.service.merchant.PayAppService;  
18 -import cn.iocoder.yudao.module.pay.service.merchant.PayMerchantService; 16 +import cn.iocoder.yudao.module.pay.service.app.PayAppService;
19 import cn.iocoder.yudao.module.pay.service.order.PayOrderExtensionService; 17 import cn.iocoder.yudao.module.pay.service.order.PayOrderExtensionService;
20 import cn.iocoder.yudao.module.pay.service.order.PayOrderService; 18 import cn.iocoder.yudao.module.pay.service.order.PayOrderService;
21 import io.swagger.v3.oas.annotations.Operation; 19 import io.swagger.v3.oas.annotations.Operation;
@@ -48,8 +46,6 @@ public class PayOrderController { @@ -48,8 +46,6 @@ public class PayOrderController {
48 @Resource 46 @Resource
49 private PayOrderExtensionService orderExtensionService; 47 private PayOrderExtensionService orderExtensionService;
50 @Resource 48 @Resource
51 - private PayMerchantService merchantService;  
52 - @Resource  
53 private PayAppService appService; 49 private PayAppService appService;
54 50
55 @GetMapping("/get") 51 @GetMapping("/get")
@@ -71,13 +67,11 @@ public class PayOrderController { @@ -71,13 +67,11 @@ public class PayOrderController {
71 return success(new PayOrderDetailsRespVO()); 67 return success(new PayOrderDetailsRespVO());
72 } 68 }
73 69
74 - PayMerchantDO merchantDO = merchantService.getMerchant(order.getMerchantId());  
75 PayAppDO appDO = appService.getApp(order.getAppId()); 70 PayAppDO appDO = appService.getApp(order.getAppId());
76 PayChannelEnum channelEnum = PayChannelEnum.getByCode(order.getChannelCode()); 71 PayChannelEnum channelEnum = PayChannelEnum.getByCode(order.getChannelCode());
77 72
78 // TODO @aquan:文案,都是前端 format; 73 // TODO @aquan:文案,都是前端 format;
79 PayOrderDetailsRespVO respVO = PayOrderConvert.INSTANCE.orderDetailConvert(order); 74 PayOrderDetailsRespVO respVO = PayOrderConvert.INSTANCE.orderDetailConvert(order);
80 - respVO.setMerchantName(ObjectUtil.isNotNull(merchantDO) ? merchantDO.getName() : "未知商户");  
81 respVO.setAppName(ObjectUtil.isNotNull(appDO) ? appDO.getName() : "未知应用"); 75 respVO.setAppName(ObjectUtil.isNotNull(appDO) ? appDO.getName() : "未知应用");
82 respVO.setChannelCodeName(ObjectUtil.isNotNull(channelEnum) ? channelEnum.getName() : "未知渠道"); 76 respVO.setChannelCodeName(ObjectUtil.isNotNull(channelEnum) ? channelEnum.getName() : "未知渠道");
83 77
@@ -105,21 +99,16 @@ public class PayOrderController { @@ -105,21 +99,16 @@ public class PayOrderController {
105 return success(new PageResult<>(pageResult.getTotal())); 99 return success(new PageResult<>(pageResult.getTotal()));
106 } 100 }
107 101
108 - // 处理商户ID数据  
109 - Map<Long, PayMerchantDO> merchantMap = merchantService.getMerchantMap(  
110 - CollectionUtils.convertList(pageResult.getList(), PayOrderDO::getMerchantId));  
111 // 处理应用ID数据 102 // 处理应用ID数据
112 Map<Long, PayAppDO> appMap = appService.getAppMap( 103 Map<Long, PayAppDO> appMap = appService.getAppMap(
113 CollectionUtils.convertList(pageResult.getList(), PayOrderDO::getAppId)); 104 CollectionUtils.convertList(pageResult.getList(), PayOrderDO::getAppId));
114 105
115 List<PayOrderPageItemRespVO> pageList = new ArrayList<>(pageResult.getList().size()); 106 List<PayOrderPageItemRespVO> pageList = new ArrayList<>(pageResult.getList().size());
116 pageResult.getList().forEach(c -> { 107 pageResult.getList().forEach(c -> {
117 - PayMerchantDO merchantDO = merchantMap.get(c.getMerchantId());  
118 PayAppDO appDO = appMap.get(c.getAppId()); 108 PayAppDO appDO = appMap.get(c.getAppId());
119 PayChannelEnum channelEnum = PayChannelEnum.getByCode(c.getChannelCode()); 109 PayChannelEnum channelEnum = PayChannelEnum.getByCode(c.getChannelCode());
120 110
121 PayOrderPageItemRespVO orderItem = PayOrderConvert.INSTANCE.pageConvertItemPage(c); 111 PayOrderPageItemRespVO orderItem = PayOrderConvert.INSTANCE.pageConvertItemPage(c);
122 - orderItem.setMerchantName(ObjectUtil.isNotNull(merchantDO) ? merchantDO.getName() : "未知商户");  
123 orderItem.setAppName(ObjectUtil.isNotNull(appDO) ? appDO.getName() : "未知应用"); 112 orderItem.setAppName(ObjectUtil.isNotNull(appDO) ? appDO.getName() : "未知应用");
124 orderItem.setChannelCodeName(ObjectUtil.isNotNull(channelEnum) ? channelEnum.getName() : "未知渠道"); 113 orderItem.setChannelCodeName(ObjectUtil.isNotNull(channelEnum) ? channelEnum.getName() : "未知渠道");
125 pageList.add(orderItem); 114 pageList.add(orderItem);
@@ -133,16 +122,12 @@ public class PayOrderController { @@ -133,16 +122,12 @@ public class PayOrderController {
133 @OperateLog(type = EXPORT) 122 @OperateLog(type = EXPORT)
134 public void exportOrderExcel(@Valid PayOrderExportReqVO exportReqVO, 123 public void exportOrderExcel(@Valid PayOrderExportReqVO exportReqVO,
135 HttpServletResponse response) throws IOException { 124 HttpServletResponse response) throws IOException {
136 -  
137 List<PayOrderDO> list = payOrderService.getOrderList(exportReqVO); 125 List<PayOrderDO> list = payOrderService.getOrderList(exportReqVO);
138 if (CollectionUtil.isEmpty(list)) { 126 if (CollectionUtil.isEmpty(list)) {
139 ExcelUtils.write(response, "支付订单.xls", "数据", 127 ExcelUtils.write(response, "支付订单.xls", "数据",
140 PayOrderExcelVO.class, new ArrayList<>()); 128 PayOrderExcelVO.class, new ArrayList<>());
141 } 129 }
142 130
143 - // 处理商户ID数据  
144 - Map<Long, PayMerchantDO> merchantMap = merchantService.getMerchantMap(  
145 - CollectionUtils.convertList(list, PayOrderDO::getMerchantId));  
146 // 处理应用ID数据 131 // 处理应用ID数据
147 Map<Long, PayAppDO> appMap = appService.getAppMap( 132 Map<Long, PayAppDO> appMap = appService.getAppMap(
148 CollectionUtils.convertList(list, PayOrderDO::getAppId)); 133 CollectionUtils.convertList(list, PayOrderDO::getAppId));
@@ -152,13 +137,11 @@ public class PayOrderController { @@ -152,13 +137,11 @@ public class PayOrderController {
152 137
153 List<PayOrderExcelVO> excelDatum = new ArrayList<>(list.size()); 138 List<PayOrderExcelVO> excelDatum = new ArrayList<>(list.size());
154 list.forEach(c -> { 139 list.forEach(c -> {
155 - PayMerchantDO merchantDO = merchantMap.get(c.getMerchantId());  
156 PayAppDO appDO = appMap.get(c.getAppId()); 140 PayAppDO appDO = appMap.get(c.getAppId());
157 PayChannelEnum channelEnum = PayChannelEnum.getByCode(c.getChannelCode()); 141 PayChannelEnum channelEnum = PayChannelEnum.getByCode(c.getChannelCode());
158 PayOrderExtensionDO orderExtensionDO = orderExtensionMap.get(c.getSuccessExtensionId()); 142 PayOrderExtensionDO orderExtensionDO = orderExtensionMap.get(c.getSuccessExtensionId());
159 143
160 PayOrderExcelVO excelItem = PayOrderConvert.INSTANCE.excelConvert(c); 144 PayOrderExcelVO excelItem = PayOrderConvert.INSTANCE.excelConvert(c);
161 - excelItem.setMerchantName(ObjectUtil.isNotNull(merchantDO) ? merchantDO.getName() : "未知商户");  
162 excelItem.setAppName(ObjectUtil.isNotNull(appDO) ? appDO.getName() : "未知应用"); 145 excelItem.setAppName(ObjectUtil.isNotNull(appDO) ? appDO.getName() : "未知应用");
163 excelItem.setChannelCodeName(ObjectUtil.isNotNull(channelEnum) ? channelEnum.getName() : "未知渠道"); 146 excelItem.setChannelCodeName(ObjectUtil.isNotNull(channelEnum) ? channelEnum.getName() : "未知渠道");
164 excelItem.setNo(ObjectUtil.isNotNull(orderExtensionDO) ? orderExtensionDO.getNo() : ""); 147 excelItem.setNo(ObjectUtil.isNotNull(orderExtensionDO) ? orderExtensionDO.getNo() : "");
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_ @@ -17,10 +17,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
17 @Data 17 @Data
18 public class PayOrderBaseVO { 18 public class PayOrderBaseVO {
19 19
20 - @Schema(description = "商户编号", requiredMode = Schema.RequiredMode.REQUIRED)  
21 - @NotNull(message = "商户编号不能为空")  
22 - private Long merchantId;  
23 -  
24 @Schema(description = "应用编号", requiredMode = Schema.RequiredMode.REQUIRED) 20 @Schema(description = "应用编号", requiredMode = Schema.RequiredMode.REQUIRED)
25 @NotNull(message = "应用编号不能为空") 21 @NotNull(message = "应用编号不能为空")
26 private Long appId; 22 private Long appId;
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 { @@ -16,9 +16,6 @@ public class PayOrderDetailsRespVO extends PayOrderBaseVO {
16 @Schema(description = "支付订单编号") 16 @Schema(description = "支付订单编号")
17 private Long id; 17 private Long id;
18 18
19 - @Schema(description = "商户名称")  
20 - private String merchantName;  
21 -  
22 @Schema(description = "应用名称") 19 @Schema(description = "应用名称")
23 private String appName; 20 private String appName;
24 21
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 { @@ -19,9 +19,6 @@ public class PayOrderExcelVO {
19 @ExcelProperty("支付订单编号") 19 @ExcelProperty("支付订单编号")
20 private Long id; 20 private Long id;
21 21
22 - @ExcelProperty(value = "商户名称")  
23 - private String merchantName;  
24 -  
25 @ExcelProperty(value = "应用名称") 22 @ExcelProperty(value = "应用名称")
26 private String appName; 23 private String appName;
27 24
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_ @@ -12,9 +12,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
12 @Data 12 @Data
13 public class PayOrderExportReqVO { 13 public class PayOrderExportReqVO {
14 14
15 - @Schema(description = "商户编号")  
16 - private Long merchantId;  
17 -  
18 @Schema(description = "应用编号") 15 @Schema(description = "应用编号")
19 private Long appId; 16 private Long appId;
20 17
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 { @@ -19,9 +19,6 @@ public class PayOrderPageItemRespVO extends PayOrderBaseVO {
19 @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) 19 @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
20 private LocalDateTime createTime; 20 private LocalDateTime createTime;
21 21
22 - @Schema(description = "商户名称")  
23 - private String merchantName;  
24 -  
25 @Schema(description = "应用名称") 22 @Schema(description = "应用名称")
26 private String appName; 23 private String appName;
27 24
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_ @@ -17,9 +17,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
17 @ToString(callSuper = true) 17 @ToString(callSuper = true)
18 public class PayOrderPageReqVO extends PageParam { 18 public class PayOrderPageReqVO extends PageParam {
19 19
20 - @Schema(description = "商户编号")  
21 - private Long merchantId;  
22 -  
23 @Schema(description = "应用编号") 20 @Schema(description = "应用编号")
24 private Long appId; 21 private Long appId;
25 22
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; @@ -4,12 +4,10 @@ import cn.hutool.core.collection.CollectionUtil;
4 import cn.hutool.core.util.ObjectUtil; 4 import cn.hutool.core.util.ObjectUtil;
5 import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.*; 5 import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.*;
6 import cn.iocoder.yudao.module.pay.convert.refund.PayRefundConvert; 6 import cn.iocoder.yudao.module.pay.convert.refund.PayRefundConvert;
7 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO;  
8 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; 7 +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO;
9 import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; 8 import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO;
10 import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; 9 import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO;
11 -import cn.iocoder.yudao.module.pay.service.merchant.PayAppService;  
12 -import cn.iocoder.yudao.module.pay.service.merchant.PayMerchantService; 10 +import cn.iocoder.yudao.module.pay.service.app.PayAppService;
13 import cn.iocoder.yudao.module.pay.service.order.PayOrderService; 11 import cn.iocoder.yudao.module.pay.service.order.PayOrderService;
14 import cn.iocoder.yudao.module.pay.service.refund.PayRefundService; 12 import cn.iocoder.yudao.module.pay.service.refund.PayRefundService;
15 import cn.iocoder.yudao.framework.common.pojo.CommonResult; 13 import cn.iocoder.yudao.framework.common.pojo.CommonResult;
@@ -48,8 +46,6 @@ public class PayRefundController { @@ -48,8 +46,6 @@ public class PayRefundController {
48 @Resource 46 @Resource
49 private PayRefundService refundService; 47 private PayRefundService refundService;
50 @Resource 48 @Resource
51 - private PayMerchantService merchantService;  
52 - @Resource  
53 private PayAppService appService; 49 private PayAppService appService;
54 @Resource 50 @Resource
55 private PayOrderService orderService; 51 private PayOrderService orderService;
@@ -64,13 +60,11 @@ public class PayRefundController { @@ -64,13 +60,11 @@ public class PayRefundController {
64 return success(new PayRefundDetailsRespVO()); 60 return success(new PayRefundDetailsRespVO());
65 } 61 }
66 62
67 - PayMerchantDO merchantDO = merchantService.getMerchant(refund.getMerchantId());  
68 PayAppDO appDO = appService.getApp(refund.getAppId()); 63 PayAppDO appDO = appService.getApp(refund.getAppId());
69 PayChannelEnum channelEnum = PayChannelEnum.getByCode(refund.getChannelCode()); 64 PayChannelEnum channelEnum = PayChannelEnum.getByCode(refund.getChannelCode());
70 PayOrderDO orderDO = orderService.getOrder(refund.getOrderId()); 65 PayOrderDO orderDO = orderService.getOrder(refund.getOrderId());
71 66
72 PayRefundDetailsRespVO refundDetail = PayRefundConvert.INSTANCE.refundDetailConvert(refund); 67 PayRefundDetailsRespVO refundDetail = PayRefundConvert.INSTANCE.refundDetailConvert(refund);
73 - refundDetail.setMerchantName(ObjectUtil.isNotNull(merchantDO) ? merchantDO.getName() : "未知商户");  
74 refundDetail.setAppName(ObjectUtil.isNotNull(appDO) ? appDO.getName() : "未知应用"); 68 refundDetail.setAppName(ObjectUtil.isNotNull(appDO) ? appDO.getName() : "未知应用");
75 refundDetail.setChannelCodeName(ObjectUtil.isNotNull(channelEnum) ? channelEnum.getName() : "未知渠道"); 69 refundDetail.setChannelCodeName(ObjectUtil.isNotNull(channelEnum) ? channelEnum.getName() : "未知渠道");
76 refundDetail.setSubject(orderDO.getSubject()); 70 refundDetail.setSubject(orderDO.getSubject());
@@ -87,21 +81,16 @@ public class PayRefundController { @@ -87,21 +81,16 @@ public class PayRefundController {
87 return success(new PageResult<>(pageResult.getTotal())); 81 return success(new PageResult<>(pageResult.getTotal()));
88 } 82 }
89 83
90 - // 处理商户ID数据  
91 - Map<Long, PayMerchantDO> merchantMap = merchantService.getMerchantMap(  
92 - CollectionUtils.convertList(pageResult.getList(), PayRefundDO::getMerchantId));  
93 // 处理应用ID数据 84 // 处理应用ID数据
94 Map<Long, PayAppDO> appMap = appService.getAppMap( 85 Map<Long, PayAppDO> appMap = appService.getAppMap(
95 CollectionUtils.convertList(pageResult.getList(), PayRefundDO::getAppId)); 86 CollectionUtils.convertList(pageResult.getList(), PayRefundDO::getAppId));
96 List<PayRefundPageItemRespVO> list = new ArrayList<>(pageResult.getList().size()); 87 List<PayRefundPageItemRespVO> list = new ArrayList<>(pageResult.getList().size());
97 pageResult.getList().forEach(c -> { 88 pageResult.getList().forEach(c -> {
98 - PayMerchantDO merchantDO = merchantMap.get(c.getMerchantId());  
99 PayAppDO appDO = appMap.get(c.getAppId()); 89 PayAppDO appDO = appMap.get(c.getAppId());
100 PayChannelEnum channelEnum = PayChannelEnum.getByCode(c.getChannelCode()); 90 PayChannelEnum channelEnum = PayChannelEnum.getByCode(c.getChannelCode());
101 91
102 PayRefundPageItemRespVO item = PayRefundConvert.INSTANCE.pageItemConvert(c); 92 PayRefundPageItemRespVO item = PayRefundConvert.INSTANCE.pageItemConvert(c);
103 93
104 - item.setMerchantName(ObjectUtil.isNotNull(merchantDO) ? merchantDO.getName() : "未知商户");  
105 item.setAppName(ObjectUtil.isNotNull(appDO) ? appDO.getName() : "未知应用"); 94 item.setAppName(ObjectUtil.isNotNull(appDO) ? appDO.getName() : "未知应用");
106 item.setChannelCodeName(ObjectUtil.isNotNull(channelEnum) ? channelEnum.getName() : "未知渠道"); 95 item.setChannelCodeName(ObjectUtil.isNotNull(channelEnum) ? channelEnum.getName() : "未知渠道");
107 list.add(item); 96 list.add(item);
@@ -123,9 +112,6 @@ public class PayRefundController { @@ -123,9 +112,6 @@ public class PayRefundController {
123 PayRefundExcelVO.class, new ArrayList<>()); 112 PayRefundExcelVO.class, new ArrayList<>());
124 } 113 }
125 114
126 - // 处理商户ID数据  
127 - Map<Long, PayMerchantDO> merchantMap = merchantService.getMerchantMap(  
128 - CollectionUtils.convertList(list, PayRefundDO::getMerchantId));  
129 // 处理应用ID数据 115 // 处理应用ID数据
130 Map<Long, PayAppDO> appMap = appService.getAppMap( 116 Map<Long, PayAppDO> appMap = appService.getAppMap(
131 CollectionUtils.convertList(list, PayRefundDO::getAppId)); 117 CollectionUtils.convertList(list, PayRefundDO::getAppId));
@@ -136,12 +122,10 @@ public class PayRefundController { @@ -136,12 +122,10 @@ public class PayRefundController {
136 CollectionUtils.convertList(list, PayRefundDO::getOrderId)); 122 CollectionUtils.convertList(list, PayRefundDO::getOrderId));
137 123
138 list.forEach(c -> { 124 list.forEach(c -> {
139 - PayMerchantDO merchantDO = merchantMap.get(c.getMerchantId());  
140 PayAppDO appDO = appMap.get(c.getAppId()); 125 PayAppDO appDO = appMap.get(c.getAppId());
141 PayChannelEnum channelEnum = PayChannelEnum.getByCode(c.getChannelCode()); 126 PayChannelEnum channelEnum = PayChannelEnum.getByCode(c.getChannelCode());
142 127
143 PayRefundExcelVO excelItem = PayRefundConvert.INSTANCE.excelConvert(c); 128 PayRefundExcelVO excelItem = PayRefundConvert.INSTANCE.excelConvert(c);
144 - excelItem.setMerchantName(ObjectUtil.isNotNull(merchantDO) ? merchantDO.getName() : "未知商户");  
145 excelItem.setAppName(ObjectUtil.isNotNull(appDO) ? appDO.getName() : "未知应用"); 129 excelItem.setAppName(ObjectUtil.isNotNull(appDO) ? appDO.getName() : "未知应用");
146 excelItem.setChannelCodeName(ObjectUtil.isNotNull(channelEnum) ? channelEnum.getName() : "未知渠道"); 130 excelItem.setChannelCodeName(ObjectUtil.isNotNull(channelEnum) ? channelEnum.getName() : "未知渠道");
147 excelItem.setSubject(orderMap.get(c.getOrderId()).getSubject()); 131 excelItem.setSubject(orderMap.get(c.getOrderId()).getSubject());
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_ @@ -15,10 +15,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
15 @Data 15 @Data
16 public class PayRefundBaseVO { 16 public class PayRefundBaseVO {
17 17
18 - @Schema(description = "商户编号", requiredMode = Schema.RequiredMode.REQUIRED)  
19 - @NotNull(message = "商户编号不能为空")  
20 - private Long merchantId;  
21 -  
22 @Schema(description = "应用编号", requiredMode = Schema.RequiredMode.REQUIRED) 18 @Schema(description = "应用编号", requiredMode = Schema.RequiredMode.REQUIRED)
23 @NotNull(message = "应用编号不能为空") 19 @NotNull(message = "应用编号不能为空")
24 private Long appId; 20 private Long appId;
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 { @@ -17,9 +17,6 @@ public class PayRefundDetailsRespVO extends PayRefundBaseVO {
17 @Schema(description = "支付退款编号", requiredMode = Schema.RequiredMode.REQUIRED) 17 @Schema(description = "支付退款编号", requiredMode = Schema.RequiredMode.REQUIRED)
18 private Long id; 18 private Long id;
19 19
20 - @Schema(description = "商户名称")  
21 - private String merchantName;  
22 -  
23 @Schema(description = "应用名称") 20 @Schema(description = "应用名称")
24 private String appName; 21 private String appName;
25 22
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 { @@ -22,9 +22,6 @@ public class PayRefundExcelVO {
22 @ExcelProperty("商品名称") 22 @ExcelProperty("商品名称")
23 private String subject; 23 private String subject;
24 24
25 - @ExcelProperty(value = "商户名称")  
26 - private String merchantName;  
27 -  
28 @ExcelProperty(value = "应用名称") 25 @ExcelProperty(value = "应用名称")
29 private String appName; 26 private String appName;
30 27
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_ @@ -12,9 +12,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
12 @Data 12 @Data
13 public class PayRefundExportReqVO { 13 public class PayRefundExportReqVO {
14 14
15 - @Schema(description = "商户编号")  
16 - private Long merchantId;  
17 -  
18 @Schema(description = "应用编号") 15 @Schema(description = "应用编号")
19 private Long appId; 16 private Long appId;
20 17
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 { @@ -16,9 +16,6 @@ public class PayRefundPageItemRespVO extends PayRefundBaseVO {
16 @Schema(description = "支付订单编号", requiredMode = Schema.RequiredMode.REQUIRED) 16 @Schema(description = "支付订单编号", requiredMode = Schema.RequiredMode.REQUIRED)
17 private Long id; 17 private Long id;
18 18
19 - @Schema(description = "商户名称")  
20 - private String merchantName;  
21 -  
22 @Schema(description = "应用名称") 19 @Schema(description = "应用名称")
23 private String appName; 20 private String appName;
24 21
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_ @@ -17,9 +17,6 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
17 @ToString(callSuper = true) 17 @ToString(callSuper = true)
18 public class PayRefundPageReqVO extends PageParam { 18 public class PayRefundPageReqVO extends PageParam {
19 19
20 - @Schema(description = "商户编号")  
21 - private Long merchantId;  
22 -  
23 @Schema(description = "应用编号") 20 @Schema(description = "应用编号")
24 private Long appId; 21 private Long appId;
25 22
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/app/channel/AppPayChannelController.java
1 package cn.iocoder.yudao.module.pay.controller.app.channel; 1 package cn.iocoder.yudao.module.pay.controller.app.channel;
2 2
3 import cn.iocoder.yudao.framework.common.pojo.CommonResult; 3 import cn.iocoder.yudao.framework.common.pojo.CommonResult;
4 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO;  
5 -import cn.iocoder.yudao.module.pay.service.merchant.PayChannelService; 4 +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO;
  5 +import cn.iocoder.yudao.module.pay.service.channel.PayChannelService;
6 import io.swagger.v3.oas.annotations.Operation; 6 import io.swagger.v3.oas.annotations.Operation;
7 import io.swagger.v3.oas.annotations.Parameter; 7 import io.swagger.v3.oas.annotations.Parameter;
8 import io.swagger.v3.oas.annotations.tags.Tag; 8 import io.swagger.v3.oas.annotations.tags.Tag;
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/app/PayAppConvert.java
1 package cn.iocoder.yudao.module.pay.convert.app; 1 package cn.iocoder.yudao.module.pay.convert.app;
2 2
3 -import java.util.*;  
4 -  
5 import cn.iocoder.yudao.framework.common.pojo.PageResult; 3 import cn.iocoder.yudao.framework.common.pojo.PageResult;
6 -  
7 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.*;  
8 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO;  
9 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; 4 +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppCreateReqVO;
  5 +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppPageItemRespVO;
  6 +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppRespVO;
  7 +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppUpdateReqVO;
  8 +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO;
10 import org.mapstruct.Mapper; 9 import org.mapstruct.Mapper;
11 import org.mapstruct.factory.Mappers; 10 import org.mapstruct.factory.Mappers;
12 11
  12 +import java.util.List;
  13 +
13 /** 14 /**
14 * 支付应用信息 Convert 15 * 支付应用信息 Convert
15 * 16 *
@@ -22,8 +23,6 @@ public interface PayAppConvert { @@ -22,8 +23,6 @@ public interface PayAppConvert {
22 23
23 PayAppPageItemRespVO pageConvert (PayAppDO bean); 24 PayAppPageItemRespVO pageConvert (PayAppDO bean);
24 25
25 - PayAppPageItemRespVO.PayMerchant convert(PayMerchantDO bean);  
26 -  
27 PayAppDO convert(PayAppCreateReqVO bean); 26 PayAppDO convert(PayAppCreateReqVO bean);
28 27
29 PayAppDO convert(PayAppUpdateReqVO bean); 28 PayAppDO convert(PayAppUpdateReqVO bean);
@@ -34,6 +33,4 @@ public interface PayAppConvert { @@ -34,6 +33,4 @@ public interface PayAppConvert {
34 33
35 PageResult<PayAppRespVO> convertPage(PageResult<PayAppDO> page); 34 PageResult<PayAppRespVO> convertPage(PageResult<PayAppDO> page);
36 35
37 - List<PayAppExcelVO> convertList02(List<PayAppDO> list);  
38 -  
39 } 36 }
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/channel/PayChannelConvert.java
1 package cn.iocoder.yudao.module.pay.convert.channel; 1 package cn.iocoder.yudao.module.pay.convert.channel;
2 2
3 -import java.util.*;  
4 -  
5 import cn.iocoder.yudao.framework.common.pojo.PageResult; 3 import cn.iocoder.yudao.framework.common.pojo.PageResult;
6 -  
7 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelCreateReqVO;  
8 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelExcelVO;  
9 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelRespVO;  
10 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelUpdateReqVO;  
11 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; 4 +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelCreateReqVO;
  5 +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelRespVO;
  6 +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelUpdateReqVO;
  7 +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO;
12 import org.mapstruct.Mapper; 8 import org.mapstruct.Mapper;
13 import org.mapstruct.Mapping; 9 import org.mapstruct.Mapping;
14 import org.mapstruct.factory.Mappers; 10 import org.mapstruct.factory.Mappers;
@@ -27,12 +23,6 @@ public interface PayChannelConvert { @@ -27,12 +23,6 @@ public interface PayChannelConvert {
27 @Mapping(target = "config",expression = "java(cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString(bean.getConfig()))") 23 @Mapping(target = "config",expression = "java(cn.iocoder.yudao.framework.common.util.json.JsonUtils.toJsonString(bean.getConfig()))")
28 PayChannelRespVO convert(PayChannelDO bean); 24 PayChannelRespVO convert(PayChannelDO bean);
29 25
30 - List<PayChannelRespVO> convertList(List<PayChannelDO> list);  
31 -  
32 PageResult<PayChannelRespVO> convertPage(PageResult<PayChannelDO> page); 26 PageResult<PayChannelRespVO> convertPage(PageResult<PayChannelDO> page);
33 27
34 - List<PayChannelExcelVO> convertList02(List<PayChannelDO> list);  
35 -  
36 -  
37 -  
38 } 28 }
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/merchant/PayMerchantConvert.java deleted
1 -package cn.iocoder.yudao.module.pay.convert.merchant;  
2 -  
3 -import java.util.*;  
4 -  
5 -import cn.iocoder.yudao.framework.common.pojo.PageResult;  
6 -  
7 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantCreateReqVO;  
8 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantExcelVO;  
9 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantRespVO;  
10 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantUpdateReqVO;  
11 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO;  
12 -import org.mapstruct.Mapper;  
13 -import org.mapstruct.factory.Mappers;  
14 -  
15 -@Mapper  
16 -public interface PayMerchantConvert {  
17 -  
18 - PayMerchantConvert INSTANCE = Mappers.getMapper(PayMerchantConvert.class);  
19 -  
20 - PayMerchantDO convert(PayMerchantCreateReqVO bean);  
21 -  
22 - PayMerchantDO convert(PayMerchantUpdateReqVO bean);  
23 -  
24 - PayMerchantRespVO convert(PayMerchantDO bean);  
25 -  
26 - List<PayMerchantRespVO> convertList(List<PayMerchantDO> list);  
27 -  
28 - PageResult<PayMerchantRespVO> convertPage(PageResult<PayMerchantDO> page);  
29 -  
30 - List<PayMerchantExcelVO> convertList02(List<PayMerchantDO> list);  
31 -  
32 -}  
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/merchant/PayAppDO.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/app/PayAppDO.java
1 -package cn.iocoder.yudao.module.pay.dal.dataobject.merchant; 1 +package cn.iocoder.yudao.module.pay.dal.dataobject.app;
2 2
3 import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; 3 import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
4 import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; 4 import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
@@ -54,11 +54,4 @@ public class PayAppDO extends BaseDO { @@ -54,11 +54,4 @@ public class PayAppDO extends BaseDO {
54 */ 54 */
55 private String refundNotifyUrl; 55 private String refundNotifyUrl;
56 56
57 - /**  
58 - * 商户编号  
59 - *  
60 - * 关联 {@link PayMerchantDO#getId()}  
61 - */  
62 - private Long merchantId;  
63 -  
64 } 57 }
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/merchant/PayChannelDO.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/channel/PayChannelDO.java
1 -package cn.iocoder.yudao.module.pay.dal.dataobject.merchant; 1 +package cn.iocoder.yudao.module.pay.dal.dataobject.channel;
2 2
3 import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; 3 import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
4 import cn.iocoder.yudao.framework.pay.core.client.PayClientConfig; 4 import cn.iocoder.yudao.framework.pay.core.client.PayClientConfig;
5 import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum; 5 import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum;
6 import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO; 6 import cn.iocoder.yudao.framework.tenant.core.db.TenantBaseDO;
  7 +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO;
7 import com.baomidou.mybatisplus.annotation.KeySequence; 8 import com.baomidou.mybatisplus.annotation.KeySequence;
8 import com.baomidou.mybatisplus.annotation.TableField; 9 import com.baomidou.mybatisplus.annotation.TableField;
9 import com.baomidou.mybatisplus.annotation.TableName; 10 import com.baomidou.mybatisplus.annotation.TableName;
@@ -54,12 +55,6 @@ public class PayChannelDO extends TenantBaseDO { @@ -54,12 +55,6 @@ public class PayChannelDO extends TenantBaseDO {
54 private String remark; 55 private String remark;
55 56
56 /** 57 /**
57 - * 商户编号  
58 - *  
59 - * 关联 {@link PayMerchantDO#getId()}  
60 - */  
61 - private Long merchantId;  
62 - /**  
63 * 应用编号 58 * 应用编号
64 * 59 *
65 * 关联 {@link PayAppDO#getId()} 60 * 关联 {@link PayAppDO#getId()}
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/merchant/PayMerchantDO.java deleted
1 -package cn.iocoder.yudao.module.pay.dal.dataobject.merchant;  
2 -  
3 -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;  
4 -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;  
5 -import com.baomidou.mybatisplus.annotation.*;  
6 -import lombok.*;  
7 -  
8 -/**  
9 - * 支付商户信息 DO  
10 - * 目前暂时没有特别的用途,主要为未来多商户提供基础。  
11 - *  
12 - * @author 芋道源码  
13 - */  
14 -@TableName("pay_merchant")  
15 -@KeySequence("pay_merchant_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。  
16 -@Data  
17 -@EqualsAndHashCode(callSuper = true)  
18 -@ToString(callSuper = true)  
19 -@Builder  
20 -@NoArgsConstructor  
21 -@AllArgsConstructor  
22 -public class PayMerchantDO extends BaseDO {  
23 -  
24 - /**  
25 - * 商户编号,数据库自增  
26 - */  
27 - @TableId  
28 - private Long id;  
29 - /**  
30 - * 商户号  
31 - * 例如说,M233666999  
32 - * 只有新增时插入,不允许修改  
33 - */  
34 - private String no;  
35 - /**  
36 - * 商户全称  
37 - */  
38 - private String name;  
39 - /**  
40 - * 商户简称  
41 - */  
42 - private String shortName;  
43 - /**  
44 - * 状态  
45 - *  
46 - * 枚举 {@link CommonStatusEnum}  
47 - */  
48 - private Integer status;  
49 - /**  
50 - * 备注  
51 - */  
52 - private String remark;  
53 -  
54 -}  
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/notify/PayNotifyTaskDO.java
1 package cn.iocoder.yudao.module.pay.dal.dataobject.notify; 1 package cn.iocoder.yudao.module.pay.dal.dataobject.notify;
2 2
3 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO;  
4 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; 3 +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
  4 +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO;
5 import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; 5 import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO;
6 import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; 6 import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO;
7 import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyStatusEnum; 7 import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyStatusEnum;
8 import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyTypeEnum; 8 import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyTypeEnum;
9 -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;  
10 import com.baomidou.mybatisplus.annotation.KeySequence; 9 import com.baomidou.mybatisplus.annotation.KeySequence;
11 import com.baomidou.mybatisplus.annotation.TableName; 10 import com.baomidou.mybatisplus.annotation.TableName;
12 import lombok.Data; 11 import lombok.Data;
@@ -43,12 +42,6 @@ public class PayNotifyTaskDO extends BaseDO { @@ -43,12 +42,6 @@ public class PayNotifyTaskDO extends BaseDO {
43 */ 42 */
44 private Long id; 43 private Long id;
45 /** 44 /**
46 - * 商户编号  
47 - *  
48 - * 关联 {@link PayMerchantDO#getId()}  
49 - */  
50 - private Long merchantId;  
51 - /**  
52 * 应用编号 45 * 应用编号
53 * 46 *
54 * 关联 {@link PayAppDO#getId()} 47 * 关联 {@link PayAppDO#getId()}
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderDO.java
1 package cn.iocoder.yudao.module.pay.dal.dataobject.order; 1 package cn.iocoder.yudao.module.pay.dal.dataobject.order;
2 2
3 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO;  
4 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO;  
5 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO;  
6 -import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum;  
7 -import cn.iocoder.yudao.module.pay.enums.refund.PayRefundTypeEnum;  
8 -import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum;  
9 import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; 3 import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
10 import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum; 4 import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum;
  5 +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO;
  6 +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO;
  7 +import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum;
  8 +import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum;
  9 +import cn.iocoder.yudao.module.pay.enums.refund.PayRefundTypeEnum;
11 import com.baomidou.mybatisplus.annotation.KeySequence; 10 import com.baomidou.mybatisplus.annotation.KeySequence;
12 import com.baomidou.mybatisplus.annotation.TableName; 11 import com.baomidou.mybatisplus.annotation.TableName;
13 import lombok.*; 12 import lombok.*;
@@ -34,12 +33,6 @@ public class PayOrderDO extends BaseDO { @@ -34,12 +33,6 @@ public class PayOrderDO extends BaseDO {
34 */ 33 */
35 private Long id; 34 private Long id;
36 /** 35 /**
37 - * 商户编号  
38 - *  
39 - * 关联 {@link PayMerchantDO#getId()}  
40 - */  
41 - private Long merchantId;  
42 - /**  
43 * 应用编号 36 * 应用编号
44 * 37 *
45 * 关联 {@link PayAppDO#getId()} 38 * 关联 {@link PayAppDO#getId()}
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/order/PayOrderExtensionDO.java
1 package cn.iocoder.yudao.module.pay.dal.dataobject.order; 1 package cn.iocoder.yudao.module.pay.dal.dataobject.order;
2 2
3 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; 3 +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO;
4 import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; 4 import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum;
5 import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; 5 import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
6 import com.baomidou.mybatisplus.annotation.KeySequence; 6 import com.baomidou.mybatisplus.annotation.KeySequence;
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/dataobject/refund/PayRefundDO.java
1 package cn.iocoder.yudao.module.pay.dal.dataobject.refund; 1 package cn.iocoder.yudao.module.pay.dal.dataobject.refund;
2 2
3 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO;  
4 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO;  
5 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO; 3 +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
  4 +import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum;
  5 +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO;
  6 +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO;
6 import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; 7 import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO;
7 import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum; 8 import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum;
8 import cn.iocoder.yudao.module.pay.enums.refund.PayRefundTypeEnum; 9 import cn.iocoder.yudao.module.pay.enums.refund.PayRefundTypeEnum;
9 -import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum;  
10 -import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;  
11 import com.baomidou.mybatisplus.annotation.KeySequence; 10 import com.baomidou.mybatisplus.annotation.KeySequence;
12 import com.baomidou.mybatisplus.annotation.TableId; 11 import com.baomidou.mybatisplus.annotation.TableId;
13 import com.baomidou.mybatisplus.annotation.TableName; 12 import com.baomidou.mybatisplus.annotation.TableName;
@@ -40,12 +39,6 @@ public class PayRefundDO extends BaseDO { @@ -40,12 +39,6 @@ public class PayRefundDO extends BaseDO {
40 private Long id; 39 private Long id;
41 40
42 /** 41 /**
43 - * 商户编号  
44 - *  
45 - * 关联 {@link PayMerchantDO#getId()}  
46 - */  
47 - private Long merchantId;  
48 - /**  
49 * 应用编号 42 * 应用编号
50 * 43 *
51 * 关联 {@link PayAppDO#getId()} 44 * 关联 {@link PayAppDO#getId()}
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/app/PayAppMapper.java 0 → 100644
  1 +package cn.iocoder.yudao.module.pay.dal.mysql.app;
  2 +
  3 +import cn.iocoder.yudao.framework.common.pojo.PageResult;
  4 +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
  5 +import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;
  6 +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppPageReqVO;
  7 +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO;
  8 +import org.apache.ibatis.annotations.Mapper;
  9 +
  10 +@Mapper
  11 +public interface PayAppMapper extends BaseMapperX<PayAppDO> {
  12 +
  13 + default PageResult<PayAppDO> selectPage(PayAppPageReqVO reqVO) {
  14 + return selectPage(reqVO, new QueryWrapperX<PayAppDO>()
  15 + .likeIfPresent("name", reqVO.getName())
  16 + .eqIfPresent("status", reqVO.getStatus())
  17 + .eqIfPresent("remark", reqVO.getRemark())
  18 + .eqIfPresent("pay_notify_url", reqVO.getPayNotifyUrl())
  19 + .eqIfPresent("refund_notify_url", reqVO.getRefundNotifyUrl())
  20 + .betweenIfPresent("create_time", reqVO.getCreateTime())
  21 + .orderByDesc("id"));
  22 + }
  23 +
  24 +}
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayChannelMapper.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/channel/PayChannelMapper.java
1 -package cn.iocoder.yudao.module.pay.dal.mysql.merchant; 1 +package cn.iocoder.yudao.module.pay.dal.mysql.channel;
2 2
3 import cn.iocoder.yudao.framework.common.pojo.PageResult; 3 import cn.iocoder.yudao.framework.common.pojo.PageResult;
4 import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; 4 import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
5 import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; 5 import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
6 import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX; 6 import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;
7 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelExportReqVO;  
8 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelPageReqVO;  
9 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; 7 +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelPageReqVO;
  8 +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO;
10 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 9 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
11 import org.apache.ibatis.annotations.Mapper; 10 import org.apache.ibatis.annotations.Mapper;
12 11
@@ -26,19 +25,6 @@ public interface PayChannelMapper extends BaseMapperX&lt;PayChannelDO&gt; { @@ -26,19 +25,6 @@ public interface PayChannelMapper extends BaseMapperX&lt;PayChannelDO&gt; {
26 .eqIfPresent("status", reqVO.getStatus()) 25 .eqIfPresent("status", reqVO.getStatus())
27 .eqIfPresent("remark", reqVO.getRemark()) 26 .eqIfPresent("remark", reqVO.getRemark())
28 .eqIfPresent("fee_rate", reqVO.getFeeRate()) 27 .eqIfPresent("fee_rate", reqVO.getFeeRate())
29 - .eqIfPresent("merchant_id", reqVO.getMerchantId())  
30 - .eqIfPresent("app_id", reqVO.getAppId())  
31 - .betweenIfPresent("create_time", reqVO.getCreateTime())  
32 - .orderByDesc("id"));  
33 - }  
34 -  
35 - default List<PayChannelDO> selectList(PayChannelExportReqVO reqVO) {  
36 - return selectList(new QueryWrapperX<PayChannelDO>()  
37 - .eqIfPresent("code", reqVO.getCode())  
38 - .eqIfPresent("status", reqVO.getStatus())  
39 - .eqIfPresent("remark", reqVO.getRemark())  
40 - .eqIfPresent("fee_rate", reqVO.getFeeRate())  
41 - .eqIfPresent("merchant_id", reqVO.getMerchantId())  
42 .eqIfPresent("app_id", reqVO.getAppId()) 28 .eqIfPresent("app_id", reqVO.getAppId())
43 .betweenIfPresent("create_time", reqVO.getCreateTime()) 29 .betweenIfPresent("create_time", reqVO.getCreateTime())
44 .orderByDesc("id")); 30 .orderByDesc("id"));
@@ -47,15 +33,13 @@ public interface PayChannelMapper extends BaseMapperX&lt;PayChannelDO&gt; { @@ -47,15 +33,13 @@ public interface PayChannelMapper extends BaseMapperX&lt;PayChannelDO&gt; {
47 /** 33 /**
48 * 根据条件获取渠道 34 * 根据条件获取渠道
49 * 35 *
50 - * @param merchantId 商户编号  
51 - * @param appI 应用编号 36 + * @param appId 应用编号
52 * @param code 渠道编码 37 * @param code 渠道编码
53 * @return 数量 38 * @return 数量
54 */ 39 */
55 - default PayChannelDO selectOne(Long merchantId, Long appI, String code) { 40 + default PayChannelDO selectOne(Long appId, String code) {
56 return this.selectOne((new QueryWrapper<PayChannelDO>().lambda() 41 return this.selectOne((new QueryWrapper<PayChannelDO>().lambda()
57 - .eq(PayChannelDO::getMerchantId, merchantId)  
58 - .eq(PayChannelDO::getAppId, appI) 42 + .eq(PayChannelDO::getAppId, appId)
59 .eq(PayChannelDO::getCode, code) 43 .eq(PayChannelDO::getCode, code)
60 )); 44 ));
61 } 45 }
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayAppMapper.java deleted
1 -package cn.iocoder.yudao.module.pay.dal.mysql.merchant;  
2 -  
3 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppExportReqVO;  
4 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppPageReqVO;  
5 -import cn.iocoder.yudao.framework.common.pojo.PageResult;  
6 -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;  
7 -import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;  
8 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO;  
9 -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;  
10 -import org.apache.ibatis.annotations.Mapper;  
11 -  
12 -import java.util.Collection;  
13 -import java.util.List;  
14 -  
15 -@Mapper  
16 -public interface PayAppMapper extends BaseMapperX<PayAppDO> {  
17 -  
18 - default PageResult<PayAppDO> selectPage(PayAppPageReqVO reqVO, Collection<Long> merchantIds) {  
19 - return selectPage(reqVO, new QueryWrapperX<PayAppDO>()  
20 - .likeIfPresent("name", reqVO.getName())  
21 - .eqIfPresent("status", reqVO.getStatus())  
22 - .eqIfPresent("remark", reqVO.getRemark())  
23 - .eqIfPresent("pay_notify_url", reqVO.getPayNotifyUrl())  
24 - .eqIfPresent("refund_notify_url", reqVO.getRefundNotifyUrl())  
25 - .inIfPresent("merchant_id", merchantIds)  
26 - .betweenIfPresent("create_time", reqVO.getCreateTime())  
27 - .orderByDesc("id"));  
28 - }  
29 -  
30 - default List<PayAppDO> selectList(PayAppExportReqVO reqVO, Collection<Long> merchantIds) {  
31 - return selectList(new QueryWrapperX<PayAppDO>()  
32 - .likeIfPresent("name", reqVO.getName())  
33 - .eqIfPresent("status", reqVO.getStatus())  
34 - .eqIfPresent("remark", reqVO.getRemark())  
35 - .eqIfPresent("pay_notify_url", reqVO.getPayNotifyUrl())  
36 - .eqIfPresent("refund_notify_url", reqVO.getRefundNotifyUrl())  
37 - .inIfPresent("merchant_id", merchantIds)  
38 - .betweenIfPresent("create_time", reqVO.getCreateTime())  
39 - .orderByDesc("id"));  
40 - }  
41 -  
42 - default List<PayAppDO> getListByMerchantId(Long merchantId) {  
43 - return selectList(new LambdaQueryWrapper<PayAppDO>()  
44 - .select(PayAppDO::getId, PayAppDO::getName)  
45 - .eq(PayAppDO::getMerchantId, merchantId));  
46 - }  
47 -  
48 - // TODO @aquan:方法名补充 ByMerchantId  
49 - default Long selectCount(Long merchantId) {  
50 - return selectCount(new LambdaQueryWrapper<PayAppDO>().eq(PayAppDO::getMerchantId, merchantId));  
51 - }  
52 -  
53 -}  
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/merchant/PayMerchantMapper.java deleted
1 -package cn.iocoder.yudao.module.pay.dal.mysql.merchant;  
2 -  
3 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantExportReqVO;  
4 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantPageReqVO;  
5 -import cn.iocoder.yudao.framework.common.pojo.PageResult;  
6 -import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;  
7 -import cn.iocoder.yudao.framework.mybatis.core.query.QueryWrapperX;  
8 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO;  
9 -import org.apache.ibatis.annotations.Mapper;  
10 -  
11 -import java.util.List;  
12 -  
13 -@Mapper  
14 -public interface PayMerchantMapper extends BaseMapperX<PayMerchantDO> {  
15 -  
16 - default PageResult<PayMerchantDO> selectPage(PayMerchantPageReqVO reqVO) {  
17 - return selectPage(reqVO, new QueryWrapperX<PayMerchantDO>()  
18 - .likeIfPresent("no", reqVO.getNo())  
19 - .likeIfPresent("name", reqVO.getName())  
20 - .likeIfPresent("short_name", reqVO.getShortName())  
21 - .eqIfPresent("status", reqVO.getStatus())  
22 - .eqIfPresent("remark", reqVO.getRemark())  
23 - .betweenIfPresent("create_time", reqVO.getCreateTime())  
24 - .orderByDesc("id"));  
25 - }  
26 -  
27 - default List<PayMerchantDO> selectList(PayMerchantExportReqVO reqVO) {  
28 - return selectList(new QueryWrapperX<PayMerchantDO>()  
29 - .likeIfPresent("no", reqVO.getNo())  
30 - .likeIfPresent("name", reqVO.getName())  
31 - .likeIfPresent("short_name", reqVO.getShortName())  
32 - .eqIfPresent("status", reqVO.getStatus())  
33 - .eqIfPresent("remark", reqVO.getRemark())  
34 - .betweenIfPresent("create_time", reqVO.getCreateTime())  
35 - .orderByDesc("id"));  
36 - }  
37 -  
38 - /**  
39 - * 根据商户名称模糊查询商户集合  
40 - *  
41 - * @param merchantName 商户名称  
42 - * @return 商户集合  
43 - */  
44 - default List<PayMerchantDO> getMerchantListByName(String merchantName) {  
45 - return this.selectList(new QueryWrapperX<PayMerchantDO>()  
46 - .likeIfPresent("name", merchantName));  
47 - }  
48 -}  
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&lt;PayOrderDO&gt; { @@ -18,7 +18,6 @@ public interface PayOrderMapper extends BaseMapperX&lt;PayOrderDO&gt; {
18 18
19 default PageResult<PayOrderDO> selectPage(PayOrderPageReqVO reqVO) { 19 default PageResult<PayOrderDO> selectPage(PayOrderPageReqVO reqVO) {
20 return selectPage(reqVO, new QueryWrapperX<PayOrderDO>() 20 return selectPage(reqVO, new QueryWrapperX<PayOrderDO>()
21 - .eqIfPresent("merchant_id", reqVO.getMerchantId())  
22 .eqIfPresent("app_id", reqVO.getAppId()) 21 .eqIfPresent("app_id", reqVO.getAppId())
23 .eqIfPresent("channel_id", reqVO.getChannelId()) 22 .eqIfPresent("channel_id", reqVO.getChannelId())
24 .eqIfPresent("channel_code", reqVO.getChannelCode()) 23 .eqIfPresent("channel_code", reqVO.getChannelCode())
@@ -33,7 +32,6 @@ public interface PayOrderMapper extends BaseMapperX&lt;PayOrderDO&gt; { @@ -33,7 +32,6 @@ public interface PayOrderMapper extends BaseMapperX&lt;PayOrderDO&gt; {
33 32
34 default List<PayOrderDO> selectList(PayOrderExportReqVO reqVO) { 33 default List<PayOrderDO> selectList(PayOrderExportReqVO reqVO) {
35 return selectList(new QueryWrapperX<PayOrderDO>() 34 return selectList(new QueryWrapperX<PayOrderDO>()
36 - .eqIfPresent("merchant_id", reqVO.getMerchantId())  
37 .eqIfPresent("app_id", reqVO.getAppId()) 35 .eqIfPresent("app_id", reqVO.getAppId())
38 .eqIfPresent("channel_id", reqVO.getChannelId()) 36 .eqIfPresent("channel_id", reqVO.getChannelId())
39 .eqIfPresent("channel_code", reqVO.getChannelCode()) 37 .eqIfPresent("channel_code", reqVO.getChannelCode())
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&lt;PayRefundDO&gt; { @@ -16,7 +16,6 @@ public interface PayRefundMapper extends BaseMapperX&lt;PayRefundDO&gt; {
16 16
17 default PageResult<PayRefundDO> selectPage(PayRefundPageReqVO reqVO) { 17 default PageResult<PayRefundDO> selectPage(PayRefundPageReqVO reqVO) {
18 return selectPage(reqVO, new QueryWrapperX<PayRefundDO>() 18 return selectPage(reqVO, new QueryWrapperX<PayRefundDO>()
19 - .eqIfPresent("merchant_id", reqVO.getMerchantId())  
20 .eqIfPresent("app_id", reqVO.getAppId()) 19 .eqIfPresent("app_id", reqVO.getAppId())
21 .eqIfPresent("channel_code", reqVO.getChannelCode()) 20 .eqIfPresent("channel_code", reqVO.getChannelCode())
22 .likeIfPresent("merchant_refund_no", reqVO.getMerchantRefundNo()) 21 .likeIfPresent("merchant_refund_no", reqVO.getMerchantRefundNo())
@@ -29,7 +28,6 @@ public interface PayRefundMapper extends BaseMapperX&lt;PayRefundDO&gt; { @@ -29,7 +28,6 @@ public interface PayRefundMapper extends BaseMapperX&lt;PayRefundDO&gt; {
29 28
30 default List<PayRefundDO> selectList(PayRefundExportReqVO reqVO) { 29 default List<PayRefundDO> selectList(PayRefundExportReqVO reqVO) {
31 return selectList(new QueryWrapperX<PayRefundDO>() 30 return selectList(new QueryWrapperX<PayRefundDO>()
32 - .eqIfPresent("merchant_id", reqVO.getMerchantId())  
33 .eqIfPresent("app_id", reqVO.getAppId()) 31 .eqIfPresent("app_id", reqVO.getAppId())
34 .eqIfPresent("channel_code", reqVO.getChannelCode()) 32 .eqIfPresent("channel_code", reqVO.getChannelCode())
35 .likeIfPresent("merchant_refund_no", reqVO.getMerchantRefundNo()) 33 .likeIfPresent("merchant_refund_no", reqVO.getMerchantRefundNo())
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayAppService.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/app/PayAppService.java
1 -package cn.iocoder.yudao.module.pay.service.merchant; 1 +package cn.iocoder.yudao.module.pay.service.app;
2 2
3 import cn.iocoder.yudao.framework.common.exception.ServiceException; 3 import cn.iocoder.yudao.framework.common.exception.ServiceException;
4 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppCreateReqVO;  
5 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppExportReqVO;  
6 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppPageReqVO;  
7 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppUpdateReqVO;  
8 import cn.iocoder.yudao.framework.common.pojo.PageResult; 4 import cn.iocoder.yudao.framework.common.pojo.PageResult;
9 import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; 5 import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
10 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO; 6 +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppCreateReqVO;
  7 +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppPageReqVO;
  8 +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppUpdateReqVO;
  9 +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO;
11 10
12 import javax.validation.Valid; 11 import javax.validation.Valid;
13 import java.util.Collection; 12 import java.util.Collection;
@@ -68,14 +67,6 @@ public interface PayAppService { @@ -68,14 +67,6 @@ public interface PayAppService {
68 PageResult<PayAppDO> getAppPage(PayAppPageReqVO pageReqVO); 67 PageResult<PayAppDO> getAppPage(PayAppPageReqVO pageReqVO);
69 68
70 /** 69 /**
71 - * 获得支付应用信息列表, 用于 Excel 导出  
72 - *  
73 - * @param exportReqVO 查询条件  
74 - * @return 支付应用信息列表  
75 - */  
76 - List<PayAppDO> getAppList(PayAppExportReqVO exportReqVO);  
77 -  
78 - /**  
79 * 修改应用信息状态 70 * 修改应用信息状态
80 * 71 *
81 * @param id 应用编号 72 * @param id 应用编号
@@ -84,21 +75,13 @@ public interface PayAppService { @@ -84,21 +75,13 @@ public interface PayAppService {
84 void updateAppStatus(Long id, Integer status); 75 void updateAppStatus(Long id, Integer status);
85 76
86 /** 77 /**
87 - * 根据商户 ID 获得支付应用信息列表,  
88 - *  
89 - * @param merchantId 商户 ID  
90 - * @return 支付应用信息列表  
91 - */  
92 - List<PayAppDO> getListByMerchantId(Long merchantId);  
93 -  
94 - /**  
95 * 获得指定编号的商户 Map 78 * 获得指定编号的商户 Map
96 * 79 *
97 - * @param appIdList 应用编号集合 80 + * @param ids 应用编号集合
98 * @return 商户 Map 81 * @return 商户 Map
99 */ 82 */
100 - default Map<Long, PayAppDO> getAppMap(Collection<Long> appIdList) {  
101 - List<PayAppDO> list = this.getAppList(appIdList); 83 + default Map<Long, PayAppDO> getAppMap(Collection<Long> ids) {
  84 + List<PayAppDO> list = getAppList(ids);
102 return CollectionUtils.convertMap(list, PayAppDO::getId); 85 return CollectionUtils.convertMap(list, PayAppDO::getId);
103 } 86 }
104 87
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayAppServiceImpl.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/app/PayAppServiceImpl.java
1 -package cn.iocoder.yudao.module.pay.service.merchant; 1 +package cn.iocoder.yudao.module.pay.service.app;
2 2
3 -import cn.hutool.core.collection.CollectionUtil;  
4 -import cn.hutool.core.util.StrUtil;  
5 import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; 3 import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
6 import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil; 4 import cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil;
7 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppCreateReqVO;  
8 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppExportReqVO;  
9 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppPageReqVO;  
10 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppUpdateReqVO; 5 +import cn.iocoder.yudao.framework.common.pojo.PageResult;
  6 +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppCreateReqVO;
  7 +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppPageReqVO;
  8 +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppUpdateReqVO;
11 import cn.iocoder.yudao.module.pay.convert.app.PayAppConvert; 9 import cn.iocoder.yudao.module.pay.convert.app.PayAppConvert;
12 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO;  
13 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO;  
14 -import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayAppMapper;  
15 -import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayMerchantMapper; 10 +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO;
  11 +import cn.iocoder.yudao.module.pay.dal.mysql.app.PayAppMapper;
16 import cn.iocoder.yudao.module.pay.dal.mysql.order.PayOrderMapper; 12 import cn.iocoder.yudao.module.pay.dal.mysql.order.PayOrderMapper;
17 import cn.iocoder.yudao.module.pay.dal.mysql.refund.PayRefundMapper; 13 import cn.iocoder.yudao.module.pay.dal.mysql.refund.PayRefundMapper;
18 -import cn.iocoder.yudao.framework.common.pojo.PageResult;  
19 import cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants; 14 import cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants;
20 import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; 15 import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum;
21 import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum; 16 import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum;
@@ -24,11 +19,12 @@ import org.springframework.stereotype.Service; @@ -24,11 +19,12 @@ import org.springframework.stereotype.Service;
24 import org.springframework.validation.annotation.Validated; 19 import org.springframework.validation.annotation.Validated;
25 20
26 import javax.annotation.Resource; 21 import javax.annotation.Resource;
27 -import java.util.*; 22 +import java.util.Collection;
  23 +import java.util.List;
28 24
29 import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; 25 import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
30 -import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;  
31 -import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.*; 26 +import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.PAY_APP_EXIST_TRANSACTION_ORDER_CANT_DELETE;
  27 +import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.PAY_APP_NOT_FOUND;
32 28
33 /** 29 /**
34 * 支付应用信息 Service 实现类 30 * 支付应用信息 Service 实现类
@@ -41,9 +37,7 @@ public class PayAppServiceImpl implements PayAppService { @@ -41,9 +37,7 @@ public class PayAppServiceImpl implements PayAppService {
41 37
42 @Resource 38 @Resource
43 private PayAppMapper appMapper; 39 private PayAppMapper appMapper;
44 - // TODO @aquan:使用对方的 Service。模块与模块之间,避免直接调用对方的 mapper  
45 - @Resource  
46 - private PayMerchantMapper merchantMapper; 40 + // TODO 芋艿:不能调用对方的 mapper
47 @Resource 41 @Resource
48 private PayOrderMapper orderMapper; 42 private PayOrderMapper orderMapper;
49 @Resource 43 @Resource
@@ -95,33 +89,7 @@ public class PayAppServiceImpl implements PayAppService { @@ -95,33 +89,7 @@ public class PayAppServiceImpl implements PayAppService {
95 89
96 @Override 90 @Override
97 public PageResult<PayAppDO> getAppPage(PayAppPageReqVO pageReqVO) { 91 public PageResult<PayAppDO> getAppPage(PayAppPageReqVO pageReqVO) {
98 - Set<Long> merchantIdList = this.getMerchantCondition(pageReqVO.getMerchantName());  
99 - if (StrUtil.isNotBlank(pageReqVO.getMerchantName()) && CollectionUtil.isEmpty(merchantIdList)) {  
100 - return new PageResult<>();  
101 - }  
102 - return appMapper.selectPage(pageReqVO, merchantIdList);  
103 - }  
104 -  
105 - @Override  
106 - public List<PayAppDO> getAppList(PayAppExportReqVO exportReqVO) {  
107 - Set<Long> merchantIdList = this.getMerchantCondition(exportReqVO.getMerchantName());  
108 - if (StrUtil.isNotBlank(exportReqVO.getMerchantName()) && CollectionUtil.isEmpty(merchantIdList)) {  
109 - return new ArrayList<>();  
110 - }  
111 - return appMapper.selectList(exportReqVO, merchantIdList);  
112 - }  
113 -  
114 - /**  
115 - * 获取商户编号集合,根据商户名称模糊查询得到所有的商户编号集合  
116 - *  
117 - * @param merchantName 商户名称  
118 - * @return 商户编号集合  
119 - */  
120 - private Set<Long> getMerchantCondition(String merchantName) {  
121 - if (StrUtil.isBlank(merchantName)) {  
122 - return Collections.emptySet();  
123 - }  
124 - return convertSet(merchantMapper.getMerchantListByName(merchantName), PayMerchantDO::getId); 92 + return appMapper.selectPage(pageReqVO);
125 } 93 }
126 94
127 @Override 95 @Override
@@ -135,11 +103,6 @@ public class PayAppServiceImpl implements PayAppService { @@ -135,11 +103,6 @@ public class PayAppServiceImpl implements PayAppService {
135 appMapper.updateById(app); 103 appMapper.updateById(app);
136 } 104 }
137 105
138 - @Override  
139 - public List<PayAppDO> getListByMerchantId(Long merchantId) {  
140 - return appMapper.getListByMerchantId(merchantId);  
141 - }  
142 -  
143 /** 106 /**
144 * 检查商户是否存在 107 * 检查商户是否存在
145 * 108 *
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelService.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/channel/PayChannelService.java
1 -package cn.iocoder.yudao.module.pay.service.merchant; 1 +package cn.iocoder.yudao.module.pay.service.channel;
2 2
3 import cn.iocoder.yudao.framework.common.exception.ServiceException; 3 import cn.iocoder.yudao.framework.common.exception.ServiceException;
4 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelCreateReqVO;  
5 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelExportReqVO;  
6 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelPageReqVO;  
7 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelUpdateReqVO;  
8 import cn.iocoder.yudao.framework.common.pojo.PageResult; 4 import cn.iocoder.yudao.framework.common.pojo.PageResult;
9 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; 5 +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelCreateReqVO;
  6 +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelPageReqVO;
  7 +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelUpdateReqVO;
  8 +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO;
10 9
11 import javax.validation.Valid; 10 import javax.validation.Valid;
12 import java.util.Collection; 11 import java.util.Collection;
@@ -58,21 +57,11 @@ public interface PayChannelService { @@ -58,21 +57,11 @@ public interface PayChannelService {
58 * 获得支付渠道分页 57 * 获得支付渠道分页
59 * 58 *
60 * @param pageReqVO 分页查询 59 * @param pageReqVO 分页查询
61 - * @return 支付渠道  
62 - * 分页 60 + * @return 支付渠道分页
63 */ 61 */
64 PageResult<PayChannelDO> getChannelPage(PayChannelPageReqVO pageReqVO); 62 PageResult<PayChannelDO> getChannelPage(PayChannelPageReqVO pageReqVO);
65 63
66 /** 64 /**
67 - * 获得支付渠道  
68 - * 列表, 用于 Excel 导出  
69 - *  
70 - * @param exportReqVO 查询条件  
71 - * @return 支付渠道列表  
72 - */  
73 - List<PayChannelDO> getChannelList(PayChannelExportReqVO exportReqVO);  
74 -  
75 - /**  
76 * 根据支付应用ID集合获得支付渠道列表 65 * 根据支付应用ID集合获得支付渠道列表
77 * 66 *
78 * @param appIds 应用编号集合 67 * @param appIds 应用编号集合
@@ -83,12 +72,11 @@ public interface PayChannelService { @@ -83,12 +72,11 @@ public interface PayChannelService {
83 /** 72 /**
84 * 根据条件获取渠道 73 * 根据条件获取渠道
85 * 74 *
86 - * @param merchantId 商户编号  
87 * @param appid 应用编号 75 * @param appid 应用编号
88 * @param code 渠道编码 76 * @param code 渠道编码
89 * @return 数量 77 * @return 数量
90 */ 78 */
91 - PayChannelDO getChannelByConditions(Long merchantId, Long appid, String code); 79 + PayChannelDO getChannelByConditions(Long appid, String code);
92 80
93 /** 81 /**
94 * 支付渠道的合法性 82 * 支付渠道的合法性
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelServiceImpl.java renamed to yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/channel/PayChannelServiceImpl.java
1 -package cn.iocoder.yudao.module.pay.service.merchant; 1 +package cn.iocoder.yudao.module.pay.service.channel;
2 2
3 import cn.hutool.core.util.ObjectUtil; 3 import cn.hutool.core.util.ObjectUtil;
4 import cn.hutool.json.JSONUtil; 4 import cn.hutool.json.JSONUtil;
@@ -9,13 +9,12 @@ import cn.iocoder.yudao.framework.pay.core.client.PayClientConfig; @@ -9,13 +9,12 @@ import cn.iocoder.yudao.framework.pay.core.client.PayClientConfig;
9 import cn.iocoder.yudao.framework.pay.core.client.PayClientFactory; 9 import cn.iocoder.yudao.framework.pay.core.client.PayClientFactory;
10 import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum; 10 import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum;
11 import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils; 11 import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils;
12 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelCreateReqVO;  
13 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelExportReqVO;  
14 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelPageReqVO;  
15 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelUpdateReqVO; 12 +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelCreateReqVO;
  13 +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelPageReqVO;
  14 +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelUpdateReqVO;
16 import cn.iocoder.yudao.module.pay.convert.channel.PayChannelConvert; 15 import cn.iocoder.yudao.module.pay.convert.channel.PayChannelConvert;
17 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO;  
18 -import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayChannelMapper; 16 +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO;
  17 +import cn.iocoder.yudao.module.pay.dal.mysql.channel.PayChannelMapper;
19 import cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants; 18 import cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants;
20 import lombok.extern.slf4j.Slf4j; 19 import lombok.extern.slf4j.Slf4j;
21 import org.springframework.stereotype.Service; 20 import org.springframework.stereotype.Service;
@@ -71,7 +70,7 @@ public class PayChannelServiceImpl implements PayChannelService { @@ -71,7 +70,7 @@ public class PayChannelServiceImpl implements PayChannelService {
71 @Override 70 @Override
72 public Long createChannel(PayChannelCreateReqVO reqVO) { 71 public Long createChannel(PayChannelCreateReqVO reqVO) {
73 // 断言是否有重复的 72 // 断言是否有重复的
74 - PayChannelDO channelDO = this.getChannelByConditions(reqVO.getMerchantId(), reqVO.getAppId(), reqVO.getCode()); 73 + PayChannelDO channelDO = this.getChannelByConditions(reqVO.getAppId(), reqVO.getCode());
75 if (ObjectUtil.isNotNull(channelDO)) { 74 if (ObjectUtil.isNotNull(channelDO)) {
76 throw exception(CHANNEL_EXIST_SAME_CHANNEL_ERROR); 75 throw exception(CHANNEL_EXIST_SAME_CHANNEL_ERROR);
77 } 76 }
@@ -121,32 +120,13 @@ public class PayChannelServiceImpl implements PayChannelService { @@ -121,32 +120,13 @@ public class PayChannelServiceImpl implements PayChannelService {
121 } 120 }
122 121
123 @Override 122 @Override
124 - public List<PayChannelDO> getChannelList(PayChannelExportReqVO exportReqVO) {  
125 - return channelMapper.selectList(exportReqVO);  
126 - }  
127 -  
128 - /**  
129 - * 根据支付应用ID集合获得支付渠道列表  
130 - *  
131 - * @param appIds 应用编号集合  
132 - * @return 支付渠道列表  
133 - */  
134 - @Override  
135 public List<PayChannelDO> getChannelListByAppIds(Collection<Long> appIds) { 123 public List<PayChannelDO> getChannelListByAppIds(Collection<Long> appIds) {
136 return channelMapper.getChannelListByAppIds(appIds); 124 return channelMapper.getChannelListByAppIds(appIds);
137 } 125 }
138 126
139 - /**  
140 - * 根据条件获取渠道  
141 - *  
142 - * @param merchantId 商户编号  
143 - * @param appid 应用编号  
144 - * @param code 渠道编码  
145 - * @return 数量  
146 - */  
147 @Override 127 @Override
148 - public PayChannelDO getChannelByConditions(Long merchantId, Long appid, String code) {  
149 - return this.channelMapper.selectOne(merchantId, appid, code); 128 + public PayChannelDO getChannelByConditions(Long appid, String code) {
  129 + return this.channelMapper.selectOne(appid, code);
150 } 130 }
151 131
152 /** 132 /**
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantService.java deleted
1 -package cn.iocoder.yudao.module.pay.service.merchant;  
2 -  
3 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantCreateReqVO;  
4 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantExportReqVO;  
5 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantPageReqVO;  
6 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantUpdateReqVO;  
7 -import cn.iocoder.yudao.framework.common.pojo.PageResult;  
8 -import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;  
9 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO;  
10 -  
11 -import javax.validation.Valid;  
12 -import java.util.Collection;  
13 -import java.util.List;  
14 -import java.util.Map;  
15 -  
16 -/**  
17 - * 支付商户信息 Service 接口  
18 - *  
19 - * @author aquan  
20 - */  
21 -public interface PayMerchantService {  
22 -  
23 - /**  
24 - * 创建支付商户信息  
25 - *  
26 - * @param createReqVO 创建信息  
27 - * @return 编号  
28 - */  
29 - Long createMerchant(@Valid PayMerchantCreateReqVO createReqVO);  
30 -  
31 - /**  
32 - * 更新支付商户信息  
33 - *  
34 - * @param updateReqVO 更新信息  
35 - */  
36 - void updateMerchant(@Valid PayMerchantUpdateReqVO updateReqVO);  
37 -  
38 - /**  
39 - * 删除支付商户信息  
40 - *  
41 - * @param id 编号  
42 - */  
43 - void deleteMerchant(Long id);  
44 -  
45 - /**  
46 - * 获得支付商户信息  
47 - *  
48 - * @param id 编号  
49 - * @return 支付商户信息  
50 - */  
51 - PayMerchantDO getMerchant(Long id);  
52 -  
53 - /**  
54 - * 获得支付商户信息列表  
55 - *  
56 - * @param ids 编号  
57 - * @return 支付商户信息列表  
58 - */  
59 - List<PayMerchantDO> getMerchantList(Collection<Long> ids);  
60 -  
61 - /**  
62 - * 获得支付商户信息分页  
63 - *  
64 - * @param pageReqVO 分页查询  
65 - * @return 支付商户信息分页  
66 - */  
67 - PageResult<PayMerchantDO> getMerchantPage(PayMerchantPageReqVO pageReqVO);  
68 -  
69 - /**  
70 - * 获得支付商户信息列表, 用于 Excel 导出  
71 - *  
72 - * @param exportReqVO 查询条件  
73 - * @return 支付商户信息列表  
74 - */  
75 - List<PayMerchantDO> getMerchantList(PayMerchantExportReqVO exportReqVO);  
76 -  
77 - /**  
78 - * 修改商户状态  
79 - *  
80 - * @param id 商户编号  
81 - * @param status 状态  
82 - */  
83 - void updateMerchantStatus(Long id, Integer status);  
84 -  
85 - /**  
86 - * 根据商户名称模糊查询商户集合  
87 - *  
88 - * @param merchantName 商户名称  
89 - * @return 商户集合  
90 - */  
91 - List<PayMerchantDO> getMerchantListByName(String merchantName);  
92 -  
93 - /**  
94 - * 获得指定编号的商户 Map  
95 - *  
96 - * @param merchantIds 商户编号数组  
97 - * @return 商户 Map  
98 - */  
99 - default Map<Long, PayMerchantDO> getMerchantMap(Collection<Long> merchantIds) {  
100 - List<PayMerchantDO> list = this.getMerchantList(merchantIds);  
101 - return CollectionUtils.convertMap(list, PayMerchantDO::getId);  
102 - }  
103 -  
104 -}  
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantServiceImpl.java deleted
1 -package cn.iocoder.yudao.module.pay.service.merchant;  
2 -  
3 -import cn.hutool.core.date.DateUtil;  
4 -import cn.hutool.core.util.ObjectUtil;  
5 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantCreateReqVO;  
6 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantExportReqVO;  
7 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantPageReqVO;  
8 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantUpdateReqVO;  
9 -import cn.iocoder.yudao.module.pay.convert.merchant.PayMerchantConvert;  
10 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO;  
11 -import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayAppMapper;  
12 -import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayMerchantMapper;  
13 -import cn.iocoder.yudao.framework.common.pojo.PageResult;  
14 -import com.google.common.annotations.VisibleForTesting;  
15 -import org.springframework.stereotype.Service;  
16 -import org.springframework.validation.annotation.Validated;  
17 -  
18 -import javax.annotation.Resource;  
19 -import java.time.LocalDateTime;  
20 -import java.util.Collection;  
21 -import java.util.List;  
22 -  
23 -import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;  
24 -import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.*;  
25 -  
26 -/**  
27 - * 支付商户信息 Service 实现类  
28 - *  
29 - * @author aquan  
30 - */  
31 -@Service  
32 -@Validated  
33 -public class PayMerchantServiceImpl implements PayMerchantService {  
34 -  
35 - @Resource  
36 - private PayMerchantMapper merchantMapper;  
37 -  
38 - @Resource  
39 - private PayAppMapper appMapper;  
40 -  
41 - @Override  
42 - public Long createMerchant(PayMerchantCreateReqVO createReqVO) {  
43 - // 插入  
44 - PayMerchantDO merchant = PayMerchantConvert.INSTANCE.convert(createReqVO);  
45 - merchant.setNo(this.generateMerchantNo());  
46 - merchantMapper.insert(merchant);  
47 - // 返回  
48 - return merchant.getId();  
49 - }  
50 -  
51 - @Override  
52 - public void updateMerchant(PayMerchantUpdateReqVO updateReqVO) {  
53 - // 校验存在  
54 - this.validateMerchantExists(updateReqVO.getId());  
55 - // 更新  
56 - PayMerchantDO updateObj = PayMerchantConvert.INSTANCE.convert(updateReqVO);  
57 - merchantMapper.updateById(updateObj);  
58 - }  
59 -  
60 - @Override  
61 - public void deleteMerchant(Long id) {  
62 - // 校验  
63 - this.validateMerchantExists(id);  
64 - this.validateAppExists(id);  
65 - // 删除  
66 - merchantMapper.deleteById(id);  
67 - }  
68 -  
69 - @Override  
70 - public PayMerchantDO getMerchant(Long id) {  
71 - return merchantMapper.selectById(id);  
72 - }  
73 -  
74 - @Override  
75 - public List<PayMerchantDO> getMerchantList(Collection<Long> ids) {  
76 - return merchantMapper.selectBatchIds(ids);  
77 - }  
78 -  
79 - @Override  
80 - public PageResult<PayMerchantDO> getMerchantPage(PayMerchantPageReqVO pageReqVO) {  
81 - return merchantMapper.selectPage(pageReqVO);  
82 - }  
83 -  
84 - @Override  
85 - public List<PayMerchantDO> getMerchantList(PayMerchantExportReqVO exportReqVO) {  
86 - return merchantMapper.selectList(exportReqVO);  
87 - }  
88 -  
89 - @Override  
90 - public void updateMerchantStatus(Long id, Integer status) {  
91 - // 校验商户存在  
92 - this.checkMerchantExists(id);  
93 - // 更新状态  
94 - PayMerchantDO merchant = new PayMerchantDO();  
95 - merchant.setId(id);  
96 - merchant.setStatus(status);  
97 - merchantMapper.updateById(merchant);  
98 - }  
99 -  
100 - @Override  
101 - public List<PayMerchantDO> getMerchantListByName(String merchantName) {  
102 - return this.merchantMapper.getMerchantListByName(merchantName);  
103 - }  
104 -  
105 - @VisibleForTesting  
106 - public void checkMerchantExists(Long id) {  
107 - if (id == null) {  
108 - return;  
109 - }  
110 - PayMerchantDO merchant = merchantMapper.selectById(id);  
111 - if (merchant == null) {  
112 - throw exception(PAY_MERCHANT_NOT_EXISTS);  
113 - }  
114 - }  
115 -  
116 - /**  
117 - * 校验商户是否存在  
118 - *  
119 - * @param id 商户 ID  
120 - */  
121 - private void validateMerchantExists(Long id) {  
122 - if (ObjectUtil.isNull(merchantMapper.selectById(id))) {  
123 - throw exception(PAY_MERCHANT_NOT_EXISTS);  
124 - }  
125 - }  
126 -  
127 - /**  
128 - * 校验商户是否还存在支付应用  
129 - *  
130 - * @param id 商户ID  
131 - */  
132 - private void validateAppExists(Long id) {  
133 - if (appMapper.selectCount(id) > 0) {  
134 - throw exception(PAY_MERCHANT_EXIST_APP_CANT_DELETE);  
135 - }  
136 - }  
137 -  
138 - // TODO @芋艿:后续增加下合适的算法  
139 - /**  
140 - * 根据年月日时分秒毫秒生成商户号  
141 - *  
142 - * @return 商户号  
143 - */  
144 - private String generateMerchantNo() {  
145 - return "M" + DateUtil.format(LocalDateTime.now(), "yyyyMMddHHmmssSSS");  
146 - }  
147 -  
148 -}  
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 { @@ -91,14 +91,14 @@ public class PayNotifyServiceImpl implements PayNotifyService {
91 task.setType(reqDTO.getType()).setDataId(reqDTO.getDataId()); 91 task.setType(reqDTO.getType()).setDataId(reqDTO.getDataId());
92 task.setStatus(PayNotifyStatusEnum.WAITING.getStatus()).setNextNotifyTime(LocalDateTime.now()) 92 task.setStatus(PayNotifyStatusEnum.WAITING.getStatus()).setNextNotifyTime(LocalDateTime.now())
93 .setNotifyTimes(0).setMaxNotifyTimes(PayNotifyTaskDO.NOTIFY_FREQUENCY.length + 1); 93 .setNotifyTimes(0).setMaxNotifyTimes(PayNotifyTaskDO.NOTIFY_FREQUENCY.length + 1);
94 - // 补充 merchantId + appId + notifyUrl 字段 94 + // 补充 appId + notifyUrl 字段
95 if (Objects.equals(task.getType(), PayNotifyTypeEnum.ORDER.getType())) { 95 if (Objects.equals(task.getType(), PayNotifyTypeEnum.ORDER.getType())) {
96 PayOrderDO order = orderService.getOrder(task.getDataId()); // 不进行非空判断,有问题直接异常 96 PayOrderDO order = orderService.getOrder(task.getDataId()); // 不进行非空判断,有问题直接异常
97 - task.setMerchantId(order.getMerchantId()).setAppId(order.getAppId()). 97 + task.setAppId(order.getAppId()).
98 setMerchantOrderId(order.getMerchantOrderId()).setNotifyUrl(order.getNotifyUrl()); 98 setMerchantOrderId(order.getMerchantOrderId()).setNotifyUrl(order.getNotifyUrl());
99 } else if (Objects.equals(task.getType(), PayNotifyTypeEnum.REFUND.getType())) { 99 } else if (Objects.equals(task.getType(), PayNotifyTypeEnum.REFUND.getType())) {
100 PayRefundDO refundDO = refundService.getRefund(task.getDataId()); 100 PayRefundDO refundDO = refundService.getRefund(task.getDataId());
101 - task.setMerchantId(refundDO.getMerchantId()).setAppId(refundDO.getAppId()) 101 + task.setAppId(refundDO.getAppId())
102 .setMerchantOrderId(refundDO.getMerchantOrderId()).setNotifyUrl(refundDO.getNotifyUrl()); 102 .setMerchantOrderId(refundDO.getMerchantOrderId()).setNotifyUrl(refundDO.getNotifyUrl());
103 } 103 }
104 104
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; @@ -18,8 +18,8 @@ import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderPageReqVO;
18 import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderSubmitReqVO; 18 import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderSubmitReqVO;
19 import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderSubmitRespVO; 19 import cn.iocoder.yudao.module.pay.controller.admin.order.vo.PayOrderSubmitRespVO;
20 import cn.iocoder.yudao.module.pay.convert.order.PayOrderConvert; 20 import cn.iocoder.yudao.module.pay.convert.order.PayOrderConvert;
21 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO;  
22 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; 21 +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO;
  22 +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO;
23 import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; 23 import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO;
24 import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO; 24 import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO;
25 import cn.iocoder.yudao.module.pay.dal.mysql.order.PayOrderExtensionMapper; 25 import cn.iocoder.yudao.module.pay.dal.mysql.order.PayOrderExtensionMapper;
@@ -28,8 +28,8 @@ import cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants; @@ -28,8 +28,8 @@ import cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants;
28 import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyTypeEnum; 28 import cn.iocoder.yudao.module.pay.enums.notify.PayNotifyTypeEnum;
29 import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum; 29 import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum;
30 import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; 30 import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum;
31 -import cn.iocoder.yudao.module.pay.service.merchant.PayAppService;  
32 -import cn.iocoder.yudao.module.pay.service.merchant.PayChannelService; 31 +import cn.iocoder.yudao.module.pay.service.app.PayAppService;
  32 +import cn.iocoder.yudao.module.pay.service.channel.PayChannelService;
33 import cn.iocoder.yudao.module.pay.service.notify.PayNotifyService; 33 import cn.iocoder.yudao.module.pay.service.notify.PayNotifyService;
34 import cn.iocoder.yudao.module.pay.service.notify.dto.PayNotifyTaskCreateReqDTO; 34 import cn.iocoder.yudao.module.pay.service.notify.dto.PayNotifyTaskCreateReqDTO;
35 import lombok.extern.slf4j.Slf4j; 35 import lombok.extern.slf4j.Slf4j;
@@ -109,8 +109,7 @@ public class PayOrderServiceImpl implements PayOrderService { @@ -109,8 +109,7 @@ public class PayOrderServiceImpl implements PayOrderService {
109 } 109 }
110 110
111 // 创建支付交易单 111 // 创建支付交易单
112 - order = PayOrderConvert.INSTANCE.convert(reqDTO)  
113 - .setMerchantId(app.getMerchantId()).setAppId(app.getId()); 112 + order = PayOrderConvert.INSTANCE.convert(reqDTO).setAppId(app.getId());
114 // 商户相关字段 113 // 商户相关字段
115 order.setNotifyUrl(app.getPayNotifyUrl()) 114 order.setNotifyUrl(app.getPayNotifyUrl())
116 .setNotifyStatus(PayOrderNotifyStatusEnum.NO.getStatus()); 115 .setNotifyStatus(PayOrderNotifyStatusEnum.NO.getStatus());
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 @@ -14,8 +14,8 @@ import cn.iocoder.yudao.framework.pay.core.enums.refund.PayNotifyRefundStatusEnu
14 import cn.iocoder.yudao.module.pay.api.refund.dto.PayRefundCreateReqDTO; 14 import cn.iocoder.yudao.module.pay.api.refund.dto.PayRefundCreateReqDTO;
15 import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundExportReqVO; 15 import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundExportReqVO;
16 import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundPageReqVO; 16 import cn.iocoder.yudao.module.pay.controller.admin.refund.vo.PayRefundPageReqVO;
17 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO;  
18 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO; 17 +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO;
  18 +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO;
19 import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO; 19 import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderDO;
20 import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO; 20 import cn.iocoder.yudao.module.pay.dal.dataobject.order.PayOrderExtensionDO;
21 import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO; 21 import cn.iocoder.yudao.module.pay.dal.dataobject.refund.PayRefundDO;
@@ -27,8 +27,8 @@ import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum; @@ -27,8 +27,8 @@ import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum;
27 import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; 27 import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum;
28 import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum; 28 import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum;
29 import cn.iocoder.yudao.module.pay.enums.refund.PayRefundTypeEnum; 29 import cn.iocoder.yudao.module.pay.enums.refund.PayRefundTypeEnum;
30 -import cn.iocoder.yudao.module.pay.service.merchant.PayAppService;  
31 -import cn.iocoder.yudao.module.pay.service.merchant.PayChannelService; 30 +import cn.iocoder.yudao.module.pay.service.app.PayAppService;
  31 +import cn.iocoder.yudao.module.pay.service.channel.PayChannelService;
32 import cn.iocoder.yudao.module.pay.service.notify.PayNotifyService; 32 import cn.iocoder.yudao.module.pay.service.notify.PayNotifyService;
33 import cn.iocoder.yudao.module.pay.service.notify.dto.PayNotifyTaskCreateReqDTO; 33 import cn.iocoder.yudao.module.pay.service.notify.dto.PayNotifyTaskCreateReqDTO;
34 import cn.iocoder.yudao.module.pay.service.order.PayOrderExtensionService; 34 import cn.iocoder.yudao.module.pay.service.order.PayOrderExtensionService;
@@ -141,7 +141,6 @@ public class PayRefundServiceImpl implements PayRefundService { @@ -141,7 +141,6 @@ public class PayRefundServiceImpl implements PayRefundService {
141 .channelOrderNo(order.getChannelOrderNo()) 141 .channelOrderNo(order.getChannelOrderNo())
142 .channelCode(order.getChannelCode()) 142 .channelCode(order.getChannelCode())
143 .channelId(order.getChannelId()) 143 .channelId(order.getChannelId())
144 - .merchantId(order.getMerchantId())  
145 .orderId(order.getId()) 144 .orderId(order.getId())
146 .merchantRefundNo(merchantRefundId) // TODO 芋艿:需要优化 145 .merchantRefundNo(merchantRefundId) // TODO 芋艿:需要优化
147 .notifyUrl(app.getRefundNotifyUrl()) 146 .notifyUrl(app.getRefundNotifyUrl())
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 { @@ -29,7 +29,6 @@ public class PayChannelMapperIntegrationTest extends BaseDbIntegrationTest {
29 payChannelDO.setCode(PayChannelEnum.WX_PUB.getCode()); 29 payChannelDO.setCode(PayChannelEnum.WX_PUB.getCode());
30 payChannelDO.setStatus(CommonStatusEnum.ENABLE.getStatus()); 30 payChannelDO.setStatus(CommonStatusEnum.ENABLE.getStatus());
31 payChannelDO.setFeeRate(1D); 31 payChannelDO.setFeeRate(1D);
32 - payChannelDO.setMerchantId(1L);  
33 payChannelDO.setAppId(6L); 32 payChannelDO.setAppId(6L);
34 // 配置 33 // 配置
35 WXPayClientConfig config = new WXPayClientConfig(); 34 WXPayClientConfig config = new WXPayClientConfig();
@@ -55,7 +54,6 @@ public class PayChannelMapperIntegrationTest extends BaseDbIntegrationTest { @@ -55,7 +54,6 @@ public class PayChannelMapperIntegrationTest extends BaseDbIntegrationTest {
55 payChannelDO.setCode(PayChannelEnum.ALIPAY_QR.getCode()); 54 payChannelDO.setCode(PayChannelEnum.ALIPAY_QR.getCode());
56 payChannelDO.setStatus(CommonStatusEnum.ENABLE.getStatus()); 55 payChannelDO.setStatus(CommonStatusEnum.ENABLE.getStatus());
57 payChannelDO.setFeeRate(1D); 56 payChannelDO.setFeeRate(1D);
58 - payChannelDO.setMerchantId(1L);  
59 payChannelDO.setAppId(6L); 57 payChannelDO.setAppId(6L);
60 // 配置 58 // 配置
61 AlipayPayClientConfig config = new AlipayPayClientConfig(); 59 AlipayPayClientConfig config = new AlipayPayClientConfig();
yudao-module-pay/yudao-module-pay-biz/src/test-integration/java/cn/iocoder/yudao/module/pay/service/order/PayOrderServiceIntegrationTest.java
1 package cn.iocoder.yudao.module.pay.service.order; 1 package cn.iocoder.yudao.module.pay.service.order;
2 2
3 -import cn.iocoder.yudao.module.pay.service.merchant.PayAppServiceImpl;  
4 -import cn.iocoder.yudao.module.pay.service.merchant.PayChannelServiceImpl; 3 +import cn.iocoder.yudao.module.pay.service.channel.PayAppServiceImpl;
  4 +import cn.iocoder.yudao.module.pay.service.channel.PayChannelServiceImpl;
5 import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderCreateReqDTO; 5 import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderCreateReqDTO;
6 import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderSubmitReqDTO; 6 import cn.iocoder.yudao.module.pay.service.order.dto.PayOrderSubmitReqDTO;
7 import cn.iocoder.yudao.module.pay.test.BaseDbIntegrationTest; 7 import cn.iocoder.yudao.module.pay.test.BaseDbIntegrationTest;
yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayAppServiceTest.java renamed to yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/app/PayAppServiceTest.java
1 -package cn.iocoder.yudao.module.pay.service.merchant; 1 +package cn.iocoder.yudao.module.pay.service.app;
2 2
3 import cn.hutool.core.util.RandomUtil; 3 import cn.hutool.core.util.RandomUtil;
4 import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; 4 import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
5 import cn.iocoder.yudao.framework.common.pojo.PageResult; 5 import cn.iocoder.yudao.framework.common.pojo.PageResult;
6 import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; 6 import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest;
7 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppCreateReqVO;  
8 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppExportReqVO;  
9 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppPageReqVO;  
10 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.app.PayAppUpdateReqVO;  
11 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayAppDO;  
12 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO;  
13 -import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayAppMapper;  
14 -import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayMerchantMapper; 7 +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppCreateReqVO;
  8 +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppPageReqVO;
  9 +import cn.iocoder.yudao.module.pay.controller.admin.app.vo.PayAppUpdateReqVO;
  10 +import cn.iocoder.yudao.module.pay.dal.dataobject.app.PayAppDO;
  11 +import cn.iocoder.yudao.module.pay.dal.mysql.app.PayAppMapper;
15 import org.junit.jupiter.api.Test; 12 import org.junit.jupiter.api.Test;
16 -import org.mockito.Mockito;  
17 -import org.springframework.boot.test.mock.mockito.MockBean;  
18 import org.springframework.context.annotation.Import; 13 import org.springframework.context.annotation.Import;
19 14
20 import javax.annotation.Resource; 15 import javax.annotation.Resource;
21 import java.time.LocalDateTime; 16 import java.time.LocalDateTime;
22 -import java.util.Collections;  
23 -import java.util.List;  
24 17
25 import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildTime; 18 import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildTime;
26 import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; 19 import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId;
@@ -40,9 +33,6 @@ public class PayAppServiceTest extends BaseDbUnitTest { @@ -40,9 +33,6 @@ public class PayAppServiceTest extends BaseDbUnitTest {
40 @Resource 33 @Resource
41 private PayAppMapper appMapper; 34 private PayAppMapper appMapper;
42 35
43 - @MockBean(name = "payMerchantMapper")  
44 - private PayMerchantMapper payMerchantMapper;  
45 -  
46 @Test 36 @Test
47 public void testCreateApp_success() { 37 public void testCreateApp_success() {
48 // 准备参数 38 // 准备参数
@@ -112,9 +102,6 @@ public class PayAppServiceTest extends BaseDbUnitTest { @@ -112,9 +102,6 @@ public class PayAppServiceTest extends BaseDbUnitTest {
112 102
113 @Test 103 @Test
114 public void testGetAppPage() { 104 public void testGetAppPage() {
115 - Long merchantId = 1L;  
116 - Long mismatchMerchantId = 2L;  
117 -  
118 // mock 数据 105 // mock 数据
119 PayAppDO dbApp = randomPojo(PayAppDO.class, o -> { // 等会查询到 106 PayAppDO dbApp = randomPojo(PayAppDO.class, o -> { // 等会查询到
120 o.setName("灿灿姐的杂货铺"); 107 o.setName("灿灿姐的杂货铺");
@@ -122,24 +109,9 @@ public class PayAppServiceTest extends BaseDbUnitTest { @@ -122,24 +109,9 @@ public class PayAppServiceTest extends BaseDbUnitTest {
122 o.setRemark("敏敏姐的小卖铺"); 109 o.setRemark("敏敏姐的小卖铺");
123 o.setPayNotifyUrl("https://www.hc.com"); 110 o.setPayNotifyUrl("https://www.hc.com");
124 o.setRefundNotifyUrl("https://www.xm.com"); 111 o.setRefundNotifyUrl("https://www.xm.com");
125 - o.setMerchantId(merchantId);  
126 o.setCreateTime(buildTime(2021,11,20)); 112 o.setCreateTime(buildTime(2021,11,20));
127 }); 113 });
128 114
129 - // mock 数据  
130 - PayMerchantDO dbMerchant = randomPojo(PayMerchantDO.class, o -> { // 等会查询到  
131 - o.setId(merchantId);  
132 - o.setNo("M1008611");  
133 - o.setName("灿哥的杂货铺");  
134 - o.setShortName("灿灿子");  
135 - o.setStatus(CommonStatusEnum.ENABLE.getStatus());  
136 - o.setRemark("灿哥的杂货铺");  
137 - o.setCreateTime(buildTime(2021,11,3));  
138 - });  
139 -  
140 - Mockito.when(payMerchantMapper.getMerchantListByName(dbMerchant.getName()))  
141 - .thenReturn(Collections.singletonList(dbMerchant));  
142 -  
143 appMapper.insert(dbApp); 115 appMapper.insert(dbApp);
144 // 测试 name 不匹配 116 // 测试 name 不匹配
145 appMapper.insert(cloneIgnoreId(dbApp, o -> o.setName("敏敏姐的杂货铺"))); 117 appMapper.insert(cloneIgnoreId(dbApp, o -> o.setName("敏敏姐的杂货铺")));
@@ -151,8 +123,6 @@ public class PayAppServiceTest extends BaseDbUnitTest { @@ -151,8 +123,6 @@ public class PayAppServiceTest extends BaseDbUnitTest {
151 appMapper.insert(cloneIgnoreId(dbApp, o -> o.setPayNotifyUrl("xm.com"))); 123 appMapper.insert(cloneIgnoreId(dbApp, o -> o.setPayNotifyUrl("xm.com")));
152 // 测试 refundNotifyUrl 不匹配 124 // 测试 refundNotifyUrl 不匹配
153 appMapper.insert(cloneIgnoreId(dbApp, o -> o.setRefundNotifyUrl("hc.com"))); 125 appMapper.insert(cloneIgnoreId(dbApp, o -> o.setRefundNotifyUrl("hc.com")));
154 - // 测试 merchantId 不匹配  
155 - appMapper.insert(cloneIgnoreId(dbApp, o -> o.setMerchantId(mismatchMerchantId)));  
156 // 测试 createTime 不匹配 126 // 测试 createTime 不匹配
157 appMapper.insert(cloneIgnoreId(dbApp, o -> o.setCreateTime(buildTime(2021,12,21)))); 127 appMapper.insert(cloneIgnoreId(dbApp, o -> o.setCreateTime(buildTime(2021,12,21))));
158 // 准备参数 128 // 准备参数
@@ -162,7 +132,6 @@ public class PayAppServiceTest extends BaseDbUnitTest { @@ -162,7 +132,6 @@ public class PayAppServiceTest extends BaseDbUnitTest {
162 reqVO.setRemark("敏敏姐的小卖铺"); 132 reqVO.setRemark("敏敏姐的小卖铺");
163 reqVO.setPayNotifyUrl("https://www.hc.com"); 133 reqVO.setPayNotifyUrl("https://www.hc.com");
164 reqVO.setRefundNotifyUrl("https://www.xm.com"); 134 reqVO.setRefundNotifyUrl("https://www.xm.com");
165 - reqVO.setMerchantName(dbMerchant.getName());  
166 reqVO.setCreateTime((new LocalDateTime[]{buildTime(2021,11,19),buildTime(2021,11,21)})); 135 reqVO.setCreateTime((new LocalDateTime[]{buildTime(2021,11,19),buildTime(2021,11,21)}));
167 136
168 // 调用 137 // 调用
@@ -173,66 +142,4 @@ public class PayAppServiceTest extends BaseDbUnitTest { @@ -173,66 +142,4 @@ public class PayAppServiceTest extends BaseDbUnitTest {
173 assertPojoEquals(dbApp, pageResult.getList().get(0)); 142 assertPojoEquals(dbApp, pageResult.getList().get(0));
174 } 143 }
175 144
176 - @Test // TODO 请修改 null 为需要的值  
177 - public void testGetAppList() {  
178 - Long merchantId = 1L;  
179 - Long mismatchMerchantId = 2L;  
180 -  
181 - // mock 数据  
182 - PayAppDO dbApp = randomPojo(PayAppDO.class, o -> { // 等会查询到  
183 - o.setName("灿灿姐的杂货铺");  
184 - o.setStatus(CommonStatusEnum.ENABLE.getStatus());  
185 - o.setRemark("敏敏姐的小卖铺");  
186 - o.setPayNotifyUrl("https://www.hc.com");  
187 - o.setRefundNotifyUrl("https://www.xm.com");  
188 - o.setMerchantId(merchantId);  
189 - o.setCreateTime(buildTime(2021,11,20));  
190 - });  
191 -  
192 - // mock 数据  
193 - PayMerchantDO dbMerchant = randomPojo(PayMerchantDO.class, o -> { // 等会查询到  
194 - o.setId(merchantId);  
195 - o.setNo("M1008611");  
196 - o.setName("灿哥的杂货铺");  
197 - o.setShortName("灿灿子");  
198 - o.setStatus(CommonStatusEnum.ENABLE.getStatus());  
199 - o.setRemark("灿哥的杂货铺");  
200 - o.setCreateTime(buildTime(2021,11,3));  
201 - });  
202 -  
203 - Mockito.when(payMerchantMapper.getMerchantListByName(dbMerchant.getName()))  
204 - .thenReturn(Collections.singletonList(dbMerchant));  
205 -  
206 - appMapper.insert(dbApp);  
207 - // 测试 name 不匹配  
208 - appMapper.insert(cloneIgnoreId(dbApp, o -> o.setName("敏敏姐的杂货铺")));  
209 - // 测试 status 不匹配  
210 - appMapper.insert(cloneIgnoreId(dbApp, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus())));  
211 - // 测试 remark 不匹配  
212 - appMapper.insert(cloneIgnoreId(dbApp, o -> o.setRemark("灿灿姐的小卖部")));  
213 - // 测试 payNotifyUrl 不匹配  
214 - appMapper.insert(cloneIgnoreId(dbApp, o -> o.setPayNotifyUrl("xm.com")));  
215 - // 测试 refundNotifyUrl 不匹配  
216 - appMapper.insert(cloneIgnoreId(dbApp, o -> o.setRefundNotifyUrl("hc.com")));  
217 - // 测试 merchantId 不匹配  
218 - appMapper.insert(cloneIgnoreId(dbApp, o -> o.setMerchantId(mismatchMerchantId)));  
219 - // 测试 createTime 不匹配  
220 - appMapper.insert(cloneIgnoreId(dbApp, o -> o.setCreateTime(buildTime(2021,12,21))));  
221 - // 准备参数  
222 - PayAppExportReqVO reqVO = new PayAppExportReqVO();  
223 - reqVO.setName("灿灿姐的杂货铺");  
224 - reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());  
225 - reqVO.setRemark("敏敏姐的小卖铺");  
226 - reqVO.setPayNotifyUrl("https://www.hc.com");  
227 - reqVO.setRefundNotifyUrl("https://www.xm.com");  
228 - reqVO.setMerchantName(dbMerchant.getName());  
229 - reqVO.setCreateTime((new LocalDateTime[]{buildTime(2021,11,19),buildTime(2021,11,21)}));  
230 -  
231 - // 调用  
232 - List<PayAppDO> list = appService.getAppList(reqVO);  
233 - // 断言  
234 - assertEquals(1, list.size());  
235 - assertPojoEquals(dbApp, list.get(0));  
236 - }  
237 -  
238 } 145 }
yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayChannelServiceTest.java renamed to yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/channel/PayChannelServiceTest.java
1 -package cn.iocoder.yudao.module.pay.service.merchant; 1 +package cn.iocoder.yudao.module.pay.service.channel;
2 2
3 import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; 3 import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
4 import cn.iocoder.yudao.framework.common.pojo.PageResult; 4 import cn.iocoder.yudao.framework.common.pojo.PageResult;
@@ -7,12 +7,11 @@ import cn.iocoder.yudao.framework.pay.core.client.impl.alipay.AlipayPayClientCon @@ -7,12 +7,11 @@ import cn.iocoder.yudao.framework.pay.core.client.impl.alipay.AlipayPayClientCon
7 import cn.iocoder.yudao.framework.pay.core.client.impl.weixin.WxPayClientConfig; 7 import cn.iocoder.yudao.framework.pay.core.client.impl.weixin.WxPayClientConfig;
8 import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum; 8 import cn.iocoder.yudao.framework.pay.core.enums.channel.PayChannelEnum;
9 import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; 9 import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest;
10 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelCreateReqVO;  
11 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelExportReqVO;  
12 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelPageReqVO;  
13 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.channel.PayChannelUpdateReqVO;  
14 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayChannelDO;  
15 -import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayChannelMapper; 10 +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelCreateReqVO;
  11 +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelPageReqVO;
  12 +import cn.iocoder.yudao.module.pay.controller.admin.channel.vo.PayChannelUpdateReqVO;
  13 +import cn.iocoder.yudao.module.pay.dal.dataobject.channel.PayChannelDO;
  14 +import cn.iocoder.yudao.module.pay.dal.mysql.channel.PayChannelMapper;
16 import com.alibaba.fastjson.JSON; 15 import com.alibaba.fastjson.JSON;
17 import org.junit.jupiter.api.Test; 16 import org.junit.jupiter.api.Test;
18 import org.springframework.boot.test.mock.mockito.MockBean; 17 import org.springframework.boot.test.mock.mockito.MockBean;
@@ -21,7 +20,6 @@ import org.springframework.context.annotation.Import; @@ -21,7 +20,6 @@ import org.springframework.context.annotation.Import;
21 import javax.annotation.Resource; 20 import javax.annotation.Resource;
22 import javax.validation.Validator; 21 import javax.validation.Validator;
23 import java.time.LocalDateTime; 22 import java.time.LocalDateTime;
24 -import java.util.List;  
25 23
26 import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildTime; 24 import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildTime;
27 import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId; 25 import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId;
@@ -211,7 +209,6 @@ public class PayChannelServiceTest extends BaseDbUnitTest { @@ -211,7 +209,6 @@ public class PayChannelServiceTest extends BaseDbUnitTest {
211 o.setStatus(CommonStatusEnum.ENABLE.getStatus()); 209 o.setStatus(CommonStatusEnum.ENABLE.getStatus());
212 o.setRemark("灿灿子的支付渠道"); 210 o.setRemark("灿灿子的支付渠道");
213 o.setFeeRate(0.03); 211 o.setFeeRate(0.03);
214 - o.setMerchantId(1L);  
215 o.setAppId(1L); 212 o.setAppId(1L);
216 o.setConfig(payClientConfig); 213 o.setConfig(payClientConfig);
217 o.setCreateTime(buildTime(2021,11,20)); 214 o.setCreateTime(buildTime(2021,11,20));
@@ -239,11 +236,6 @@ public class PayChannelServiceTest extends BaseDbUnitTest { @@ -239,11 +236,6 @@ public class PayChannelServiceTest extends BaseDbUnitTest {
239 o.setConfig(payClientConfig); 236 o.setConfig(payClientConfig);
240 o.setFeeRate(1.23); 237 o.setFeeRate(1.23);
241 })); 238 }));
242 - // 测试 merchantId 不匹配  
243 - channelMapper.insert(cloneIgnoreId(dbChannel, o -> {  
244 - o.setConfig(payClientConfig);  
245 - o.setMerchantId(2L);  
246 - }));  
247 // 测试 appId 不匹配 239 // 测试 appId 不匹配
248 channelMapper.insert(cloneIgnoreId(dbChannel, o -> { 240 channelMapper.insert(cloneIgnoreId(dbChannel, o -> {
249 o.setConfig(payClientConfig); 241 o.setConfig(payClientConfig);
@@ -260,7 +252,6 @@ public class PayChannelServiceTest extends BaseDbUnitTest { @@ -260,7 +252,6 @@ public class PayChannelServiceTest extends BaseDbUnitTest {
260 reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus()); 252 reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
261 reqVO.setRemark("灿灿子的支付渠道"); 253 reqVO.setRemark("灿灿子的支付渠道");
262 reqVO.setFeeRate(0.03); 254 reqVO.setFeeRate(0.03);
263 - reqVO.setMerchantId(1L);  
264 reqVO.setAppId(1L); 255 reqVO.setAppId(1L);
265 reqVO.setConfig(JSON.toJSONString(payClientConfig)); 256 reqVO.setConfig(JSON.toJSONString(payClientConfig));
266 reqVO.setCreateTime((new LocalDateTime[]{buildTime(2021,11,19),buildTime(2021,11,21)})); 257 reqVO.setCreateTime((new LocalDateTime[]{buildTime(2021,11,19),buildTime(2021,11,21)}));
@@ -275,77 +266,6 @@ public class PayChannelServiceTest extends BaseDbUnitTest { @@ -275,77 +266,6 @@ public class PayChannelServiceTest extends BaseDbUnitTest {
275 266
276 } 267 }
277 268
278 - @Test  
279 - public void testGetChannelList() {  
280 - // mock 数据  
281 - AlipayPayClientConfig payClientConfig = getCertificateConfig();  
282 - PayChannelDO dbChannel = randomPojo(PayChannelDO.class, o -> { // 等会查询到  
283 - o.setCode(PayChannelEnum.ALIPAY_APP.getCode());  
284 - o.setStatus(CommonStatusEnum.ENABLE.getStatus());  
285 - o.setRemark("灿灿子的支付渠道");  
286 - o.setFeeRate(0.03);  
287 - o.setMerchantId(1L);  
288 - o.setAppId(1L);  
289 - o.setConfig(payClientConfig);  
290 - o.setCreateTime(buildTime(2021,11,20));  
291 - });  
292 - channelMapper.insert(dbChannel);  
293 - // 执行拷贝的时候会出现异常,所以在插入后要重置为null 后续在写入新的  
294 - dbChannel.setConfig(null);  
295 - // 测试 code 不匹配  
296 - channelMapper.insert(cloneIgnoreId(dbChannel, o -> {  
297 - o.setConfig(payClientConfig);  
298 - o.setCode(PayChannelEnum.WX_PUB.getCode());  
299 - }));  
300 - // 测试 status 不匹配  
301 - channelMapper.insert(cloneIgnoreId(dbChannel, o -> {  
302 - o.setConfig(payClientConfig);  
303 - o.setStatus(CommonStatusEnum.DISABLE.getStatus());  
304 - }));  
305 - // 测试 remark 不匹配  
306 - channelMapper.insert(cloneIgnoreId(dbChannel, o ->{  
307 - o.setConfig(payClientConfig);  
308 - o.setRemark("敏敏子的渠道");  
309 - }));  
310 - // 测试 feeRate 不匹配  
311 - channelMapper.insert(cloneIgnoreId(dbChannel, o -> {  
312 - o.setConfig(payClientConfig);  
313 - o.setFeeRate(1.23);  
314 - }));  
315 - // 测试 merchantId 不匹配  
316 - channelMapper.insert(cloneIgnoreId(dbChannel, o -> {  
317 - o.setConfig(payClientConfig);  
318 - o.setMerchantId(2L);  
319 - }));  
320 - // 测试 appId 不匹配  
321 - channelMapper.insert(cloneIgnoreId(dbChannel, o -> {  
322 - o.setConfig(payClientConfig);  
323 - o.setAppId(2L);  
324 - }));  
325 - // 测试 createTime 不匹配  
326 - channelMapper.insert(cloneIgnoreId(dbChannel, o -> {  
327 - o.setConfig(payClientConfig);  
328 - o.setCreateTime(buildTime(2021, 10, 20));  
329 - }));  
330 - // 准备参数  
331 - PayChannelExportReqVO reqVO = new PayChannelExportReqVO();  
332 - reqVO.setCode(PayChannelEnum.ALIPAY_APP.getCode());  
333 - reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());  
334 - reqVO.setRemark("灿灿子的支付渠道");  
335 - reqVO.setFeeRate(0.03);  
336 - reqVO.setMerchantId(1L);  
337 - reqVO.setAppId(1L);  
338 - reqVO.setConfig(JSON.toJSONString(payClientConfig));  
339 - reqVO.setCreateTime((new LocalDateTime[]{buildTime(2021,11,19),buildTime(2021,11,21)}));  
340 -  
341 - // 调用  
342 - List<PayChannelDO> list = channelService.getChannelList(reqVO);  
343 - // 断言  
344 - assertEquals(1, list.size());  
345 - assertPojoEquals(dbChannel, list.get(0), "config");  
346 - assertPojoEquals(payClientConfig, list.get(0).getConfig());  
347 - }  
348 -  
349 public WxPayClientConfig getV2Config() { 269 public WxPayClientConfig getV2Config() {
350 return new WxPayClientConfig() 270 return new WxPayClientConfig()
351 .setAppId("APP00001") 271 .setAppId("APP00001")
yudao-module-pay/yudao-module-pay-biz/src/test/java/cn/iocoder/yudao/module/pay/service/merchant/PayMerchantServiceTest.java deleted
1 -package cn.iocoder.yudao.module.pay.service.merchant;  
2 -  
3 -import cn.hutool.core.util.RandomUtil;  
4 -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;  
5 -import cn.iocoder.yudao.framework.common.pojo.PageResult;  
6 -import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest;  
7 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantCreateReqVO;  
8 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantExportReqVO;  
9 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantPageReqVO;  
10 -import cn.iocoder.yudao.module.pay.controller.admin.merchant.vo.merchant.PayMerchantUpdateReqVO;  
11 -import cn.iocoder.yudao.module.pay.dal.dataobject.merchant.PayMerchantDO;  
12 -import cn.iocoder.yudao.module.pay.dal.mysql.merchant.PayMerchantMapper;  
13 -import org.junit.jupiter.api.Test;  
14 -import org.springframework.context.annotation.Import;  
15 -  
16 -import javax.annotation.Resource;  
17 -import java.time.LocalDateTime;  
18 -import java.util.List;  
19 -  
20 -import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildTime;  
21 -import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId;  
22 -import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals;  
23 -import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertServiceException;  
24 -import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomLongId;  
25 -import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.randomPojo;  
26 -import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.PAY_MERCHANT_NOT_EXISTS;  
27 -import static org.junit.jupiter.api.Assertions.*;  
28 -  
29 -/**  
30 -* {@link PayMerchantServiceImpl} 的单元测试类  
31 -*  
32 -* @author aquan  
33 -*/  
34 -@Import(PayMerchantServiceImpl.class)  
35 -public class PayMerchantServiceTest extends BaseDbUnitTest {  
36 -  
37 - @Resource  
38 - private PayMerchantServiceImpl merchantService;  
39 -  
40 - @Resource  
41 - private PayMerchantMapper merchantMapper;  
42 -  
43 - @Test  
44 - public void testCreateMerchant_success() {  
45 - // 准备参数  
46 - PayMerchantCreateReqVO reqVO = randomPojo(PayMerchantCreateReqVO.class,o ->  
47 - o.setStatus(RandomUtil.randomEle(CommonStatusEnum.values()).getStatus()));  
48 -  
49 - // 调用  
50 - Long merchantId = merchantService.createMerchant(reqVO);  
51 - // 断言  
52 - assertNotNull(merchantId);  
53 - // 校验记录的属性是否正确  
54 - PayMerchantDO merchant = merchantMapper.selectById(merchantId);  
55 - assertPojoEquals(reqVO, merchant);  
56 - }  
57 -  
58 - @Test  
59 - public void testUpdateMerchant_success() {  
60 - // mock 数据  
61 - PayMerchantDO dbMerchant = randomPojo(PayMerchantDO.class, o ->  
62 - o.setStatus(CommonStatusEnum.ENABLE.getStatus()));  
63 - merchantMapper.insert(dbMerchant);// @Sql: 先插入出一条存在的数据  
64 - // 准备参数  
65 - PayMerchantUpdateReqVO reqVO = randomPojo(PayMerchantUpdateReqVO.class, o -> {  
66 - o.setId(dbMerchant.getId()); // 设置更新的 ID  
67 - o.setStatus(CommonStatusEnum.DISABLE.getStatus());  
68 - });  
69 -  
70 - // 调用  
71 - merchantService.updateMerchant(reqVO);  
72 - // 校验是否更新正确  
73 - PayMerchantDO merchant = merchantMapper.selectById(reqVO.getId()); // 获取最新的  
74 - assertPojoEquals(reqVO, merchant);  
75 - }  
76 -  
77 - @Test  
78 - public void testUpdateMerchant_notExists() {  
79 - // 准备参数  
80 - PayMerchantUpdateReqVO reqVO = randomPojo(PayMerchantUpdateReqVO.class);  
81 -  
82 - // 调用, 并断言异常  
83 - assertServiceException(() -> merchantService.updateMerchant(reqVO), PAY_MERCHANT_NOT_EXISTS);  
84 - }  
85 -  
86 - @Test  
87 - public void testDeleteMerchant_success() {  
88 - // mock 数据  
89 - PayMerchantDO dbMerchant = randomPojo(PayMerchantDO.class,  
90 - o-> o.setStatus(CommonStatusEnum.ENABLE.getStatus()));  
91 - merchantMapper.insert(dbMerchant);// @Sql: 先插入出一条存在的数据  
92 - // 准备参数  
93 - Long id = dbMerchant.getId();  
94 -  
95 - // 调用  
96 - merchantService.deleteMerchant(id);  
97 - // 校验数据不存在了  
98 - assertNull(merchantMapper.selectById(id));  
99 - }  
100 -  
101 - @Test  
102 - public void testDeleteMerchant_notExists() {  
103 - // 准备参数  
104 - Long id = randomLongId();  
105 -  
106 - // 调用, 并断言异常  
107 - assertServiceException(() -> merchantService.deleteMerchant(id), PAY_MERCHANT_NOT_EXISTS);  
108 - }  
109 -  
110 - @Test  
111 - public void testGetMerchantPage() {  
112 - // mock 数据  
113 - PayMerchantDO dbMerchant = randomPojo(PayMerchantDO.class, o -> { // 等会查询到  
114 - o.setNo("M1008611");  
115 - o.setName("灿哥的杂货铺");  
116 - o.setShortName("灿灿子");  
117 - o.setStatus(CommonStatusEnum.ENABLE.getStatus());  
118 - o.setRemark("灿哥的杂货铺");  
119 - o.setCreateTime(buildTime(2021,11,3));  
120 - });  
121 - merchantMapper.insert(dbMerchant);  
122 - // 测试 no 不匹配  
123 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setNo("M200000")));  
124 - // 测试 name 不匹配  
125 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setName("斌哥的杂货铺")));  
126 - // 测试 shortName 不匹配  
127 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setShortName("斌斌子")));  
128 - // 测试 status 不匹配  
129 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus())));  
130 - // 测试 remark 不匹配  
131 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setRemark("斌哥的杂货铺")));  
132 - // 测试 createTime 不匹配  
133 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setCreateTime(buildTime(2022,12,4))));  
134 - // 准备参数  
135 - PayMerchantPageReqVO reqVO = new PayMerchantPageReqVO();  
136 - reqVO.setNo("M1008611");  
137 - reqVO.setName("灿哥的杂货铺");  
138 - reqVO.setShortName("灿灿子");  
139 - reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());  
140 - reqVO.setRemark("灿哥的杂货铺");  
141 - reqVO.setCreateTime((new LocalDateTime[]{buildTime(2021,11,2),buildTime(2021,11,4)}));  
142 -  
143 - // 调用  
144 - PageResult<PayMerchantDO> pageResult = merchantService.getMerchantPage(reqVO);  
145 - // 断言  
146 - assertEquals(1, pageResult.getTotal());  
147 - assertEquals(1, pageResult.getList().size());  
148 - assertPojoEquals(dbMerchant, pageResult.getList().get(0));  
149 - }  
150 -  
151 - @Test  
152 - public void testGetMerchantList() {  
153 - // mock 数据  
154 - PayMerchantDO dbMerchant = randomPojo(PayMerchantDO.class, o -> { // 等会查询到  
155 - o.setNo("M1008611");  
156 - o.setName("灿哥的杂货铺");  
157 - o.setShortName("灿灿子");  
158 - o.setStatus(CommonStatusEnum.ENABLE.getStatus());  
159 - o.setRemark("灿哥的杂货铺");  
160 - o.setCreateTime(buildTime(2021,11,3));  
161 - });  
162 - merchantMapper.insert(dbMerchant);  
163 - // 测试 no 不匹配  
164 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setNo("M200000")));  
165 - // 测试 name 不匹配  
166 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setName("斌哥的杂货铺")));  
167 - // 测试 shortName 不匹配  
168 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setShortName("斌斌子")));  
169 - // 测试 status 不匹配  
170 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setStatus(CommonStatusEnum.DISABLE.getStatus())));  
171 - // 测试 remark 不匹配  
172 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setRemark("斌哥的杂货铺")));  
173 - // 测试 createTime 不匹配  
174 - merchantMapper.insert(cloneIgnoreId(dbMerchant, o -> o.setCreateTime(buildTime(2022,12,4))));  
175 - // 准备参数  
176 - PayMerchantExportReqVO reqVO = new PayMerchantExportReqVO();  
177 - reqVO.setNo("M1008611");  
178 - reqVO.setName("灿哥的杂货铺");  
179 - reqVO.setShortName("灿灿子");  
180 - reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());  
181 - reqVO.setRemark("灿哥的杂货铺");  
182 - reqVO.setCreateTime((new LocalDateTime[]{buildTime(2021,11,2),buildTime(2021,11,4)}));  
183 -  
184 - // 调用  
185 - List<PayMerchantDO> list = merchantService.getMerchantList(reqVO);  
186 - // 断言  
187 - assertEquals(1, list.size());  
188 - assertPojoEquals(dbMerchant, list.get(0));  
189 - }  
190 -  
191 -}  
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; @@ -14,8 +14,8 @@ import cn.iocoder.yudao.module.pay.dal.mysql.order.PayOrderMapper;
14 import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum; 14 import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum;
15 import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum; 15 import cn.iocoder.yudao.module.pay.enums.order.PayOrderStatusEnum;
16 import cn.iocoder.yudao.module.pay.enums.refund.PayRefundTypeEnum; 16 import cn.iocoder.yudao.module.pay.enums.refund.PayRefundTypeEnum;
17 -import cn.iocoder.yudao.module.pay.service.merchant.PayAppService;  
18 -import cn.iocoder.yudao.module.pay.service.merchant.PayChannelService; 17 +import cn.iocoder.yudao.module.pay.service.app.PayAppService;
  18 +import cn.iocoder.yudao.module.pay.service.channel.PayChannelService;
19 import cn.iocoder.yudao.module.pay.service.notify.PayNotifyService; 19 import cn.iocoder.yudao.module.pay.service.notify.PayNotifyService;
20 import org.junit.jupiter.api.Test; 20 import org.junit.jupiter.api.Test;
21 import org.springframework.boot.test.mock.mockito.MockBean; 21 import org.springframework.boot.test.mock.mockito.MockBean;
@@ -67,7 +67,6 @@ public class PayOrderServiceTest extends BaseDbUnitTest { @@ -67,7 +67,6 @@ public class PayOrderServiceTest extends BaseDbUnitTest {
67 67
68 // mock 数据 68 // mock 数据
69 PayOrderDO dbOrder = randomPojo(PayOrderDO.class, o -> { // 等会查询到 69 PayOrderDO dbOrder = randomPojo(PayOrderDO.class, o -> { // 等会查询到
70 - o.setMerchantId(1L);  
71 o.setAppId(1L); 70 o.setAppId(1L);
72 o.setChannelId(1L); 71 o.setChannelId(1L);
73 o.setChannelCode(PayChannelEnum.WX_PUB.getCode()); 72 o.setChannelCode(PayChannelEnum.WX_PUB.getCode());
@@ -94,8 +93,6 @@ public class PayOrderServiceTest extends BaseDbUnitTest { @@ -94,8 +93,6 @@ public class PayOrderServiceTest extends BaseDbUnitTest {
94 o.setUpdateTime(LocalDateTime.of(2018, 1, 1, 10, 10, 15)); 93 o.setUpdateTime(LocalDateTime.of(2018, 1, 1, 10, 10, 15));
95 }); 94 });
96 orderMapper.insert(dbOrder); 95 orderMapper.insert(dbOrder);
97 - // 测试 merchantId 不匹配  
98 - orderMapper.insert(cloneIgnoreId(dbOrder, o -> o.setMerchantId(2L)));  
99 // 测试 appId 不匹配 96 // 测试 appId 不匹配
100 orderMapper.insert(cloneIgnoreId(dbOrder, o -> o.setAppId(2L))); 97 orderMapper.insert(cloneIgnoreId(dbOrder, o -> o.setAppId(2L)));
101 // 测试 channelId 不匹配 98 // 测试 channelId 不匹配
@@ -115,7 +112,6 @@ public class PayOrderServiceTest extends BaseDbUnitTest { @@ -115,7 +112,6 @@ public class PayOrderServiceTest extends BaseDbUnitTest {
115 1)))); 112 1))));
116 // 准备参数 113 // 准备参数
117 PayOrderPageReqVO reqVO = new PayOrderPageReqVO(); 114 PayOrderPageReqVO reqVO = new PayOrderPageReqVO();
118 - reqVO.setMerchantId(1L);  
119 reqVO.setAppId(1L); 115 reqVO.setAppId(1L);
120 reqVO.setChannelId(1L); 116 reqVO.setChannelId(1L);
121 reqVO.setChannelCode(PayChannelEnum.WX_PUB.getCode()); 117 reqVO.setChannelCode(PayChannelEnum.WX_PUB.getCode());
@@ -139,7 +135,6 @@ public class PayOrderServiceTest extends BaseDbUnitTest { @@ -139,7 +135,6 @@ public class PayOrderServiceTest extends BaseDbUnitTest {
139 String merchantOrderId = generateNo(); 135 String merchantOrderId = generateNo();
140 String channelOrderId = generateNo(); 136 String channelOrderId = generateNo();
141 PayOrderDO dbOrder = randomPojo(PayOrderDO.class, o -> { // 等会查询到 137 PayOrderDO dbOrder = randomPojo(PayOrderDO.class, o -> { // 等会查询到
142 - o.setMerchantId(1L);  
143 o.setAppId(1L); 138 o.setAppId(1L);
144 o.setChannelId(1L); 139 o.setChannelId(1L);
145 o.setChannelCode(PayChannelEnum.WX_PUB.getCode()); 140 o.setChannelCode(PayChannelEnum.WX_PUB.getCode());
@@ -167,8 +162,6 @@ public class PayOrderServiceTest extends BaseDbUnitTest { @@ -167,8 +162,6 @@ public class PayOrderServiceTest extends BaseDbUnitTest {
167 162
168 }); 163 });
169 orderMapper.insert(dbOrder); 164 orderMapper.insert(dbOrder);
170 - // 测试 merchantId 不匹配  
171 - orderMapper.insert(cloneIgnoreId(dbOrder, o -> o.setMerchantId(2L)));  
172 // 测试 appId 不匹配 165 // 测试 appId 不匹配
173 orderMapper.insert(cloneIgnoreId(dbOrder, o -> o.setAppId(2L))); 166 orderMapper.insert(cloneIgnoreId(dbOrder, o -> o.setAppId(2L)));
174 // 测试 channelId 不匹配 167 // 测试 channelId 不匹配
@@ -188,7 +181,6 @@ public class PayOrderServiceTest extends BaseDbUnitTest { @@ -188,7 +181,6 @@ public class PayOrderServiceTest extends BaseDbUnitTest {
188 1)))); 181 1))));
189 // 准备参数 182 // 准备参数
190 PayOrderExportReqVO reqVO = new PayOrderExportReqVO(); 183 PayOrderExportReqVO reqVO = new PayOrderExportReqVO();
191 - reqVO.setMerchantId(1L);  
192 reqVO.setAppId(1L); 184 reqVO.setAppId(1L);
193 reqVO.setChannelId(1L); 185 reqVO.setChannelId(1L);
194 reqVO.setChannelCode(PayChannelEnum.WX_PUB.getCode()); 186 reqVO.setChannelCode(PayChannelEnum.WX_PUB.getCode());
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; @@ -12,8 +12,8 @@ import cn.iocoder.yudao.module.pay.dal.mysql.refund.PayRefundMapper;
12 import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum; 12 import cn.iocoder.yudao.module.pay.enums.order.PayOrderNotifyStatusEnum;
13 import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum; 13 import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum;
14 import cn.iocoder.yudao.module.pay.enums.refund.PayRefundTypeEnum; 14 import cn.iocoder.yudao.module.pay.enums.refund.PayRefundTypeEnum;
15 -import cn.iocoder.yudao.module.pay.service.merchant.PayAppService;  
16 -import cn.iocoder.yudao.module.pay.service.merchant.PayChannelService; 15 +import cn.iocoder.yudao.module.pay.service.app.PayAppService;
  16 +import cn.iocoder.yudao.module.pay.service.channel.PayChannelService;
17 import cn.iocoder.yudao.module.pay.service.notify.PayNotifyService; 17 import cn.iocoder.yudao.module.pay.service.notify.PayNotifyService;
18 import cn.iocoder.yudao.module.pay.service.order.PayOrderExtensionService; 18 import cn.iocoder.yudao.module.pay.service.order.PayOrderExtensionService;
19 import cn.iocoder.yudao.module.pay.service.order.PayOrderService; 19 import cn.iocoder.yudao.module.pay.service.order.PayOrderService;
@@ -58,7 +58,6 @@ public class PayRefundServiceTest extends BaseDbUnitTest { @@ -58,7 +58,6 @@ public class PayRefundServiceTest extends BaseDbUnitTest {
58 public void testGetRefundPage() { 58 public void testGetRefundPage() {
59 // mock 数据 59 // mock 数据
60 PayRefundDO dbRefund = randomPojo(PayRefundDO.class, o -> { // 等会查询到 60 PayRefundDO dbRefund = randomPojo(PayRefundDO.class, o -> { // 等会查询到
61 - o.setMerchantId(1L);  
62 o.setAppId(1L); 61 o.setAppId(1L);
63 o.setChannelId(1L); 62 o.setChannelId(1L);
64 o.setChannelCode(PayChannelEnum.WX_PUB.getCode()); 63 o.setChannelCode(PayChannelEnum.WX_PUB.getCode());
@@ -86,8 +85,6 @@ public class PayRefundServiceTest extends BaseDbUnitTest { @@ -86,8 +85,6 @@ public class PayRefundServiceTest extends BaseDbUnitTest {
86 o.setUpdateTime(LocalDateTime.of(2021, 1, 1, 10, 10, 35)); 85 o.setUpdateTime(LocalDateTime.of(2021, 1, 1, 10, 10, 35));
87 }); 86 });
88 refundMapper.insert(dbRefund); 87 refundMapper.insert(dbRefund);
89 - // 测试 merchantId 不匹配  
90 - refundMapper.insert(cloneIgnoreId(dbRefund, o -> o.setMerchantId(2L)));  
91 // 测试 appId 不匹配 88 // 测试 appId 不匹配
92 refundMapper.insert(cloneIgnoreId(dbRefund, o -> o.setAppId(2L))); 89 refundMapper.insert(cloneIgnoreId(dbRefund, o -> o.setAppId(2L)));
93 // 测试 channelCode 不匹配 90 // 测试 channelCode 不匹配
@@ -106,7 +103,6 @@ public class PayRefundServiceTest extends BaseDbUnitTest { @@ -106,7 +103,6 @@ public class PayRefundServiceTest extends BaseDbUnitTest {
106 o.setCreateTime(LocalDateTime.of(2022, 1, 1, 10, 10, 10)))); 103 o.setCreateTime(LocalDateTime.of(2022, 1, 1, 10, 10, 10))));
107 // 准备参数 104 // 准备参数
108 PayRefundPageReqVO reqVO = new PayRefundPageReqVO(); 105 PayRefundPageReqVO reqVO = new PayRefundPageReqVO();
109 - reqVO.setMerchantId(1L);  
110 reqVO.setAppId(1L); 106 reqVO.setAppId(1L);
111 reqVO.setChannelCode(PayChannelEnum.WX_PUB.getCode()); 107 reqVO.setChannelCode(PayChannelEnum.WX_PUB.getCode());
112 reqVO.setMerchantRefundNo("MRF0000001"); 108 reqVO.setMerchantRefundNo("MRF0000001");
@@ -127,7 +123,6 @@ public class PayRefundServiceTest extends BaseDbUnitTest { @@ -127,7 +123,6 @@ public class PayRefundServiceTest extends BaseDbUnitTest {
127 public void testGetRefundList() { 123 public void testGetRefundList() {
128 // mock 数据 124 // mock 数据
129 PayRefundDO dbRefund = randomPojo(PayRefundDO.class, o -> { // 等会查询到 125 PayRefundDO dbRefund = randomPojo(PayRefundDO.class, o -> { // 等会查询到
130 - o.setMerchantId(1L);  
131 o.setAppId(1L); 126 o.setAppId(1L);
132 o.setChannelId(1L); 127 o.setChannelId(1L);
133 o.setChannelCode(PayChannelEnum.WX_PUB.getCode()); 128 o.setChannelCode(PayChannelEnum.WX_PUB.getCode());
@@ -155,8 +150,6 @@ public class PayRefundServiceTest extends BaseDbUnitTest { @@ -155,8 +150,6 @@ public class PayRefundServiceTest extends BaseDbUnitTest {
155 o.setUpdateTime(LocalDateTime.of(2021, 1, 1, 10, 10, 35)); 150 o.setUpdateTime(LocalDateTime.of(2021, 1, 1, 10, 10, 35));
156 }); 151 });
157 refundMapper.insert(dbRefund); 152 refundMapper.insert(dbRefund);
158 - // 测试 merchantId 不匹配  
159 - refundMapper.insert(cloneIgnoreId(dbRefund, o -> o.setMerchantId(2L)));  
160 // 测试 appId 不匹配 153 // 测试 appId 不匹配
161 refundMapper.insert(cloneIgnoreId(dbRefund, o -> o.setAppId(2L))); 154 refundMapper.insert(cloneIgnoreId(dbRefund, o -> o.setAppId(2L)));
162 // 测试 channelCode 不匹配 155 // 测试 channelCode 不匹配
@@ -176,7 +169,6 @@ public class PayRefundServiceTest extends BaseDbUnitTest { @@ -176,7 +169,6 @@ public class PayRefundServiceTest extends BaseDbUnitTest {
176 169
177 // 准备参数 170 // 准备参数
178 PayRefundExportReqVO reqVO = new PayRefundExportReqVO(); 171 PayRefundExportReqVO reqVO = new PayRefundExportReqVO();
179 - reqVO.setMerchantId(1L);  
180 reqVO.setAppId(1L); 172 reqVO.setAppId(1L);
181 reqVO.setChannelCode(PayChannelEnum.WX_PUB.getCode()); 173 reqVO.setChannelCode(PayChannelEnum.WX_PUB.getCode());
182 reqVO.setMerchantRefundNo("MRF0000001"); 174 reqVO.setMerchantRefundNo("MRF0000001");
yudao-ui-admin/src/api/pay/channel.js
@@ -27,16 +27,6 @@ export function deleteChannel(id) { @@ -27,16 +27,6 @@ export function deleteChannel(id) {
27 }) 27 })
28 } 28 }
29 29
30 -// 获得支付渠道  
31 -// export function getChannel(id) {  
32 -// return request({  
33 -// url: '/pay/channel/get?id=' + id,  
34 -// method: 'get'  
35 -// })  
36 -// }  
37 -  
38 -  
39 -  
40 // 获得支付渠道分页 30 // 获得支付渠道分页
41 export function getChannelPage(query) { 31 export function getChannelPage(query) {
42 return request({ 32 return request({
@@ -46,22 +36,11 @@ export function getChannelPage(query) { @@ -46,22 +36,11 @@ export function getChannelPage(query) {
46 }) 36 })
47 } 37 }
48 38
49 -// 导出支付渠道Excel  
50 -export function exportChannelExcel(query) {  
51 - return request({  
52 - url: '/pay/channel/export-excel',  
53 - method: 'get',  
54 - params: query,  
55 - responseType: 'blob'  
56 - })  
57 -}  
58 -  
59 // 获得支付渠道 39 // 获得支付渠道
60 -export function getChannel(merchantId,appId,code) { 40 +export function getChannel(appId,code) {
61 return request({ 41 return request({
62 url: '/pay/channel/get-channel', 42 url: '/pay/channel/get-channel',
63 params:{ 43 params:{
64 - merchantId:merchantId,  
65 appId:appId, 44 appId:appId,
66 code:code 45 code:code
67 }, 46 },
yudao-ui-admin/src/api/pay/merchant.js deleted
1 -import request from '@/utils/request'  
2 -  
3 -// 创建支付商户信息  
4 -export function createMerchant(data) {  
5 - return request({  
6 - url: '/pay/merchant/create',  
7 - method: 'post',  
8 - data: data  
9 - })  
10 -}  
11 -  
12 -// 更新支付商户信息  
13 -export function updateMerchant(data) {  
14 - return request({  
15 - url: '/pay/merchant/update',  
16 - method: 'put',  
17 - data: data  
18 - })  
19 -}  
20 -  
21 -// 支付商户状态修改  
22 -export function changeMerchantStatus(id, status) {  
23 - const data = {  
24 - id,  
25 - status  
26 - }  
27 - return request({  
28 - url: '/pay/merchant/update-status',  
29 - method: 'put',  
30 - data: data  
31 - })  
32 -}  
33 -  
34 -// 删除支付商户信息  
35 -export function deleteMerchant(id) {  
36 - return request({  
37 - url: '/pay/merchant/delete?id=' + id,  
38 - method: 'delete'  
39 - })  
40 -}  
41 -  
42 -// 获得支付商户信息  
43 -export function getMerchant(id) {  
44 - return request({  
45 - url: '/pay/merchant/get?id=' + id,  
46 - method: 'get'  
47 - })  
48 -}  
49 -// 根据商户名称搜索商户列表  
50 -export function getMerchantListByName(name) {  
51 - return request({  
52 - url: '/pay/merchant/list-by-name',  
53 - params:{  
54 - name:name  
55 - },  
56 - method: 'get'  
57 - })  
58 -}  
59 -  
60 -// 获得支付商户信息分页  
61 -export function getMerchantPage(query) {  
62 - return request({  
63 - url: '/pay/merchant/page',  
64 - method: 'get',  
65 - params: query  
66 - })  
67 -}  
68 -  
69 -// 导出支付商户信息 Excel  
70 -export function exportMerchantExcel(query) {  
71 - return request({  
72 - url: '/pay/merchant/export-excel',  
73 - method: 'get',  
74 - params: query,  
75 - responseType: 'blob'  
76 - })  
77 -}  
yudao-ui-admin/src/views/pay/app/components/aliPayChannelForm.vue
@@ -131,7 +131,6 @@ const defaultForm = { @@ -131,7 +131,6 @@ const defaultForm = {
131 remark: '', 131 remark: '',
132 feeRate: null, 132 feeRate: null,
133 appId: '', 133 appId: '',
134 - merchantId: null,  
135 aliPayConfig: { 134 aliPayConfig: {
136 appId: '', 135 appId: '',
137 serverUrl: null, 136 serverUrl: null,
@@ -161,13 +160,6 @@ export default { @@ -161,13 +160,6 @@ export default {
161 "appId": null, 160 "appId": null,
162 // 渠道编码 161 // 渠道编码
163 "payCode": null, 162 "payCode": null,
164 - // 商户对象  
165 - "payMerchant": {  
166 - // 编号  
167 - "id": null,  
168 - // 名称  
169 - "name": null  
170 - },  
171 } 163 }
172 }, 164 },
173 data() { 165 data() {
@@ -249,7 +241,6 @@ export default { @@ -249,7 +241,6 @@ export default {
249 if (newVal.aliPayOpen) { 241 if (newVal.aliPayOpen) {
250 this.form.code = newVal.payCode; 242 this.form.code = newVal.payCode;
251 this.form.appId = newVal.appId; 243 this.form.appId = newVal.appId;
252 - this.form.merchantId = newVal.payMerchant.id;  
253 // 只有在初次进来为编辑 并且为加载中的时候才回去请求数据 244 // 只有在初次进来为编辑 并且为加载中的时候才回去请求数据
254 if (newVal.edit === true && newVal.loading) { 245 if (newVal.edit === true && newVal.loading) {
255 this.title = "编辑支付渠道"; 246 this.title = "编辑支付渠道";
@@ -264,7 +255,7 @@ export default { @@ -264,7 +255,7 @@ export default {
264 255
265 methods: { 256 methods: {
266 init() { 257 init() {
267 - getChannel(this.transferParam.payMerchant.id, this.transferParam.appId, this.transferParam.payCode) 258 + getChannel(this.transferParam.appId, this.transferParam.payCode)
268 .then(response => { 259 .then(response => {
269 this.form.id = response.data.id; 260 this.form.id = response.data.id;
270 this.form.feeRate = response.data.feeRate; 261 this.form.feeRate = response.data.feeRate;
yudao-ui-admin/src/views/pay/app/components/wechatChannelForm.vue
@@ -95,7 +95,6 @@ const defaultForm = { @@ -95,7 +95,6 @@ const defaultForm = {
95 remark: '', 95 remark: '',
96 feeRate: null, 96 feeRate: null,
97 appId: '', 97 appId: '',
98 - merchantId: null,  
99 weChatConfig: { 98 weChatConfig: {
100 appId: '', 99 appId: '',
101 mchId: '', 100 mchId: '',
@@ -123,13 +122,6 @@ export default { @@ -123,13 +122,6 @@ export default {
123 "appId": null, 122 "appId": null,
124 // 渠道编码 123 // 渠道编码
125 "payCode": null, 124 "payCode": null,
126 - // 商户对象  
127 - "payMerchant": {  
128 - // 编号  
129 - "id": null,  
130 - // 名称  
131 - "name": null  
132 - },  
133 } 125 }
134 }, 126 },
135 data() { 127 data() {
@@ -200,7 +192,6 @@ export default { @@ -200,7 +192,6 @@ export default {
200 if (newVal.wechatOpen) { 192 if (newVal.wechatOpen) {
201 this.form.code = newVal.payCode; 193 this.form.code = newVal.payCode;
202 this.form.appId = newVal.appId; 194 this.form.appId = newVal.appId;
203 - this.form.merchantId = newVal.payMerchant.id;  
204 // 只有在初次进来为编辑 并且为加载中的时候才回去请求数据 195 // 只有在初次进来为编辑 并且为加载中的时候才回去请求数据
205 if (newVal.edit && newVal.loading) { 196 if (newVal.edit && newVal.loading) {
206 this.title = "编辑支付渠道"; 197 this.title = "编辑支付渠道";
@@ -214,7 +205,7 @@ export default { @@ -214,7 +205,7 @@ export default {
214 }, 205 },
215 methods: { 206 methods: {
216 init() { 207 init() {
217 - getChannel(this.transferParam.payMerchant.id, this.transferParam.appId, this.transferParam.payCode) 208 + getChannel(this.transferParam.appId, this.transferParam.payCode)
218 .then(response => { 209 .then(response => {
219 this.form.id = response.data.id; 210 this.form.id = response.data.id;
220 this.form.feeRate = response.data.feeRate; 211 this.form.feeRate = response.data.feeRate;
yudao-ui-admin/src/views/pay/app/index.vue
@@ -7,10 +7,6 @@ @@ -7,10 +7,6 @@
7 <el-input v-model="queryParams.name" placeholder="请输入应用名" clearable 7 <el-input v-model="queryParams.name" placeholder="请输入应用名" clearable
8 @keyup.enter.native="handleQuery"/> 8 @keyup.enter.native="handleQuery"/>
9 </el-form-item> 9 </el-form-item>
10 - <el-form-item label="商户名称" prop="merchantName">  
11 - <el-input v-model="queryParams.merchantName" placeholder="请输入商户名称" clearable  
12 - @keyup.enter.native="handleQuery"/>  
13 - </el-form-item>  
14 <el-form-item label="开启状态" prop="status"> 10 <el-form-item label="开启状态" prop="status">
15 <el-select v-model="queryParams.status" placeholder="请选择开启状态" clearable> 11 <el-select v-model="queryParams.status" placeholder="请选择开启状态" clearable>
16 <el-option v-for="dict in statusDictDatas" :key="parseInt(dict.value)" :label="dict.label" 12 <el-option v-for="dict in statusDictDatas" :key="parseInt(dict.value)" :label="dict.label"
@@ -34,11 +30,6 @@ @@ -34,11 +30,6 @@
34 v-hasPermi="['pay:app:create']">新增 30 v-hasPermi="['pay:app:create']">新增
35 </el-button> 31 </el-button>
36 </el-col> 32 </el-col>
37 - <el-col :span="1.5">  
38 - <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"  
39 - v-hasPermi="['pay:app:export']">导出  
40 - </el-button>  
41 - </el-col>  
42 <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> 33 <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
43 </el-row> 34 </el-row>
44 35
@@ -174,23 +165,6 @@ @@ -174,23 +165,6 @@
174 <el-form-item label="应用名" prop="name"> 165 <el-form-item label="应用名" prop="name">
175 <el-input v-model="form.name" placeholder="请输入应用名"/> 166 <el-input v-model="form.name" placeholder="请输入应用名"/>
176 </el-form-item> 167 </el-form-item>
177 - <el-form-item label="所属商户" prop="merchantId">  
178 - <el-select  
179 - v-model="form.merchantId"  
180 - filterable  
181 - remote  
182 - reserve-keyword  
183 - placeholder="请选择所属商户"  
184 - :remote-method="handleGetMerchantListByName"  
185 - :loading="loading">  
186 - <el-option  
187 - v-for="item in merchantList"  
188 - :key="item.id"  
189 - :label="item.name"  
190 - :value="item.id">  
191 - </el-option>  
192 - </el-select>  
193 - </el-form-item>  
194 <el-form-item label="开启状态" prop="status"> 168 <el-form-item label="开启状态" prop="status">
195 <el-radio-group v-model="form.status"> 169 <el-radio-group v-model="form.status">
196 <el-radio v-for="dict in statusDictDatas" :key="parseInt(dict.value)" :label="parseInt(dict.value)"> 170 <el-radio v-for="dict in statusDictDatas" :key="parseInt(dict.value)" :label="parseInt(dict.value)">
@@ -221,10 +195,9 @@ @@ -221,10 +195,9 @@
221 </template> 195 </template>
222 196
223 <script> 197 <script>
224 -import {createApp, updateApp, changeAppStatus, deleteApp, getApp, getAppPage, exportAppExcel} from "@/api/pay/app";  
225 -import {DICT_TYPE, getDictDatas} from "@/utils/dict";  
226 -import {PayType, PayChannelEnum, CommonStatusEnum} from "@/utils/constants";  
227 -import {getMerchantListByName} from "@/api/pay/merchant"; 198 +import { createApp, updateApp, changeAppStatus, deleteApp, getApp, getAppPage } from "@/api/pay/app";
  199 +import { DICT_TYPE, getDictDatas } from "@/utils/dict";
  200 +import { PayType, PayChannelEnum, CommonStatusEnum } from "@/utils/constants";
228 import wechatChannelForm from "@/views/pay/app/components/wechatChannelForm"; 201 import wechatChannelForm from "@/views/pay/app/components/wechatChannelForm";
229 import aliPayChannelForm from "@/views/pay/app/components/aliPayChannelForm"; 202 import aliPayChannelForm from "@/views/pay/app/components/aliPayChannelForm";
230 203
@@ -254,10 +227,6 @@ export default { @@ -254,10 +227,6 @@ export default {
254 pageSize: 10, 227 pageSize: 10,
255 name: null, 228 name: null,
256 status: null, 229 status: null,
257 - remark: null,  
258 - payNotifyUrl: null,  
259 - refundNotifyUrl: null,  
260 - merchantName: null,  
261 createTime: [] 230 createTime: []
262 }, 231 },
263 // 表单参数 232 // 表单参数
@@ -268,7 +237,6 @@ export default { @@ -268,7 +237,6 @@ export default {
268 status: [{required: true, message: "开启状态不能为空", trigger: "blur"}], 237 status: [{required: true, message: "开启状态不能为空", trigger: "blur"}],
269 payNotifyUrl: [{required: true, message: "支付结果的回调地址不能为空", trigger: "blur"}], 238 payNotifyUrl: [{required: true, message: "支付结果的回调地址不能为空", trigger: "blur"}],
270 refundNotifyUrl: [{required: true, message: "退款结果的回调地址不能为空", trigger: "blur"}], 239 refundNotifyUrl: [{required: true, message: "退款结果的回调地址不能为空", trigger: "blur"}],
271 - merchantId: [{required: true, message: "商户编号不能为空", trigger: "blur"}],  
272 }, 240 },
273 // 数据字典 241 // 数据字典
274 statusDictDatas: getDictDatas(DICT_TYPE.COMMON_STATUS), 242 statusDictDatas: getDictDatas(DICT_TYPE.COMMON_STATUS),
@@ -277,8 +245,6 @@ export default { @@ -277,8 +245,6 @@ export default {
277 payChannelEnum: PayChannelEnum, 245 payChannelEnum: PayChannelEnum,
278 // 支付类型 246 // 支付类型
279 payType: PayType, 247 payType: PayType,
280 - // 商户列表  
281 - merchantList: [],  
282 // 是否显示支付窗口 248 // 是否显示支付窗口
283 payOpen: false, 249 payOpen: false,
284 // 微信组件传参参数 250 // 微信组件传参参数
@@ -305,7 +271,6 @@ export default { @@ -305,7 +271,6 @@ export default {
305 }, 271 },
306 created() { 272 created() {
307 this.getList(); 273 this.getList();
308 - this.handleGetMerchantListByName(null);  
309 }, 274 },
310 methods: { 275 methods: {
311 /** 查询列表 */ 276 /** 查询列表 */
@@ -332,7 +297,6 @@ export default { @@ -332,7 +297,6 @@ export default {
332 remark: undefined, 297 remark: undefined,
333 payNotifyUrl: undefined, 298 payNotifyUrl: undefined,
334 refundNotifyUrl: undefined, 299 refundNotifyUrl: undefined,
335 - merchantId: undefined,  
336 }; 300 };
337 this.resetForm("form"); 301 this.resetForm("form");
338 }, 302 },
@@ -411,28 +375,6 @@ export default { @@ -411,28 +375,6 @@ export default {
411 }); 375 });
412 }); 376 });
413 }, 377 },
414 - /** 导出按钮操作 */  
415 - handleExport() {  
416 - // 处理查询参数  
417 - let params = {...this.queryParams};  
418 - params.pageNo = undefined;  
419 - params.pageSize = undefined;  
420 - // 执行导出  
421 - this.$modal.confirm('是否确认导出所有支付应用信息数据项?').then(function () {  
422 - return exportAppExcel(params);  
423 - }).then(response => {  
424 - this.$download.excel(response, '支付应用信息.xls');  
425 - }).catch(() => {});  
426 - },  
427 - /**  
428 - * 根据商户名称模糊匹配商户信息  
429 - * @param name 商户名称  
430 - */  
431 - handleGetMerchantListByName(name) {  
432 - getMerchantListByName(name).then(response => {  
433 - this.merchantList = response.data;  
434 - });  
435 - },  
436 /** 378 /**
437 * 修改支付渠道信息 379 * 修改支付渠道信息
438 */ 380 */
@@ -440,7 +382,6 @@ export default { @@ -440,7 +382,6 @@ export default {
440 this.settingChannelParam(row, payCode, type) 382 this.settingChannelParam(row, payCode, type)
441 this.channelParam.edit = true; 383 this.channelParam.edit = true;
442 this.channelParam.loading = true; 384 this.channelParam.loading = true;
443 -  
444 }, 385 },
445 /** 386 /**
446 * 新增支付渠道信息 387 * 新增支付渠道信息
@@ -475,9 +416,6 @@ export default { @@ -475,9 +416,6 @@ export default {
475 */ 416 */
476 judgeChannelExist(channels, channelCode) { 417 judgeChannelExist(channels, channelCode) {
477 return channels.indexOf(channelCode) !== -1; 418 return channels.indexOf(channelCode) !== -1;
478 - },  
479 - refreshTable() {  
480 - this.getList();  
481 } 419 }
482 } 420 }
483 }; 421 };
yudao-ui-admin/src/views/pay/demo/index.vue
@@ -79,7 +79,6 @@ @@ -79,7 +79,6 @@
79 79
80 <script> 80 <script>
81 import {createDemoOrder, getDemoOrderPage, refundDemoOrder} from "@/api/pay/demo"; 81 import {createDemoOrder, getDemoOrderPage, refundDemoOrder} from "@/api/pay/demo";
82 -import {deleteMerchant} from "@/api/pay/merchant";  
83 82
84 export default { 83 export default {
85 name: "PayDemoOrder", 84 name: "PayDemoOrder",
yudao-ui-admin/src/views/pay/merchant/index.vue deleted
1 -<template>  
2 - <div class="app-container">  
3 -  
4 - <!-- 搜索工作栏 -->  
5 - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">  
6 - <el-form-item label="商户号" prop="no">  
7 - <el-input v-model="queryParams.no" placeholder="请输入商户号" clearable @keyup.enter.native="handleQuery"/>  
8 - </el-form-item>  
9 - <el-form-item label="商户全称" prop="name">  
10 - <el-input v-model="queryParams.name" placeholder="请输入商户全称" clearable @keyup.enter.native="handleQuery"/>  
11 - </el-form-item>  
12 - <el-form-item label="商户简称" prop="shortName">  
13 - <el-input v-model="queryParams.shortName" placeholder="请输入商户简称" clearable @keyup.enter.native="handleQuery"/>  
14 - </el-form-item>  
15 - <el-form-item label="开启状态" prop="status">  
16 - <el-select v-model="queryParams.status" placeholder="请选择开启状态" clearable>  
17 - <el-option v-for="dict in statusDictDatas" :key="parseInt(dict.value)" :label="dict.label" :value="parseInt(dict.value)"/>  
18 - </el-select>  
19 - </el-form-item>  
20 - <el-form-item label="备注" prop="remark">  
21 - <el-input v-model="queryParams.remark" placeholder="请输入备注" clearable @keyup.enter.native="handleQuery"/>  
22 - </el-form-item>  
23 - <el-form-item label="创建时间" prop="createTime">  
24 - <el-date-picker v-model="queryParams.createTime" style="width: 240px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"  
25 - range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" />  
26 - </el-form-item>  
27 - <el-form-item>  
28 - <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>  
29 - <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>  
30 - </el-form-item>  
31 - </el-form>  
32 -  
33 - <!-- 操作工具栏 -->  
34 - <el-row :gutter="10" class="mb8">  
35 - <el-col :span="1.5">  
36 - <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"  
37 - v-hasPermi="['pay:merchant:create']">新增</el-button>  
38 - </el-col>  
39 - <el-col :span="1.5">  
40 - <el-button type="warning" plain icon="el-icon-download" size="mini" :loading="exportLoading" @click="handleExport"  
41 - v-hasPermi="['pay:merchant:export']">导出</el-button>  
42 - </el-col>  
43 - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>  
44 - </el-row>  
45 -  
46 - <!-- 列表 -->  
47 - <el-table v-loading="loading" :data="list">  
48 - <el-table-column label="商户编号" align="center" prop="id" />  
49 - <el-table-column label="商户号" align="center" prop="no" />  
50 - <el-table-column label="商户全称" align="center" prop="name" />  
51 - <el-table-column label="商户简称" align="center" prop="shortName" />  
52 - <el-table-column label="开启状态" align="center" prop="status" >  
53 - <template v-slot="scope">  
54 - <el-switch v-model="scope.row.status" :active-value="0" :inactive-value="1" @change="handleStatusChange(scope.row)" />  
55 - </template>  
56 - </el-table-column>  
57 - <el-table-column label="备注" align="center" prop="remark" />  
58 - <el-table-column label="创建时间" align="center" prop="createTime" width="180">  
59 - <template v-slot="scope">  
60 - <span>{{ parseTime(scope.row.createTime) }}</span>  
61 - </template>  
62 - </el-table-column>  
63 - <el-table-column label="操作" align="center" class-name="small-padding fixed-width">  
64 - <template v-slot="scope">  
65 - <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"  
66 - v-hasPermi="['pay:merchant:update']">修改</el-button>  
67 - <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"  
68 - v-hasPermi="['pay:merchant:delete']">删除</el-button>  
69 - </template>  
70 - </el-table-column>  
71 - </el-table>  
72 - <!-- 分页组件 -->  
73 - <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"  
74 - @pagination="getList"/>  
75 -  
76 - <!-- 对话框(添加 / 修改) -->  
77 - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>  
78 - <el-form ref="form" :model="form" :rules="rules" label-width="80px">  
79 -<!-- <el-form-item label="商户号" prop="no">-->  
80 -<!-- <el-input v-model="form.no" placeholder="请输入商户号" />-->  
81 -<!-- </el-form-item>-->  
82 - <el-form-item label="商户全称" prop="name">  
83 - <el-input v-model="form.name" placeholder="请输入商户全称" />  
84 - </el-form-item>  
85 - <el-form-item label="商户简称" prop="shortName">  
86 - <el-input v-model="form.shortName" placeholder="请输入商户简称" />  
87 - </el-form-item>  
88 - <el-form-item label="开启状态" prop="status">  
89 - <el-radio-group v-model="form.status">  
90 - <el-radio v-for="dict in statusDictDatas" :key="parseInt(dict.value)" :label="parseInt(dict.value)">  
91 - {{dict.label}}</el-radio>  
92 - </el-radio-group>  
93 - </el-form-item>  
94 - <el-form-item label="备注" prop="remark">  
95 - <el-input v-model="form.remark" placeholder="请输入备注" />  
96 - </el-form-item>  
97 - </el-form>  
98 - <div slot="footer" class="dialog-footer">  
99 - <el-button type="primary" @click="submitForm">确 定</el-button>  
100 - <el-button @click="cancel">取 消</el-button>  
101 - </div>  
102 - </el-dialog>  
103 - </div>  
104 -</template>  
105 -  
106 -<script>  
107 -import {  
108 - createMerchant,  
109 - updateMerchant,  
110 - changeMerchantStatus,  
111 - deleteMerchant,  
112 - getMerchant,  
113 - getMerchantPage,  
114 - exportMerchantExcel  
115 -} from "@/api/pay/merchant";  
116 -import {DICT_TYPE, getDictDatas} from "@/utils/dict";  
117 -import {CommonStatusEnum} from "@/utils/constants";  
118 -  
119 -export default {  
120 - name: "PayMerchant",  
121 - components: {  
122 - },  
123 - data() {  
124 - return {  
125 - // 遮罩层  
126 - loading: true,  
127 - // 导出遮罩层  
128 - exportLoading: false,  
129 - // 显示搜索条件  
130 - showSearch: true,  
131 - // 总条数  
132 - total: 0,  
133 - // 支付商户信息列表  
134 - list: [],  
135 - // 弹出层标题  
136 - title: "",  
137 - // 是否显示弹出层  
138 - open: false,  
139 - // 查询参数  
140 - queryParams: {  
141 - pageNo: 1,  
142 - pageSize: 10,  
143 - no: null,  
144 - name: null,  
145 - shortName: null,  
146 - status: null,  
147 - remark: null,  
148 - createTime: []  
149 - },  
150 - // 表单参数  
151 - form: {},  
152 - // 表单校验  
153 - rules: {  
154 - no: [{ required: true, message: "商户号不能为空", trigger: "blur" }],  
155 - name: [{ required: true, message: "商户全称不能为空", trigger: "blur" }],  
156 - shortName: [{ required: true, message: "商户简称不能为空", trigger: "blur" }],  
157 - status: [{ required: true, message: "开启状态不能为空", trigger: "blur" }],  
158 - },  
159 - // 商户状态数据字典  
160 - statusDictDatas: getDictDatas(DICT_TYPE.COMMON_STATUS)  
161 - };  
162 - },  
163 - created() {  
164 - this.getList();  
165 - },  
166 - methods: {  
167 - /** 查询列表 */  
168 - getList() {  
169 - this.loading = true;  
170 - // 执行查询  
171 - getMerchantPage(this.queryParams).then(response => {  
172 - console.log(response.data);  
173 - this.list = response.data.list;  
174 - this.total = response.data.total;  
175 - this.loading = false;  
176 - });  
177 - },  
178 - /** 取消按钮 */  
179 - cancel() {  
180 - this.open = false;  
181 - this.reset();  
182 - },  
183 - /** 表单重置 */  
184 - reset() {  
185 - this.form = {  
186 - id: undefined,  
187 - no: undefined,  
188 - name: undefined,  
189 - shortName: undefined,  
190 - status: undefined,  
191 - remark: undefined,  
192 - };  
193 - this.resetForm("form");  
194 - },  
195 - /** 搜索按钮操作 */  
196 - handleQuery() {  
197 - this.queryParams.pageNo = 1;  
198 - this.getList();  
199 - },  
200 - /** 重置按钮操作 */  
201 - resetQuery() {  
202 - this.resetForm("queryForm");  
203 - this.handleQuery();  
204 - },  
205 - /** 新增按钮操作 */  
206 - handleAdd() {  
207 - this.reset();  
208 - this.open = true;  
209 - this.title = "添加支付商户信息";  
210 - },  
211 - /** 修改按钮操作 */  
212 - handleUpdate(row) {  
213 - this.reset();  
214 - getMerchant(row.id).then(response => {  
215 - this.form = response.data;  
216 - this.open = true;  
217 - this.title = "修改支付商户信息";  
218 - });  
219 - },  
220 - // 用户状态修改  
221 - handleStatusChange(row) {  
222 - let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";  
223 - this.$modal.confirm('确认要"' + text + '""' + row.name + '"商户吗?').then(function() {  
224 - return changeMerchantStatus(row.id, row.status);  
225 - }).then(() => {  
226 - this.$modal.msgSuccess(text + "成功");  
227 - }).catch(function() {  
228 - row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE  
229 - : CommonStatusEnum.ENABLE;  
230 - });  
231 - },  
232 - /** 提交按钮 */  
233 - submitForm() {  
234 - this.$refs["form"].validate(valid => {  
235 - if (!valid) {  
236 - return;  
237 - }  
238 - // 修改的提交  
239 - if (this.form.id != null) {  
240 - updateMerchant(this.form).then(response => {  
241 - this.$modal.msgSuccess("修改成功");  
242 - this.open = false;  
243 - this.getList();  
244 - });  
245 - return;  
246 - }  
247 - // 添加的提交  
248 - createMerchant(this.form).then(response => {  
249 - this.$modal.msgSuccess("新增成功");  
250 - this.open = false;  
251 - this.getList();  
252 - });  
253 - });  
254 - },  
255 - /** 删除按钮操作 */  
256 - handleDelete(row) {  
257 - const id = row.id;  
258 - this.$modal.confirm('是否确认删除支付商户信息编号为"' + id + '"的数据项?').then(function() {  
259 - return deleteMerchant(id);  
260 - }).then(() => {  
261 - this.getList();  
262 - this.$modal.msgSuccess("删除成功");  
263 - }).catch(() => {});  
264 - },  
265 - /** 导出按钮操作 */  
266 - handleExport() {  
267 - // 处理查询参数  
268 - let params = {...this.queryParams};  
269 - params.pageNo = undefined;  
270 - params.pageSize = undefined;  
271 - // 执行导出  
272 - this.$modal.confirm('是否确认导出所有支付商户信息数据项?').then(() => {  
273 - this.exportLoading = true;  
274 - return exportMerchantExcel(params);  
275 - }).then(response => {  
276 - this.$download.excel(response, '支付商户信息.xls');  
277 - this.exportLoading = false;  
278 - }).catch(() => {});  
279 - }  
280 - }  
281 -};  
282 -</script>  
yudao-ui-admin/src/views/pay/order/index.vue
@@ -3,13 +3,6 @@ @@ -3,13 +3,6 @@
3 3
4 <!-- 搜索工作栏 --> 4 <!-- 搜索工作栏 -->
5 <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="120px"> 5 <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="120px">
6 - <el-form-item label="所属商户" prop="merchantId">  
7 - <el-select v-model="queryParams.merchantId" clearable @clear="()=>{queryParams.merchantId = null}"  
8 - filterable remote reserve-keyword placeholder="请选择所属商户" @change="handleGetAppListByMerchantId"  
9 - :remote-method="handleGetMerchantListByName" :loading="merchantLoading">  
10 - <el-option v-for="item in merchantList" :key="item.id" :label="item.name" :value="item.id"/>  
11 - </el-select>  
12 - </el-form-item>  
13 <el-form-item label="应用编号" prop="appId"> 6 <el-form-item label="应用编号" prop="appId">
14 <el-select clearable v-model="queryParams.appId" filterable placeholder="请选择应用信息"> 7 <el-select clearable v-model="queryParams.appId" filterable placeholder="请选择应用信息">
15 <el-option v-for="item in appList" :key="item.id" :label="item.name" :value="item.id" /> 8 <el-option v-for="item in appList" :key="item.id" :label="item.name" :value="item.id" />
@@ -70,12 +63,9 @@ @@ -70,12 +63,9 @@
70 <!-- 列表 --> 63 <!-- 列表 -->
71 <el-table v-loading="loading" :data="list"> 64 <el-table v-loading="loading" :data="list">
72 <el-table-column label="订单编号" align="center" prop="id" width="80"/> 65 <el-table-column label="订单编号" align="center" prop="id" width="80"/>
73 -<!-- <el-table-column label="商户名称" align="center" prop="merchantName" width="120"/>-->  
74 -<!-- <el-table-column label="应用名称" align="center" prop="appName" width="120"/>-->  
75 <el-table-column label="支付渠道" align="center" width="130"> 66 <el-table-column label="支付渠道" align="center" width="130">
76 <template v-slot="scope"> 67 <template v-slot="scope">
77 <el-popover trigger="hover" placement="top"> 68 <el-popover trigger="hover" placement="top">
78 - <p>商户名称: {{ scope.row.merchantName }}</p>  
79 <p>应用名称: {{ scope.row.appName }}</p> 69 <p>应用名称: {{ scope.row.appName }}</p>
80 <p>渠道名称: {{ scope.row.channelCodeName }}</p> 70 <p>渠道名称: {{ scope.row.channelCodeName }}</p>
81 <div slot="reference" class="name-wrapper"> 71 <div slot="reference" class="name-wrapper">
@@ -86,12 +76,10 @@ @@ -86,12 +76,10 @@
86 </el-table-column> 76 </el-table-column>
87 <el-table-column label="支付订单" align="left" width="280"> 77 <el-table-column label="支付订单" align="left" width="280">
88 <template v-slot="scope"> 78 <template v-slot="scope">
89 - <p class="order-font"><el-tag size="mini">商户</el-tag> {{scope.row.merchantOrderId}}</p>  
90 - <p class="order-font"><el-tag size="mini" type="warning">支付</el-tag> {{scope.row.channelOrderNo}}</p> 79 + <p class="order-font"><el-tag size="mini">商户单号</el-tag> {{scope.row.merchantOrderId}}</p>
  80 + <p class="order-font"><el-tag size="mini" type="warning">支付单号</el-tag> {{scope.row.channelOrderNo}}</p>
91 </template> 81 </template>
92 </el-table-column> 82 </el-table-column>
93 -<!-- <el-table-column label="商户订单编号" align="center" prop="merchantOrderId" width="140"/>-->  
94 -<!-- <el-table-column label="渠道订单号" align="center" prop="channelOrderNo" width="140"/>-->  
95 <el-table-column label="商品标题" align="center" prop="subject" width="180" :show-overflow-tooltip="true"/> 83 <el-table-column label="商品标题" align="center" prop="subject" width="180" :show-overflow-tooltip="true"/>
96 <el-table-column label="支付金额" align="center" prop="amount" width="100"> 84 <el-table-column label="支付金额" align="center" prop="amount" width="100">
97 <template v-slot="scope"> 85 <template v-slot="scope">
@@ -149,7 +137,6 @@ @@ -149,7 +137,6 @@
149 <!-- 对话框(添加 / 修改) --> 137 <!-- 对话框(添加 / 修改) -->
150 <el-dialog title="订单详情" :visible.sync="open" width="50%"> 138 <el-dialog title="订单详情" :visible.sync="open" width="50%">
151 <el-descriptions :column="2" label-class-name="desc-label"> 139 <el-descriptions :column="2" label-class-name="desc-label">
152 - <el-descriptions-item label="商户名称">{{ orderDetail.merchantName }}</el-descriptions-item>  
153 <el-descriptions-item label="应用名称">{{ orderDetail.appName }}</el-descriptions-item> 140 <el-descriptions-item label="应用名称">{{ orderDetail.appName }}</el-descriptions-item>
154 <el-descriptions-item label="商品名称">{{ orderDetail.subject }}</el-descriptions-item> 141 <el-descriptions-item label="商品名称">{{ orderDetail.subject }}</el-descriptions-item>
155 </el-descriptions> 142 </el-descriptions>
@@ -215,14 +202,11 @@ @@ -215,14 +202,11 @@
215 </template> 202 </template>
216 203
217 <script> 204 <script>
218 -import { getOrderDetail, getOrderPage, exportOrderExcel} from "@/api/pay/order";  
219 -import {getMerchantListByName} from "@/api/pay/merchant";  
220 -import {getAppListByMerchantId} from "@/api/pay/app";  
221 -import {DICT_TYPE, getDictDatas} from "@/utils/dict"; 205 +import { getOrderDetail, getOrderPage, exportOrderExcel } from "@/api/pay/order";
  206 +import { DICT_TYPE, getDictDatas } from "@/utils/dict";
222 import { getNowDateTime} from "@/utils/ruoyi"; 207 import { getNowDateTime} from "@/utils/ruoyi";
223 208
224 const defaultOrderDetail = { 209 const defaultOrderDetail = {
225 - merchantName: '',  
226 appName: '', 210 appName: '',
227 channelCodeName: '', 211 channelCodeName: '',
228 subject: '', 212 subject: '',
@@ -266,11 +250,10 @@ export default { @@ -266,11 +250,10 @@ export default {
266 title: "", 250 title: "",
267 // 是否显示弹出层 251 // 是否显示弹出层
268 open: false, 252 open: false,
269 - // 查询参数 253 + // 查询参数 TODO 芋艿:多余字段的清理
270 queryParams: { 254 queryParams: {
271 pageNo: 1, 255 pageNo: 1,
272 pageSize: 10, 256 pageSize: 10,
273 - merchantId: null,  
274 appId: null, 257 appId: null,
275 channelId: null, 258 channelId: null,
276 channelCode: null, 259 channelCode: null,
@@ -386,32 +369,12 @@ export default { @@ -386,32 +369,12 @@ export default {
386 this.$download.excel(response, '支付订单.xls'); 369 this.$download.excel(response, '支付订单.xls');
387 }).catch(() => {}); 370 }).catch(() => {});
388 }, 371 },
389 - /**  
390 - * 根据商户名称模糊匹配商户信息  
391 - * @param name 商户名称  
392 - */  
393 - handleGetMerchantListByName(name) {  
394 - getMerchantListByName(name).then(response => {  
395 - this.merchantList = response.data;  
396 - this.merchantLoading = false;  
397 - });  
398 - },  
399 - /**  
400 - * 根据商户 ID 查询支付应用信息  
401 - */  
402 - handleGetAppListByMerchantId() {  
403 - this.queryParams.appId = null;  
404 - getAppListByMerchantId(this.queryParams.merchantId).then(response => {  
405 - this.appList = response.data;  
406 - });  
407 - }  
408 } 372 }
409 }; 373 };
410 </script> 374 </script>
411 <style> 375 <style>
412 .desc-label { 376 .desc-label {
413 font-weight: bold; 377 font-weight: bold;
414 -  
415 } 378 }
416 379
417 .tag-purple { 380 .tag-purple {
yudao-ui-admin/src/views/pay/refund/index.vue
@@ -2,13 +2,6 @@ @@ -2,13 +2,6 @@
2 <div class="app-container"> 2 <div class="app-container">
3 <!-- 搜索工作栏 --> 3 <!-- 搜索工作栏 -->
4 <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="120px"> 4 <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="120px">
5 - <el-form-item label="所属商户" prop="merchantId">  
6 - <el-select v-model="queryParams.merchantId" clearable @clear="()=>{queryParams.merchantId = null}"  
7 - filterable remote reserve-keyword placeholder="请选择所属商户" @change="handleGetAppListByMerchantId"  
8 - :remote-method="handleGetMerchantListByName" :loading="merchantLoading">  
9 - <el-option v-for="item in merchantList" :key="item.id" :label="item.name" :value="item.id" />  
10 - </el-select>  
11 - </el-form-item>  
12 <el-form-item label="应用编号" prop="appId"> 5 <el-form-item label="应用编号" prop="appId">
13 <el-select clearable v-model="queryParams.appId" filterable placeholder="请选择应用信息"> 6 <el-select clearable v-model="queryParams.appId" filterable placeholder="请选择应用信息">
14 <el-option v-for="item in appList" :key="item.id" :label="item.name" :value="item.id" /> 7 <el-option v-for="item in appList" :key="item.id" :label="item.name" :value="item.id" />
@@ -65,12 +58,9 @@ @@ -65,12 +58,9 @@
65 <!-- 列表 --> 58 <!-- 列表 -->
66 <el-table v-loading="loading" :data="list"> 59 <el-table v-loading="loading" :data="list">
67 <el-table-column label="编号" align="center" prop="id"/> 60 <el-table-column label="编号" align="center" prop="id"/>
68 - <!-- <el-table-column label="商户名称" align="center" prop="merchantName" width="120"/>-->  
69 - <!-- <el-table-column label="应用名称" align="center" prop="appName" width="120"/>-->  
70 <el-table-column label="支付渠道" align="center" width="130"> 61 <el-table-column label="支付渠道" align="center" width="130">
71 <template v-slot="scope"> 62 <template v-slot="scope">
72 <el-popover trigger="hover" placement="top"> 63 <el-popover trigger="hover" placement="top">
73 - <p>商户名称: {{ scope.row.merchantName }}</p>  
74 <p>应用名称: {{ scope.row.appName }}</p> 64 <p>应用名称: {{ scope.row.appName }}</p>
75 <p>渠道名称: {{ scope.row.channelCodeName }}</p> 65 <p>渠道名称: {{ scope.row.channelCodeName }}</p>
76 <div slot="reference" class="name-wrapper"> 66 <div slot="reference" class="name-wrapper">
@@ -156,7 +146,6 @@ @@ -156,7 +146,6 @@
156 <!-- 对话框(添加 / 修改) --> 146 <!-- 对话框(添加 / 修改) -->
157 <el-dialog title="退款订单详情" :visible.sync="open" width="700px" append-to-body> 147 <el-dialog title="退款订单详情" :visible.sync="open" width="700px" append-to-body>
158 <el-descriptions :column="2" label-class-name="desc-label"> 148 <el-descriptions :column="2" label-class-name="desc-label">
159 - <el-descriptions-item label="商户名称">{{ refundDetail.merchantName }}</el-descriptions-item>  
160 <el-descriptions-item label="应用名称">{{ refundDetail.appName }}</el-descriptions-item> 149 <el-descriptions-item label="应用名称">{{ refundDetail.appName }}</el-descriptions-item>
161 <el-descriptions-item label="商品名称">{{ refundDetail.subject }}</el-descriptions-item> 150 <el-descriptions-item label="商品名称">{{ refundDetail.subject }}</el-descriptions-item>
162 </el-descriptions> 151 </el-descriptions>
@@ -221,14 +210,9 @@ @@ -221,14 +210,9 @@
221 210
222 <script> 211 <script>
223 import {getRefundPage, exportRefundExcel, getRefund} from "@/api/pay/refund"; 212 import {getRefundPage, exportRefundExcel, getRefund} from "@/api/pay/refund";
224 -import {getMerchantListByName} from "@/api/pay/merchant";  
225 -import {getAppListByMerchantId} from "@/api/pay/app";  
226 -import {DICT_TYPE, getDictDatas} from "@/utils/dict";  
227 -import {  
228 - PayOrderRefundStatusEnum,  
229 - PayRefundStatusEnum  
230 -} from "@/utils/constants";  
231 -import {getNowDateTime} from "@/utils/ruoyi"; 213 +import { DICT_TYPE, getDictDatas } from "@/utils/dict";
  214 +import { PayOrderRefundStatusEnum, PayRefundStatusEnum } from "@/utils/constants";
  215 +import { getNowDateTime } from "@/utils/ruoyi";
232 216
233 const defaultRefundDetail = { 217 const defaultRefundDetail = {
234 id: null, 218 id: null,
@@ -244,8 +228,6 @@ const defaultRefundDetail = { @@ -244,8 +228,6 @@ const defaultRefundDetail = {
244 channelRefundNo: '', 228 channelRefundNo: '',
245 createTime: null, 229 createTime: null,
246 expireTime: null, 230 expireTime: null,
247 - merchantId: null,  
248 - merchantName: '',  
249 merchantOrderId: '', 231 merchantOrderId: '',
250 merchantRefundNo: '', 232 merchantRefundNo: '',
251 notifyStatus: null, 233 notifyStatus: null,
@@ -284,7 +266,6 @@ export default { @@ -284,7 +266,6 @@ export default {
284 queryParams: { 266 queryParams: {
285 pageNo: 1, 267 pageNo: 1,
286 pageSize: 10, 268 pageSize: 10,
287 - merchantId: null,  
288 appId: null, 269 appId: null,
289 channelId: null, 270 channelId: null,
290 channelCode: null, 271 channelCode: null,
@@ -399,15 +380,6 @@ export default { @@ -399,15 +380,6 @@ export default {
399 }); 380 });
400 }, 381 },
401 /** 382 /**
402 - * 根据商户 ID 查询支付应用信息  
403 - */  
404 - handleGetAppListByMerchantId() {  
405 - this.queryParams.appId = null;  
406 - getAppListByMerchantId(this.queryParams.merchantId).then(response => {  
407 - this.appList = response.data;  
408 - });  
409 - },  
410 - /**  
411 * 根据退款类别得到样式名称 383 * 根据退款类别得到样式名称
412 * @param refundType 退款类别 384 * @param refundType 退款类别
413 */ 385 */