Commit 1fe6c8289973697cdc9acedb5206453de6c85d59
Merge remote-tracking branch 'yudao/feature/mall_product' into feature/mall_product
Showing
62 changed files
with
725 additions
and
148 deletions
sql/mysql/ruoyi-vue-pro.sql
| @@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
| 11 | Target Server Version : 80034 | 11 | Target Server Version : 80034 |
| 12 | File Encoding : 65001 | 12 | File Encoding : 65001 |
| 13 | 13 | ||
| 14 | - Date: 05/10/2023 12:42:16 | 14 | + Date: 14/10/2023 20:04:17 |
| 15 | */ | 15 | */ |
| 16 | 16 | ||
| 17 | SET NAMES utf8mb4; | 17 | SET NAMES utf8mb4; |
| @@ -384,7 +384,7 @@ CREATE TABLE `infra_api_error_log` ( | @@ -384,7 +384,7 @@ CREATE TABLE `infra_api_error_log` ( | ||
| 384 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | 384 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 385 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', | 385 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 386 | PRIMARY KEY (`id`) USING BTREE | 386 | PRIMARY KEY (`id`) USING BTREE |
| 387 | -) ENGINE = InnoDB AUTO_INCREMENT = 1662 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统异常日志'; | 387 | +) ENGINE = InnoDB AUTO_INCREMENT = 1734 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统异常日志'; |
| 388 | 388 | ||
| 389 | -- ---------------------------- | 389 | -- ---------------------------- |
| 390 | -- Records of infra_api_error_log | 390 | -- Records of infra_api_error_log |
| @@ -422,7 +422,7 @@ CREATE TABLE `infra_codegen_column` ( | @@ -422,7 +422,7 @@ CREATE TABLE `infra_codegen_column` ( | ||
| 422 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | 422 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 423 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | 423 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 424 | PRIMARY KEY (`id`) USING BTREE | 424 | PRIMARY KEY (`id`) USING BTREE |
| 425 | -) ENGINE = InnoDB AUTO_INCREMENT = 1778 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表字段定义'; | 425 | +) ENGINE = InnoDB AUTO_INCREMENT = 1805 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表字段定义'; |
| 426 | 426 | ||
| 427 | -- ---------------------------- | 427 | -- ---------------------------- |
| 428 | -- Records of infra_codegen_column | 428 | -- Records of infra_codegen_column |
| @@ -455,7 +455,7 @@ CREATE TABLE `infra_codegen_table` ( | @@ -455,7 +455,7 @@ CREATE TABLE `infra_codegen_table` ( | ||
| 455 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | 455 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 456 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | 456 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 457 | PRIMARY KEY (`id`) USING BTREE | 457 | PRIMARY KEY (`id`) USING BTREE |
| 458 | -) ENGINE = InnoDB AUTO_INCREMENT = 135 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表定义'; | 458 | +) ENGINE = InnoDB AUTO_INCREMENT = 137 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表定义'; |
| 459 | 459 | ||
| 460 | -- ---------------------------- | 460 | -- ---------------------------- |
| 461 | -- Records of infra_codegen_table | 461 | -- Records of infra_codegen_table |
| @@ -709,7 +709,7 @@ CREATE TABLE `member_address` ( | @@ -709,7 +709,7 @@ CREATE TABLE `member_address` ( | ||
| 709 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', | 709 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 710 | PRIMARY KEY (`id`) USING BTREE, | 710 | PRIMARY KEY (`id`) USING BTREE, |
| 711 | INDEX `idx_userId`(`user_id` ASC) USING BTREE | 711 | INDEX `idx_userId`(`user_id` ASC) USING BTREE |
| 712 | -) ENGINE = InnoDB AUTO_INCREMENT = 24 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '用户收件地址'; | 712 | +) ENGINE = InnoDB AUTO_INCREMENT = 25 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '用户收件地址'; |
| 713 | 713 | ||
| 714 | -- ---------------------------- | 714 | -- ---------------------------- |
| 715 | -- Records of member_address | 715 | -- Records of member_address |
| @@ -717,6 +717,33 @@ CREATE TABLE `member_address` ( | @@ -717,6 +717,33 @@ CREATE TABLE `member_address` ( | ||
| 717 | BEGIN; | 717 | BEGIN; |
| 718 | INSERT INTO `member_address` (`id`, `user_id`, `name`, `mobile`, `area_id`, `detail_address`, `default_status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (21, 247, 'yunai', '15601691300', 140302, '芋道源码 233 号 666 室', b'1', '1', '2022-08-01 22:46:35', '247', '2023-06-26 19:47:46', b'0', 1); | 718 | INSERT INTO `member_address` (`id`, `user_id`, `name`, `mobile`, `area_id`, `detail_address`, `default_status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (21, 247, 'yunai', '15601691300', 140302, '芋道源码 233 号 666 室', b'1', '1', '2022-08-01 22:46:35', '247', '2023-06-26 19:47:46', b'0', 1); |
| 719 | INSERT INTO `member_address` (`id`, `user_id`, `name`, `mobile`, `area_id`, `detail_address`, `default_status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (23, 247, '测试', '15601691300', 120103, '13232312', b'0', '247', '2023-06-26 19:47:40', '247', '2023-06-26 19:47:46', b'0', 1); | 719 | INSERT INTO `member_address` (`id`, `user_id`, `name`, `mobile`, `area_id`, `detail_address`, `default_status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (23, 247, '测试', '15601691300', 120103, '13232312', b'0', '247', '2023-06-26 19:47:40', '247', '2023-06-26 19:47:46', b'0', 1); |
| 720 | +INSERT INTO `member_address` (`id`, `user_id`, `name`, `mobile`, `area_id`, `detail_address`, `default_status`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (24, 248, '芋头', '15601691234', 110101, '灌灌灌灌灌', b'1', '248', '2023-10-06 10:08:24', '248', '2023-10-06 10:08:24', b'0', 1); | ||
| 721 | +COMMIT; | ||
| 722 | + | ||
| 723 | +-- ---------------------------- | ||
| 724 | +-- Table structure for member_config | ||
| 725 | +-- ---------------------------- | ||
| 726 | +DROP TABLE IF EXISTS `member_config`; | ||
| 727 | +CREATE TABLE `member_config` ( | ||
| 728 | + `id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增主键', | ||
| 729 | + `point_trade_deduct_enable` bit(1) NOT NULL COMMENT '是否开启积分抵扣', | ||
| 730 | + `point_trade_deduct_unit_price` int NOT NULL COMMENT '积分抵扣(单位:分)', | ||
| 731 | + `point_trade_deduct_max_price` int NULL DEFAULT NULL COMMENT '积分抵扣最大值', | ||
| 732 | + `point_trade_give_point` bigint NULL DEFAULT NULL COMMENT '1 元赠送多少分', | ||
| 733 | + `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者', | ||
| 734 | + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | ||
| 735 | + `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者', | ||
| 736 | + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | ||
| 737 | + `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | ||
| 738 | + `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', | ||
| 739 | + PRIMARY KEY (`id`) USING BTREE | ||
| 740 | +) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '会员配置表'; | ||
| 741 | + | ||
| 742 | +-- ---------------------------- | ||
| 743 | +-- Records of member_config | ||
| 744 | +-- ---------------------------- | ||
| 745 | +BEGIN; | ||
| 746 | +INSERT INTO `member_config` (`id`, `point_trade_deduct_enable`, `point_trade_deduct_unit_price`, `point_trade_deduct_max_price`, `point_trade_give_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (5, b'1', 100, 2, 3, '1', '2023-08-20 09:54:42', '1', '2023-10-01 23:44:01', b'0', 1); | ||
| 720 | COMMIT; | 747 | COMMIT; |
| 721 | 748 | ||
| 722 | -- ---------------------------- | 749 | -- ---------------------------- |
| @@ -741,7 +768,7 @@ CREATE TABLE `member_experience_record` ( | @@ -741,7 +768,7 @@ CREATE TABLE `member_experience_record` ( | ||
| 741 | PRIMARY KEY (`id`) USING BTREE, | 768 | PRIMARY KEY (`id`) USING BTREE, |
| 742 | INDEX `idx_user_id`(`user_id` ASC) USING BTREE COMMENT '会员经验记录-用户编号', | 769 | INDEX `idx_user_id`(`user_id` ASC) USING BTREE COMMENT '会员经验记录-用户编号', |
| 743 | INDEX `idx_user_biz_type`(`user_id` ASC, `biz_type` ASC) USING BTREE COMMENT '会员经验记录-用户业务类型' | 770 | INDEX `idx_user_biz_type`(`user_id` ASC, `biz_type` ASC) USING BTREE COMMENT '会员经验记录-用户业务类型' |
| 744 | -) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '会员经验记录'; | 771 | +) ENGINE = InnoDB AUTO_INCREMENT = 41 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '会员经验记录'; |
| 745 | 772 | ||
| 746 | -- ---------------------------- | 773 | -- ---------------------------- |
| 747 | -- Records of member_experience_record | 774 | -- Records of member_experience_record |
| @@ -759,6 +786,27 @@ INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, ` | @@ -759,6 +786,27 @@ INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, ` | ||
| 759 | INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (10, 247, '97', 2, '下单奖励', '下单获得 384945 经验', 384945, 5529343, NULL, '2023-10-02 10:21:12', NULL, '2023-10-02 10:21:12', b'0', 1); | 786 | INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (10, 247, '97', 2, '下单奖励', '下单获得 384945 经验', 384945, 5529343, NULL, '2023-10-02 10:21:12', NULL, '2023-10-02 10:21:12', b'0', 1); |
| 760 | INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (11, 247, '11', 3, '退单扣除', '退单获得 -699900 经验', -699900, 4829443, NULL, '2023-10-02 15:19:37', NULL, '2023-10-02 15:19:37', b'0', 1); | 787 | INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (11, 247, '11', 3, '退单扣除', '退单获得 -699900 经验', -699900, 4829443, NULL, '2023-10-02 15:19:37', NULL, '2023-10-02 15:19:37', b'0', 1); |
| 761 | INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (12, 247, '98', 2, '下单奖励', '下单获得 384945 经验', 384945, 5214388, NULL, '2023-10-02 15:38:39', NULL, '2023-10-02 15:38:39', b'0', 1); | 788 | INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (12, 247, '98', 2, '下单奖励', '下单获得 384945 经验', 384945, 5214388, NULL, '2023-10-02 15:38:39', NULL, '2023-10-02 15:38:39', b'0', 1); |
| 789 | +INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (13, 247, '102', 2, '下单奖励', '下单获得 201 经验', 201, 5214589, NULL, '2023-10-05 23:05:29', NULL, '2023-10-05 23:05:29', b'0', 1); | ||
| 790 | +INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (14, 247, '107', 2, '下单奖励', '下单获得 201 经验', 201, 5214790, NULL, '2023-10-05 23:23:00', NULL, '2023-10-05 23:23:00', b'0', 1); | ||
| 791 | +INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (15, 248, '108', 2, '下单奖励', '下单获得 275 经验', 275, 275, NULL, '2023-10-06 10:13:44', NULL, '2023-10-06 10:13:44', b'0', 1); | ||
| 792 | +INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (16, 248, '118', 2, '下单奖励', '下单获得 203 经验', 203, 478, NULL, '2023-10-07 06:58:52', NULL, '2023-10-07 06:58:52', b'0', 1); | ||
| 793 | +INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (17, 248, '119', 2, '下单奖励', '下单获得 700100 经验', 700100, 700578, NULL, '2023-10-10 23:02:36', NULL, '2023-10-10 23:02:36', b'0', 1); | ||
| 794 | +INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (21, 248, '15', 3, '退单扣除', '退单获得 -700100 经验', -700100, 478, '1', '2023-10-10 23:11:19', '1', '2023-10-10 23:11:19', b'0', 1); | ||
| 795 | +INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (22, 248, '119', 3, '退单扣除', '退单获得 -700100 经验', -700100, 0, '1', '2023-10-10 23:11:23', '1', '2023-10-10 23:11:23', b'0', 1); | ||
| 796 | +INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (23, 248, '120', 2, '下单奖励', '下单获得 700100 经验', 700100, 700100, NULL, '2023-10-10 23:16:09', NULL, '2023-10-10 23:16:09', b'0', 1); | ||
| 797 | +INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (24, 248, '16', 3, '退单扣除', '退单获得 -700100 经验', -700100, 0, '1', '2023-10-10 23:20:10', '1', '2023-10-10 23:20:10', b'0', 1); | ||
| 798 | +INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (25, 248, '120', 3, '退单扣除', '退单获得 -700100 经验', -700100, 0, '1', '2023-10-10 23:20:16', '1', '2023-10-10 23:20:16', b'0', 1); | ||
| 799 | +INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (26, 248, '121', 2, '下单奖励', '下单获得 700100 经验', 700100, 700100, NULL, '2023-10-10 23:23:30', NULL, '2023-10-10 23:23:30', b'0', 1); | ||
| 800 | +INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (27, 248, '17', 3, '退单扣除', '退单获得 -700100 经验', -700100, 0, '1', '2023-10-10 23:23:50', '1', '2023-10-10 23:23:50', b'0', 1); | ||
| 801 | +INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (28, 248, '121', 3, '退单扣除', '退单获得 -700100 经验', -700100, 0, '1', '2023-10-10 23:23:55', '1', '2023-10-10 23:23:55', b'0', 1); | ||
| 802 | +INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (29, 248, '122', 2, '下单奖励', '下单获得 700100 经验', 700100, 700100, NULL, '2023-10-10 23:28:07', NULL, '2023-10-10 23:28:07', b'0', 1); | ||
| 803 | +INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (30, 248, '18', 3, '退单扣除', '退单获得 -700100 经验', -700100, 0, '1', '2023-10-10 23:29:55', '1', '2023-10-10 23:29:55', b'0', 1); | ||
| 804 | +INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (31, 248, '123', 2, '下单奖励', '下单获得 300 经验', 300, 300, NULL, '2023-10-10 23:44:45', NULL, '2023-10-10 23:44:45', b'0', 1); | ||
| 805 | +INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (32, 248, '124', 2, '下单奖励', '下单获得 560120 经验', 560120, 560420, NULL, '2023-10-11 07:03:46', NULL, '2023-10-11 07:03:46', b'0', 1); | ||
| 806 | +INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (33, 248, '19', 3, '退单扣除', '退单获得 -300 经验', -300, 560120, '1', '2023-10-11 07:04:28', '1', '2023-10-11 07:04:28', b'0', 1); | ||
| 807 | +INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (34, 248, '125', 11, '下单奖励', '下单获得 700100 经验', 700100, 700100, NULL, '2023-10-11 07:33:29', NULL, '2023-10-11 07:33:29', b'0', 1); | ||
| 808 | +INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (37, 248, '127', 11, '下单奖励', '下单获得 385145 经验', 385145, 385145, NULL, '2023-10-11 07:36:44', NULL, '2023-10-11 07:36:44', b'0', 1); | ||
| 809 | +INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `experience`, `total_experience`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (40, 248, '120', 13, '下单奖励(单个取消)', '退款订单获得 -385145 经验', -385145, 0, '1', '2023-10-11 07:39:26', '1', '2023-10-11 07:39:26', b'0', 1); | ||
| 762 | COMMIT; | 810 | COMMIT; |
| 763 | 811 | ||
| 764 | -- ---------------------------- | 812 | -- ---------------------------- |
| @@ -835,7 +883,7 @@ CREATE TABLE `member_level_record` ( | @@ -835,7 +883,7 @@ CREATE TABLE `member_level_record` ( | ||
| 835 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', | 883 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 836 | PRIMARY KEY (`id`) USING BTREE, | 884 | PRIMARY KEY (`id`) USING BTREE, |
| 837 | INDEX `idx_user_id`(`user_id` ASC) USING BTREE COMMENT '会员等级记录-用户编号' | 885 | INDEX `idx_user_id`(`user_id` ASC) USING BTREE COMMENT '会员等级记录-用户编号' |
| 838 | -) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '会员等级记录'; | 886 | +) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '会员等级记录'; |
| 839 | 887 | ||
| 840 | -- ---------------------------- | 888 | -- ---------------------------- |
| 841 | -- Records of member_level_record | 889 | -- Records of member_level_record |
| @@ -865,7 +913,7 @@ CREATE TABLE `member_point_record` ( | @@ -865,7 +913,7 @@ CREATE TABLE `member_point_record` ( | ||
| 865 | PRIMARY KEY (`id`) USING BTREE, | 913 | PRIMARY KEY (`id`) USING BTREE, |
| 866 | INDEX `index_userId`(`user_id` ASC) USING BTREE, | 914 | INDEX `index_userId`(`user_id` ASC) USING BTREE, |
| 867 | INDEX `index_title`(`title` ASC) USING BTREE | 915 | INDEX `index_title`(`title` ASC) USING BTREE |
| 868 | -) ENGINE = InnoDB AUTO_INCREMENT = 32 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户积分记录'; | 916 | +) ENGINE = InnoDB AUTO_INCREMENT = 60 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户积分记录'; |
| 869 | 917 | ||
| 870 | -- ---------------------------- | 918 | -- ---------------------------- |
| 871 | -- Records of member_point_record | 919 | -- Records of member_point_record |
| @@ -902,6 +950,27 @@ INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title | @@ -902,6 +950,27 @@ INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title | ||
| 902 | INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (29, 247, '96', 10, '订单奖励', '下单获得 20997 积分', 20997, 10547883, NULL, '2023-10-02 09:40:20', NULL, '2023-10-02 09:40:20', b'0', 1); | 950 | INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (29, 247, '96', 10, '订单奖励', '下单获得 20997 积分', 20997, 10547883, NULL, '2023-10-02 09:40:20', NULL, '2023-10-02 09:40:20', b'0', 1); |
| 903 | INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (30, 247, '97', 10, '订单奖励', '下单获得 11548 积分', 11548, 10559431, NULL, '2023-10-02 10:21:12', NULL, '2023-10-02 10:21:12', b'0', 1); | 951 | INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (30, 247, '97', 10, '订单奖励', '下单获得 11548 积分', 11548, 10559431, NULL, '2023-10-02 10:21:12', NULL, '2023-10-02 10:21:12', b'0', 1); |
| 904 | INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (31, 247, '98', 10, '订单奖励', '下单获得 11548 积分', 11548, 10570979, NULL, '2023-10-02 15:38:39', NULL, '2023-10-02 15:38:39', b'0', 1); | 952 | INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (31, 247, '98', 10, '订单奖励', '下单获得 11548 积分', 11548, 10570979, NULL, '2023-10-02 15:38:39', NULL, '2023-10-02 15:38:39', b'0', 1); |
| 953 | +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (32, 247, '102', 10, '订单奖励', '下单获得 6 积分', 6, 10570985, NULL, '2023-10-05 23:05:29', NULL, '2023-10-05 23:05:29', b'0', 1); | ||
| 954 | +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (33, 247, '107', 10, '订单奖励', '下单获得 6 积分', 6, 10570991, NULL, '2023-10-05 23:23:00', NULL, '2023-10-05 23:23:00', b'0', 1); | ||
| 955 | +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (34, 248, '108', 10, '订单奖励', '下单获得 8 积分', 8, 8, NULL, '2023-10-06 10:13:44', NULL, '2023-10-06 10:13:44', b'0', 1); | ||
| 956 | +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (35, 248, '118', 10, '订单奖励', '下单获得 6 积分', 6, 14, NULL, '2023-10-07 06:58:51', NULL, '2023-10-07 06:58:51', b'0', 1); | ||
| 957 | +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (36, 248, '119', 10, '订单奖励', '下单获得 21003 积分', 21003, 21017, NULL, '2023-10-10 23:02:35', NULL, '2023-10-10 23:02:35', b'0', 1); | ||
| 958 | +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (40, 248, '15', 14, '订单退款', '订单退款,扣除赠送的 -21003 积分', -21003, 2080697, '1', '2023-10-10 23:11:19', '1', '2023-10-10 23:11:19', b'0', 1); | ||
| 959 | +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (41, 248, '119', 11, '订单取消', '订单取消,退还 -21003 积分', -21003, 2059694, '1', '2023-10-10 23:11:23', '1', '2023-10-10 23:11:23', b'0', 1); | ||
| 960 | +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (42, 248, '120', 10, '订单奖励', '下单获得 21003 积分', 21003, 2080697, NULL, '2023-10-10 23:16:09', NULL, '2023-10-10 23:16:09', b'0', 1); | ||
| 961 | +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (43, 248, '16', 14, '订单退款', '订单退款,扣除赠送的 -21003 积分', -21003, 2059694, '1', '2023-10-10 23:20:10', '1', '2023-10-10 23:20:10', b'0', 1); | ||
| 962 | +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (44, 248, '120', 11, '订单取消', '订单取消,退还 -21003 积分', -21003, 2038691, '1', '2023-10-10 23:20:16', '1', '2023-10-10 23:20:16', b'0', 1); | ||
| 963 | +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (45, 248, '121', 10, '订单奖励', '下单获得 21003 积分', 21003, 2059694, NULL, '2023-10-10 23:23:30', NULL, '2023-10-10 23:23:30', b'0', 1); | ||
| 964 | +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (46, 248, '17', 14, '订单退款', '订单退款,扣除赠送的 -21003 积分', -21003, 2038691, '1', '2023-10-10 23:23:50', '1', '2023-10-10 23:23:50', b'0', 1); | ||
| 965 | +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (47, 248, '121', 11, '订单取消', '订单取消,退还 -21003 积分', -21003, 2017688, '1', '2023-10-10 23:23:55', '1', '2023-10-10 23:23:55', b'0', 1); | ||
| 966 | +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (48, 248, '122', 10, '订单奖励', '下单获得 21003 积分', 21003, 2038691, NULL, '2023-10-10 23:28:07', NULL, '2023-10-10 23:28:07', b'0', 1); | ||
| 967 | +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (49, 248, '18', 14, '订单退款', '订单退款,扣除赠送的 -21003 积分', -21003, 2017688, '1', '2023-10-10 23:29:55', '1', '2023-10-10 23:29:55', b'0', 1); | ||
| 968 | +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (50, 248, '123', 10, '订单奖励', '下单获得 9 积分', 9, 2017697, NULL, '2023-10-10 23:44:45', NULL, '2023-10-10 23:44:45', b'0', 1); | ||
| 969 | +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (51, 248, '124', 10, '订单奖励', '下单获得 16803 积分', 16803, 2034500, NULL, '2023-10-11 07:03:46', NULL, '2023-10-11 07:03:46', b'0', 1); | ||
| 970 | +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (52, 248, '19', 14, '订单退款', '订单退款,扣除赠送的 -9 积分', -9, 2034491, '1', '2023-10-11 07:04:28', '1', '2023-10-11 07:04:28', b'0', 1); | ||
| 971 | +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (53, 248, '125', 21, '订单积分奖励', '下单获得 21003 积分', 21003, 21003, NULL, '2023-10-11 07:33:29', NULL, '2023-10-11 07:33:29', b'0', 1); | ||
| 972 | +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (56, 248, '127', 21, '订单积分奖励', '下单获得 11554 积分', 11554, 11554, NULL, '2023-10-11 07:36:44', NULL, '2023-10-11 07:36:44', b'0', 1); | ||
| 973 | +INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title`, `description`, `point`, `total_point`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (59, 248, '120', 23, '订单积分奖励(单个退款)', '订单退款,扣除赠送的 -11554 积分', -11554, 0, '1', '2023-10-11 07:39:26', '1', '2023-10-11 07:39:26', b'0', 1); | ||
| 905 | COMMIT; | 974 | COMMIT; |
| 906 | 975 | ||
| 907 | -- ---------------------------- | 976 | -- ---------------------------- |
| @@ -1092,7 +1161,7 @@ CREATE TABLE `system_dict_data` ( | @@ -1092,7 +1161,7 @@ CREATE TABLE `system_dict_data` ( | ||
| 1092 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | 1161 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 1093 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | 1162 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 1094 | PRIMARY KEY (`id`) USING BTREE | 1163 | PRIMARY KEY (`id`) USING BTREE |
| 1095 | -) ENGINE = InnoDB AUTO_INCREMENT = 1386 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典数据表'; | 1164 | +) ENGINE = InnoDB AUTO_INCREMENT = 1398 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典数据表'; |
| 1096 | 1165 | ||
| 1097 | -- ---------------------------- | 1166 | -- ---------------------------- |
| 1098 | -- Records of system_dict_data | 1167 | -- Records of system_dict_data |
| @@ -1298,7 +1367,7 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st | @@ -1298,7 +1367,7 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st | ||
| 1298 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1244, 0, '按件', '1', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:46:40', '1', '2023-05-21 22:46:40', b'0'); | 1367 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1244, 0, '按件', '1', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:46:40', '1', '2023-05-21 22:46:40', b'0'); |
| 1299 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1245, 1, '按重量', '2', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:46:58', '1', '2023-05-21 22:46:58', b'0'); | 1368 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1245, 1, '按重量', '2', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:46:58', '1', '2023-05-21 22:46:58', b'0'); |
| 1300 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1246, 2, '按体积', '3', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:47:18', '1', '2023-05-21 22:47:18', b'0'); | 1369 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1246, 2, '按体积', '3', 'trade_delivery_express_charge_mode', 0, '', '', '', '1', '2023-05-21 22:47:18', '1', '2023-05-21 22:47:18', b'0'); |
| 1301 | -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1335, 11, '订单消费', '11', 'member_point_biz_type', 0, '', '', '', '1', '2023-06-10 12:15:27', '1', '2023-08-20 11:59:47', b'0'); | 1370 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1335, 11, '订单积分抵扣', '11', 'member_point_biz_type', 0, '', '', '', '1', '2023-06-10 12:15:27', '1', '2023-10-11 07:41:43', b'0'); |
| 1302 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1336, 1, '签到', '1', 'member_point_biz_type', 0, '', '', '', '1', '2023-06-10 12:15:48', '1', '2023-08-20 11:59:53', b'0'); | 1371 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1336, 1, '签到', '1', 'member_point_biz_type', 0, '', '', '', '1', '2023-06-10 12:15:48', '1', '2023-08-20 11:59:53', b'0'); |
| 1303 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1341, 20, '已退款', '20', 'pay_order_status', 0, 'danger', '', '已退款', '1', '2023-07-19 18:05:37', '1', '2023-07-19 18:05:37', b'0'); | 1372 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1341, 20, '已退款', '20', 'pay_order_status', 0, 'danger', '', '已退款', '1', '2023-07-19 18:05:37', '1', '2023-07-19 18:05:37', b'0'); |
| 1304 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1342, 21, '请求成功,但是结果失败', '21', 'pay_notify_status', 0, 'warning', '', '请求成功,但是结果失败', '1', '2023-07-19 18:10:47', '1', '2023-07-19 18:11:38', b'0'); | 1373 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1342, 21, '请求成功,但是结果失败', '21', 'pay_notify_status', 0, 'warning', '', '请求成功,但是结果失败', '1', '2023-07-19 18:10:47', '1', '2023-07-19 18:11:38', b'0'); |
| @@ -1308,11 +1377,11 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st | @@ -1308,11 +1377,11 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st | ||
| 1308 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1346, 1, '支付单', '1', 'pay_notify_type', 0, 'primary', '', '支付单', '1', '2023-07-20 12:23:17', '1', '2023-07-20 12:23:17', b'0'); | 1377 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1346, 1, '支付单', '1', 'pay_notify_type', 0, 'primary', '', '支付单', '1', '2023-07-20 12:23:17', '1', '2023-07-20 12:23:17', b'0'); |
| 1309 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1347, 2, '退款单', '2', 'pay_notify_type', 0, 'danger', '', NULL, '1', '2023-07-20 12:23:26', '1', '2023-07-20 12:23:26', b'0'); | 1378 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1347, 2, '退款单', '2', 'pay_notify_type', 0, 'danger', '', NULL, '1', '2023-07-20 12:23:26', '1', '2023-07-20 12:23:26', b'0'); |
| 1310 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1348, 20, '模拟支付', 'mock', 'pay_channel_code', 0, 'default', '', '模拟支付', '1', '2023-07-29 11:10:51', '1', '2023-07-29 03:14:10', b'0'); | 1379 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1348, 20, '模拟支付', 'mock', 'pay_channel_code', 0, 'default', '', '模拟支付', '1', '2023-07-29 11:10:51', '1', '2023-07-29 03:14:10', b'0'); |
| 1311 | -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1349, 12, '订单取消', '12', 'member_point_biz_type', 0, '', '', '', '1', '2023-08-20 12:00:03', '1', '2023-08-20 12:00:03', b'0'); | 1380 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1349, 12, '订单积分抵扣(整单取消)', '12', 'member_point_biz_type', 0, '', '', '', '1', '2023-08-20 12:00:03', '1', '2023-10-11 07:42:01', b'0'); |
| 1312 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1350, 0, '管理员调整', '0', 'member_experience_biz_type', 0, '', '', NULL, '', '2023-08-22 12:41:01', '', '2023-08-22 12:41:01', b'0'); | 1381 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1350, 0, '管理员调整', '0', 'member_experience_biz_type', 0, '', '', NULL, '', '2023-08-22 12:41:01', '', '2023-08-22 12:41:01', b'0'); |
| 1313 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1351, 1, '邀新奖励', '1', 'member_experience_biz_type', 0, '', '', NULL, '', '2023-08-22 12:41:01', '', '2023-08-22 12:41:01', b'0'); | 1382 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1351, 1, '邀新奖励', '1', 'member_experience_biz_type', 0, '', '', NULL, '', '2023-08-22 12:41:01', '', '2023-08-22 12:41:01', b'0'); |
| 1314 | -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1352, 2, '下单奖励', '2', 'member_experience_biz_type', 0, '', '', NULL, '', '2023-08-22 12:41:01', '', '2023-08-22 12:41:01', b'0'); | ||
| 1315 | -INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1353, 3, '退单扣除', '3', 'member_experience_biz_type', 0, '', '', NULL, '', '2023-08-22 12:41:01', '', '2023-08-22 12:41:01', b'0'); | 1383 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1352, 11, '下单奖励', '11', 'member_experience_biz_type', 0, 'success', '', NULL, '', '2023-08-22 12:41:01', '1', '2023-10-11 07:45:09', b'0'); |
| 1384 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1353, 12, '下单奖励(整单取消)', '12', 'member_experience_biz_type', 0, 'warning', '', NULL, '', '2023-08-22 12:41:01', '1', '2023-10-11 07:45:01', b'0'); | ||
| 1316 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1354, 4, '签到奖励', '4', 'member_experience_biz_type', 0, '', '', NULL, '', '2023-08-22 12:41:01', '', '2023-08-22 12:41:01', b'0'); | 1385 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1354, 4, '签到奖励', '4', 'member_experience_biz_type', 0, '', '', NULL, '', '2023-08-22 12:41:01', '', '2023-08-22 12:41:01', b'0'); |
| 1317 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1355, 5, '抽奖奖励', '5', 'member_experience_biz_type', 0, '', '', NULL, '', '2023-08-22 12:41:01', '', '2023-08-22 12:41:01', b'0'); | 1386 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1355, 5, '抽奖奖励', '5', 'member_experience_biz_type', 0, '', '', NULL, '', '2023-08-22 12:41:01', '', '2023-08-22 12:41:01', b'0'); |
| 1318 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1356, 1, '快递发货', '1', 'trade_delivery_type', 0, '', '', '', '1', '2023-08-23 00:04:55', '1', '2023-08-23 00:04:55', b'0'); | 1387 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1356, 1, '快递发货', '1', 'trade_delivery_type', 0, '', '', '', '1', '2023-08-23 00:04:55', '1', '2023-08-23 00:04:55', b'0'); |
| @@ -1348,6 +1417,15 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st | @@ -1348,6 +1417,15 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st | ||
| 1348 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1386, 1, '砍价中', '1', 'promotion_bargain_record_status', 0, 'default', '', '', '1', '2023-10-05 10:41:26', '1', '2023-10-05 10:41:26', b'0'); | 1417 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1386, 1, '砍价中', '1', 'promotion_bargain_record_status', 0, 'default', '', '', '1', '2023-10-05 10:41:26', '1', '2023-10-05 10:41:26', b'0'); |
| 1349 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1387, 2, '砍价成功', '2', 'promotion_bargain_record_status', 0, 'success', '', '', '1', '2023-10-05 10:41:39', '1', '2023-10-05 10:41:39', b'0'); | 1418 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1387, 2, '砍价成功', '2', 'promotion_bargain_record_status', 0, 'success', '', '', '1', '2023-10-05 10:41:39', '1', '2023-10-05 10:41:39', b'0'); |
| 1350 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1388, 3, '砍价失败', '3', 'promotion_bargain_record_status', 0, 'warning', '', '', '1', '2023-10-05 10:41:57', '1', '2023-10-05 10:41:57', b'0'); | 1419 | INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1388, 3, '砍价失败', '3', 'promotion_bargain_record_status', 0, 'warning', '', '', '1', '2023-10-05 10:41:57', '1', '2023-10-05 10:41:57', b'0'); |
| 1420 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1389, 1, '拼团中', '1', 'promotion_combination_record_status', 0, '', '', '', '1', '2023-10-08 07:24:44', '1', '2023-10-08 07:24:44', b'0'); | ||
| 1421 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1390, 2, '拼团成功', '2', 'promotion_combination_record_status', 0, 'success', '', '', '1', '2023-10-08 07:24:56', '1', '2023-10-08 07:24:56', b'0'); | ||
| 1422 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1391, 3, '拼团失败', '3', 'promotion_combination_record_status', 0, 'warning', '', '', '1', '2023-10-08 07:25:11', '1', '2023-10-08 07:25:11', b'0'); | ||
| 1423 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1392, 2, '管理员修改', '2', 'member_point_biz_type', 0, 'default', '', '', '1', '2023-10-11 07:41:34', '1', '2023-10-11 07:41:34', b'0'); | ||
| 1424 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1393, 13, '订单积分抵扣(单个退款)', '13', 'member_point_biz_type', 0, '', '', '', '1', '2023-10-11 07:42:29', '1', '2023-10-11 07:42:29', b'0'); | ||
| 1425 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1394, 21, '订单积分奖励', '21', 'member_point_biz_type', 0, 'default', '', '', '1', '2023-10-11 07:42:44', '1', '2023-10-11 07:42:44', b'0'); | ||
| 1426 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1395, 22, '订单积分奖励(整单取消)', '22', 'member_point_biz_type', 0, 'default', '', '', '1', '2023-10-11 07:42:55', '1', '2023-10-11 07:43:01', b'0'); | ||
| 1427 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1396, 23, '订单积分奖励(单个退款)', '23', 'member_point_biz_type', 0, 'default', '', '', '1', '2023-10-11 07:43:16', '1', '2023-10-11 07:43:16', b'0'); | ||
| 1428 | +INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`) VALUES (1397, 13, '下单奖励(单个退款)', '13', 'member_experience_biz_type', 0, 'warning', '', '', '1', '2023-10-11 07:45:24', '1', '2023-10-11 07:45:38', b'0'); | ||
| 1351 | COMMIT; | 1429 | COMMIT; |
| 1352 | 1430 | ||
| 1353 | -- ---------------------------- | 1431 | -- ---------------------------- |
| @@ -1368,7 +1446,7 @@ CREATE TABLE `system_dict_type` ( | @@ -1368,7 +1446,7 @@ CREATE TABLE `system_dict_type` ( | ||
| 1368 | `deleted_time` datetime NULL DEFAULT NULL COMMENT '删除时间', | 1446 | `deleted_time` datetime NULL DEFAULT NULL COMMENT '删除时间', |
| 1369 | PRIMARY KEY (`id`) USING BTREE, | 1447 | PRIMARY KEY (`id`) USING BTREE, |
| 1370 | UNIQUE INDEX `dict_type`(`type` ASC) USING BTREE | 1448 | UNIQUE INDEX `dict_type`(`type` ASC) USING BTREE |
| 1371 | -) ENGINE = InnoDB AUTO_INCREMENT = 183 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典类型表'; | 1449 | +) ENGINE = InnoDB AUTO_INCREMENT = 185 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典类型表'; |
| 1372 | 1450 | ||
| 1373 | -- ---------------------------- | 1451 | -- ---------------------------- |
| 1374 | -- Records of system_dict_type | 1452 | -- Records of system_dict_type |
| @@ -1441,6 +1519,7 @@ INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creat | @@ -1441,6 +1519,7 @@ INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creat | ||
| 1441 | INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (181, '佣金提现状态', 'brokerage_withdraw_status', 0, NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', b'0', NULL); | 1519 | INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (181, '佣金提现状态', 'brokerage_withdraw_status', 0, NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', b'0', NULL); |
| 1442 | INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (182, '佣金提现银行', 'brokerage_bank_name', 0, NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', b'0', NULL); | 1520 | INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (182, '佣金提现银行', 'brokerage_bank_name', 0, NULL, '', '2023-09-28 02:46:05', '', '2023-09-28 02:46:05', b'0', NULL); |
| 1443 | INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (183, '砍价记录的状态', 'promotion_bargain_record_status', 0, '', '1', '2023-10-05 10:41:08', '1', '2023-10-05 10:41:08', b'0', '1970-01-01 00:00:00'); | 1521 | INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (183, '砍价记录的状态', 'promotion_bargain_record_status', 0, '', '1', '2023-10-05 10:41:08', '1', '2023-10-05 10:41:08', b'0', '1970-01-01 00:00:00'); |
| 1522 | +INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `deleted_time`) VALUES (184, '拼团记录的状态', 'promotion_combination_record_status', 0, '', '1', '2023-10-08 07:24:25', '1', '2023-10-08 07:24:25', b'0', '1970-01-01 00:00:00'); | ||
| 1444 | COMMIT; | 1523 | COMMIT; |
| 1445 | 1524 | ||
| 1446 | -- ---------------------------- | 1525 | -- ---------------------------- |
| @@ -1489,7 +1568,7 @@ CREATE TABLE `system_login_log` ( | @@ -1489,7 +1568,7 @@ CREATE TABLE `system_login_log` ( | ||
| 1489 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | 1568 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 1490 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', | 1569 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 1491 | PRIMARY KEY (`id`) USING BTREE | 1570 | PRIMARY KEY (`id`) USING BTREE |
| 1492 | -) ENGINE = InnoDB AUTO_INCREMENT = 2516 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录'; | 1571 | +) ENGINE = InnoDB AUTO_INCREMENT = 2561 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录'; |
| 1493 | 1572 | ||
| 1494 | -- ---------------------------- | 1573 | -- ---------------------------- |
| 1495 | -- Records of system_login_log | 1574 | -- Records of system_login_log |
| @@ -1619,7 +1698,7 @@ CREATE TABLE `system_menu` ( | @@ -1619,7 +1698,7 @@ CREATE TABLE `system_menu` ( | ||
| 1619 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | 1698 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 1620 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | 1699 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 1621 | PRIMARY KEY (`id`) USING BTREE | 1700 | PRIMARY KEY (`id`) USING BTREE |
| 1622 | -) ENGINE = InnoDB AUTO_INCREMENT = 2366 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '菜单权限表'; | 1701 | +) ENGINE = InnoDB AUTO_INCREMENT = 2377 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '菜单权限表'; |
| 1623 | 1702 | ||
| 1624 | -- ---------------------------- | 1703 | -- ---------------------------- |
| 1625 | -- Records of system_menu | 1704 | -- Records of system_menu |
| @@ -2037,7 +2116,7 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i | @@ -2037,7 +2116,7 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i | ||
| 2037 | INSERT INTO `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 (2306, '拼团活动创建', 'promotion:combination-activity:create', 3, 2, 2304, '', '', '', '', 0, b'1', b'1', b'1', '1', '2023-08-12 17:54:49', '1', '2023-08-12 17:54:49', b'0'); | 2116 | INSERT INTO `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 (2306, '拼团活动创建', 'promotion:combination-activity:create', 3, 2, 2304, '', '', '', '', 0, b'1', b'1', b'1', '1', '2023-08-12 17:54:49', '1', '2023-08-12 17:54:49', b'0'); |
| 2038 | INSERT INTO `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 (2307, '拼团活动更新', 'promotion:combination-activity:update', 3, 3, 2304, '', '', '', '', 0, b'1', b'1', b'1', '1', '2023-08-12 17:55:04', '1', '2023-08-12 17:55:04', b'0'); | 2117 | INSERT INTO `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 (2307, '拼团活动更新', 'promotion:combination-activity:update', 3, 3, 2304, '', '', '', '', 0, b'1', b'1', b'1', '1', '2023-08-12 17:55:04', '1', '2023-08-12 17:55:04', b'0'); |
| 2039 | INSERT INTO `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 (2308, '拼团活动删除', 'promotion:combination-activity:delete', 3, 4, 2304, '', '', '', '', 0, b'1', b'1', b'1', '1', '2023-08-12 17:55:23', '1', '2023-08-12 17:55:23', b'0'); | 2118 | INSERT INTO `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 (2308, '拼团活动删除', 'promotion:combination-activity:delete', 3, 4, 2304, '', '', '', '', 0, b'1', b'1', b'1', '1', '2023-08-12 17:55:23', '1', '2023-08-12 17:55:23', b'0'); |
| 2040 | -INSERT INTO `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 (2309, '秒杀活动关闭', 'promotion:combination-activity:close ', 3, 5, 2304, '', '', '', '', 0, b'1', b'1', b'1', '1', '2023-08-12 17:55:37', '1', '2023-08-12 17:55:37', b'0'); | 2119 | +INSERT INTO `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 (2309, '拼团活动关闭', 'promotion:combination-activity:close', 3, 5, 2304, '', '', '', '', 0, b'1', b'1', b'1', '1', '2023-08-12 17:55:37', '1', '2023-10-06 10:51:57', b'0'); |
| 2041 | INSERT INTO `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 (2310, '砍价活动', '', 2, 4, 2030, 'bargain', 'ep:box', '', '', 0, b'1', b'1', b'1', '1', '2023-08-13 00:27:25', '1', '2023-08-13 00:27:25', b'0'); | 2120 | INSERT INTO `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 (2310, '砍价活动', '', 2, 4, 2030, 'bargain', 'ep:box', '', '', 0, b'1', b'1', b'1', '1', '2023-08-13 00:27:25', '1', '2023-08-13 00:27:25', b'0'); |
| 2042 | INSERT INTO `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 (2311, '砍价商品', '', 2, 1, 2310, 'activity', 'ep:burger', 'mall/promotion/bargain/activity/index', 'PromotionBargainActivity', 0, b'1', b'1', b'1', '1', '2023-08-13 00:28:49', '1', '2023-10-05 01:16:23', b'0'); | 2121 | INSERT INTO `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 (2311, '砍价商品', '', 2, 1, 2310, 'activity', 'ep:burger', 'mall/promotion/bargain/activity/index', 'PromotionBargainActivity', 0, b'1', b'1', b'1', '1', '2023-08-13 00:28:49', '1', '2023-10-05 01:16:23', b'0'); |
| 2043 | INSERT INTO `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 (2312, '砍价活动查询', 'promotion:bargain-activity:query', 3, 1, 2311, '', '', '', '', 0, b'1', b'1', b'1', '1', '2023-08-13 00:32:30', '1', '2023-08-13 00:32:30', b'0'); | 2122 | INSERT INTO `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 (2312, '砍价活动查询', 'promotion:bargain-activity:query', 3, 1, 2311, '', '', '', '', 0, b'1', b'1', b'1', '1', '2023-08-13 00:32:30', '1', '2023-08-13 00:32:30', b'0'); |
| @@ -2097,6 +2176,10 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i | @@ -2097,6 +2176,10 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i | ||
| 2097 | INSERT INTO `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 (2366, '砍价记录', '', 2, 2, 2310, 'record', 'ep:list', 'mall/promotion/bargain/record/index', 'PromotionBargainRecord', 0, b'1', b'1', b'1', '', '2023-10-05 02:49:06', '1', '2023-10-05 10:50:38', b'0'); | 2176 | INSERT INTO `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 (2366, '砍价记录', '', 2, 2, 2310, 'record', 'ep:list', 'mall/promotion/bargain/record/index', 'PromotionBargainRecord', 0, b'1', b'1', b'1', '', '2023-10-05 02:49:06', '1', '2023-10-05 10:50:38', b'0'); |
| 2098 | INSERT INTO `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 (2367, '砍价记录查询', 'promotion:bargain-record:query', 3, 1, 2366, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-10-05 02:49:06', '', '2023-10-05 02:49:06', b'0'); | 2177 | INSERT INTO `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 (2367, '砍价记录查询', 'promotion:bargain-record:query', 3, 1, 2366, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-10-05 02:49:06', '', '2023-10-05 02:49:06', b'0'); |
| 2099 | INSERT INTO `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 (2368, '助力记录查询', 'promotion:bargain-help:query', 3, 2, 2366, '', '', '', '', 0, b'1', b'1', b'1', '1', '2023-10-05 12:27:49', '1', '2023-10-05 12:27:49', b'0'); | 2178 | INSERT INTO `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 (2368, '助力记录查询', 'promotion:bargain-help:query', 3, 2, 2366, '', '', '', '', 0, b'1', b'1', b'1', '1', '2023-10-05 12:27:49', '1', '2023-10-05 12:27:49', b'0'); |
| 2179 | +INSERT INTO `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 (2369, '拼团记录', 'promotion:combination-record:query', 2, 2, 2303, 'record', 'ep:avatar', 'mall/promotion/combination/record/index.vue', 'PromotionCombinationRecord', 0, b'1', b'1', b'1', '1', '2023-10-08 07:10:22', '1', '2023-10-08 07:34:11', b'0'); | ||
| 2180 | +INSERT INTO `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 (2374, '会员统计', '', 2, 2, 2358, 'member', 'ep:avatar', 'statistics/member/index', 'MemberStatistics', 0, b'1', b'1', b'1', '', '2023-10-11 04:39:24', '1', '2023-10-11 12:50:22', b'0'); | ||
| 2181 | +INSERT INTO `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 (2375, '会员统计查询', 'statistics:member:query', 3, 1, 2374, '', '', '', NULL, 0, b'1', b'1', b'1', '', '2023-10-11 04:39:24', '', '2023-10-11 04:39:24', b'0'); | ||
| 2182 | +INSERT INTO `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 (2376, '订单核销', 'trade:order:pick-up', 3, 10, 2076, '', '', '', '', 0, b'1', b'1', b'1', '1', '2023-10-14 17:11:58', '1', '2023-10-14 17:11:58', b'0'); | ||
| 2100 | COMMIT; | 2183 | COMMIT; |
| 2101 | 2184 | ||
| 2102 | -- ---------------------------- | 2185 | -- ---------------------------- |
| @@ -2215,7 +2298,7 @@ CREATE TABLE `system_oauth2_access_token` ( | @@ -2215,7 +2298,7 @@ CREATE TABLE `system_oauth2_access_token` ( | ||
| 2215 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | 2298 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 2216 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', | 2299 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 2217 | PRIMARY KEY (`id`) USING BTREE | 2300 | PRIMARY KEY (`id`) USING BTREE |
| 2218 | -) ENGINE = InnoDB AUTO_INCREMENT = 2880 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌'; | 2301 | +) ENGINE = InnoDB AUTO_INCREMENT = 3022 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌'; |
| 2219 | 2302 | ||
| 2220 | -- ---------------------------- | 2303 | -- ---------------------------- |
| 2221 | -- Records of system_oauth2_access_token | 2304 | -- Records of system_oauth2_access_token |
| @@ -2337,7 +2420,7 @@ CREATE TABLE `system_oauth2_refresh_token` ( | @@ -2337,7 +2420,7 @@ CREATE TABLE `system_oauth2_refresh_token` ( | ||
| 2337 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | 2420 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 2338 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', | 2421 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 2339 | PRIMARY KEY (`id`) USING BTREE | 2422 | PRIMARY KEY (`id`) USING BTREE |
| 2340 | -) ENGINE = InnoDB AUTO_INCREMENT = 1014 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌'; | 2423 | +) ENGINE = InnoDB AUTO_INCREMENT = 1049 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌'; |
| 2341 | 2424 | ||
| 2342 | -- ---------------------------- | 2425 | -- ---------------------------- |
| 2343 | -- Records of system_oauth2_refresh_token | 2426 | -- Records of system_oauth2_refresh_token |
| @@ -2377,7 +2460,7 @@ CREATE TABLE `system_operate_log` ( | @@ -2377,7 +2460,7 @@ CREATE TABLE `system_operate_log` ( | ||
| 2377 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | 2460 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 2378 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', | 2461 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 2379 | PRIMARY KEY (`id`) USING BTREE | 2462 | PRIMARY KEY (`id`) USING BTREE |
| 2380 | -) ENGINE = InnoDB AUTO_INCREMENT = 8643 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录'; | 2463 | +) ENGINE = InnoDB AUTO_INCREMENT = 8718 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录'; |
| 2381 | 2464 | ||
| 2382 | -- ---------------------------- | 2465 | -- ---------------------------- |
| 2383 | -- Records of system_operate_log | 2466 | -- Records of system_operate_log |
| @@ -3385,7 +3468,7 @@ CREATE TABLE `system_sms_code` ( | @@ -3385,7 +3468,7 @@ CREATE TABLE `system_sms_code` ( | ||
| 3385 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', | 3468 | `tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号', |
| 3386 | PRIMARY KEY (`id`) USING BTREE, | 3469 | PRIMARY KEY (`id`) USING BTREE, |
| 3387 | INDEX `idx_mobile`(`mobile` ASC) USING BTREE COMMENT '手机号' | 3470 | INDEX `idx_mobile`(`mobile` ASC) USING BTREE COMMENT '手机号' |
| 3388 | -) ENGINE = InnoDB AUTO_INCREMENT = 515 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '手机验证码'; | 3471 | +) ENGINE = InnoDB AUTO_INCREMENT = 531 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '手机验证码'; |
| 3389 | 3472 | ||
| 3390 | -- ---------------------------- | 3473 | -- ---------------------------- |
| 3391 | -- Records of system_sms_code | 3474 | -- Records of system_sms_code |
| @@ -3428,7 +3511,7 @@ CREATE TABLE `system_sms_log` ( | @@ -3428,7 +3511,7 @@ CREATE TABLE `system_sms_log` ( | ||
| 3428 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | 3511 | `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', |
| 3429 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | 3512 | `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', |
| 3430 | PRIMARY KEY (`id`) USING BTREE | 3513 | PRIMARY KEY (`id`) USING BTREE |
| 3431 | -) ENGINE = InnoDB AUTO_INCREMENT = 426 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '短信日志'; | 3514 | +) ENGINE = InnoDB AUTO_INCREMENT = 442 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '短信日志'; |
| 3432 | 3515 | ||
| 3433 | -- ---------------------------- | 3516 | -- ---------------------------- |
| 3434 | -- Records of system_sms_log | 3517 | -- Records of system_sms_log |
| @@ -3701,7 +3784,7 @@ CREATE TABLE `system_users` ( | @@ -3701,7 +3784,7 @@ CREATE TABLE `system_users` ( | ||
| 3701 | -- Records of system_users | 3784 | -- Records of system_users |
| 3702 | -- ---------------------------- | 3785 | -- ---------------------------- |
| 3703 | BEGIN; | 3786 | BEGIN; |
| 3704 | -INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '芋道源码', '管理员', 103, '[1]', 'aoteman@126.com', '15612345678', 1, 'http://test.yudao.iocoder.cn/e1fdd7271685ec143a0900681606406621717a666ad0b2798b096df41422b32f.png', 0, '0:0:0:0:0:0:0:1', '2023-10-05 12:34:11', 'admin', '2021-01-05 17:03:47', NULL, '2023-10-05 12:34:11', b'0', 1); | 3787 | +INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (1, 'admin', '$2a$10$mRMIYLDtRHlf6.9ipiqH1.Z.bh/R9dO9d5iHiGYPigi6r5KOoR2Wm', '芋道源码', '管理员', 103, '[1]', 'aoteman@126.com', '15612345678', 1, 'http://test.yudao.iocoder.cn/e1fdd7271685ec143a0900681606406621717a666ad0b2798b096df41422b32f.png', 0, '0:0:0:0:0:0:0:1', '2023-10-14 17:12:19', 'admin', '2021-01-05 17:03:47', NULL, '2023-10-14 17:12:19', b'0', 1); |
| 3705 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (100, 'yudao', '$2a$10$11U48RhyJ5pSBYWSn12AD./ld671.ycSzJHbyrtpeoMeYiw31eo8a', '芋道', '不要吓我', 104, '[1]', 'yudao@iocoder.cn', '15601691300', 1, '', 1, '127.0.0.1', '2022-07-09 23:03:33', '', '2021-01-07 09:07:17', NULL, '2022-07-09 23:03:33', b'0', 1); | 3788 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (100, 'yudao', '$2a$10$11U48RhyJ5pSBYWSn12AD./ld671.ycSzJHbyrtpeoMeYiw31eo8a', '芋道', '不要吓我', 104, '[1]', 'yudao@iocoder.cn', '15601691300', 1, '', 1, '127.0.0.1', '2022-07-09 23:03:33', '', '2021-01-07 09:07:17', NULL, '2022-07-09 23:03:33', b'0', 1); |
| 3706 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (103, 'yuanma', '$2a$10$YMpimV4T6BtDhIaA8jSW.u8UTGBeGhc/qwXP4oxoMr4mOw9.qttt6', '源码', NULL, 106, NULL, 'yuanma@iocoder.cn', '15601701300', 0, '', 0, '127.0.0.1', '2022-07-08 01:26:27', '', '2021-01-13 23:50:35', NULL, '2022-07-08 01:26:27', b'0', 1); | 3789 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (103, 'yuanma', '$2a$10$YMpimV4T6BtDhIaA8jSW.u8UTGBeGhc/qwXP4oxoMr4mOw9.qttt6', '源码', NULL, 106, NULL, 'yuanma@iocoder.cn', '15601701300', 0, '', 0, '127.0.0.1', '2022-07-08 01:26:27', '', '2021-01-13 23:50:35', NULL, '2022-07-08 01:26:27', b'0', 1); |
| 3707 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (104, 'test', '$2a$10$GP8zvqHB//TekuzYZSBYAuBQJiNq1.fxQVDYJ.uBCOnWCtDVKE4H6', '测试号', NULL, 107, '[1,2]', '111@qq.com', '15601691200', 1, '', 0, '0:0:0:0:0:0:0:1', '2023-09-24 18:21:19', '', '2021-01-21 02:13:53', NULL, '2023-09-24 18:21:19', b'0', 1); | 3790 | INSERT INTO `system_users` (`id`, `username`, `password`, `nickname`, `remark`, `dept_id`, `post_ids`, `email`, `mobile`, `sex`, `avatar`, `status`, `login_ip`, `login_date`, `creator`, `create_time`, `updater`, `update_time`, `deleted`, `tenant_id`) VALUES (104, 'test', '$2a$10$GP8zvqHB//TekuzYZSBYAuBQJiNq1.fxQVDYJ.uBCOnWCtDVKE4H6', '测试号', NULL, 107, '[1,2]', '111@qq.com', '15601691200', 1, '', 0, '0:0:0:0:0:0:0:1', '2023-09-24 18:21:19', '', '2021-01-21 02:13:53', NULL, '2023-09-24 18:21:19', b'0', 1); |
yudao-framework/yudao-common/src/main/java/cn/iocoder/yudao/framework/common/enums/TerminalEnum.java
| @@ -18,8 +18,7 @@ public enum TerminalEnum implements IntArrayValuable { | @@ -18,8 +18,7 @@ public enum TerminalEnum implements IntArrayValuable { | ||
| 18 | WECHAT_MINI_PROGRAM(10, "微信小程序"), | 18 | WECHAT_MINI_PROGRAM(10, "微信小程序"), |
| 19 | WECHAT_WAP(11, "微信公众号"), | 19 | WECHAT_WAP(11, "微信公众号"), |
| 20 | H5(20, "H5 网页"), | 20 | H5(20, "H5 网页"), |
| 21 | - IOS(31, "苹果 App"), | ||
| 22 | - ANDROID(32, "安卓 App"), | 21 | + APP(31, "手机 App"), |
| 23 | ; | 22 | ; |
| 24 | 23 | ||
| 25 | public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TerminalEnum::getTerminal).toArray(); | 24 | public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TerminalEnum::getTerminal).toArray(); |
yudao-framework/yudao-spring-boot-starter-biz-ip/src/main/java/cn/iocoder/yudao/framework/ip/core/utils/AreaUtils.java
| @@ -132,25 +132,31 @@ public class AreaUtils { | @@ -132,25 +132,31 @@ public class AreaUtils { | ||
| 132 | return convertList(areas.values(), func, area -> type.getType().equals(area.getType())); | 132 | return convertList(areas.values(), func, area -> type.getType().equals(area.getType())); |
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | - // TODO @疯狂:注释写下; | 135 | + /** |
| 136 | + * 根据区域编号、上级区域类型,获取上级区域编号 | ||
| 137 | + * | ||
| 138 | + * @param id 区域编号 | ||
| 139 | + * @param type 区域类型 | ||
| 140 | + * @return 上级区域编号 | ||
| 141 | + */ | ||
| 136 | public static Integer getParentIdByType(Integer id, @NonNull AreaTypeEnum type) { | 142 | public static Integer getParentIdByType(Integer id, @NonNull AreaTypeEnum type) { |
| 137 | - // TODO @疯狂:这种不要用 while true;因为万一脏数据,可能会死循环;可以转换成 for (int i = 0; i < Byte.MAX; i++) 一般是优先层级; | ||
| 138 | - do { | 143 | + for (int i = 0; i < Byte.MAX_VALUE; i++) { |
| 139 | Area area = AreaUtils.getArea(id); | 144 | Area area = AreaUtils.getArea(id); |
| 140 | if (area == null) { | 145 | if (area == null) { |
| 141 | return null; | 146 | return null; |
| 142 | } | 147 | } |
| 143 | - | 148 | + // 情况一:匹配到,返回它 |
| 144 | if (type.getType().equals(area.getType())) { | 149 | if (type.getType().equals(area.getType())) { |
| 145 | return area.getId(); | 150 | return area.getId(); |
| 146 | } | 151 | } |
| 147 | - | 152 | + // 情况二:找到根节点,返回空 |
| 148 | if (area.getParent() == null || area.getParent().getId() == null) { | 153 | if (area.getParent() == null || area.getParent().getId() == null) { |
| 149 | return null; | 154 | return null; |
| 150 | } | 155 | } |
| 151 | - | 156 | + // 其它:继续向上查找 |
| 152 | id = area.getParent().getId(); | 157 | id = area.getParent().getId(); |
| 153 | - } while (true); | 158 | + } |
| 159 | + return null; | ||
| 154 | } | 160 | } |
| 155 | 161 | ||
| 156 | } | 162 | } |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/discount/DiscountActivityDO.java
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/discount/DiscountProductDO.java
| @@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.annotation.TableName; | @@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.annotation.TableName; | ||
| 8 | import lombok.Data; | 8 | import lombok.Data; |
| 9 | import lombok.EqualsAndHashCode; | 9 | import lombok.EqualsAndHashCode; |
| 10 | 10 | ||
| 11 | +import java.time.LocalDateTime; | ||
| 12 | + | ||
| 11 | /** | 13 | /** |
| 12 | * 限时折扣商品 DO | 14 | * 限时折扣商品 DO |
| 13 | * | 15 | * |
| @@ -25,7 +27,6 @@ public class DiscountProductDO extends BaseDO { | @@ -25,7 +27,6 @@ public class DiscountProductDO extends BaseDO { | ||
| 25 | @TableId | 27 | @TableId |
| 26 | private Long id; | 28 | private Long id; |
| 27 | 29 | ||
| 28 | - // TODO 芋艿:把 activity 所有的字段冗余过来 | ||
| 29 | /** | 30 | /** |
| 30 | * 限时折扣活动的编号 | 31 | * 限时折扣活动的编号 |
| 31 | * | 32 | * |
| @@ -33,6 +34,7 @@ public class DiscountProductDO extends BaseDO { | @@ -33,6 +34,7 @@ public class DiscountProductDO extends BaseDO { | ||
| 33 | */ | 34 | */ |
| 34 | private Long activityId; | 35 | private Long activityId; |
| 35 | 36 | ||
| 37 | + | ||
| 36 | /** | 38 | /** |
| 37 | * 商品 SPU 编号 | 39 | * 商品 SPU 编号 |
| 38 | * | 40 | * |
| @@ -65,4 +67,24 @@ public class DiscountProductDO extends BaseDO { | @@ -65,4 +67,24 @@ public class DiscountProductDO extends BaseDO { | ||
| 65 | */ | 67 | */ |
| 66 | private Integer discountPrice; | 68 | private Integer discountPrice; |
| 67 | 69 | ||
| 70 | + // TODO 芋艿:这几个字段,要新增下; | ||
| 71 | + /** | ||
| 72 | + * 活动状态 | ||
| 73 | + * | ||
| 74 | + * 关联 {@link DiscountActivityDO#getStatus()} | ||
| 75 | + */ | ||
| 76 | + private Integer activityStatus; | ||
| 77 | + /** | ||
| 78 | + * 活动开始时间点 | ||
| 79 | + * | ||
| 80 | + * 冗余 {@link DiscountActivityDO#getStartTime()} | ||
| 81 | + */ | ||
| 82 | + private LocalDateTime activityStartTime; | ||
| 83 | + /** | ||
| 84 | + * 活动结束时间点 | ||
| 85 | + * | ||
| 86 | + * 冗余 {@link DiscountActivityDO#getEndTime()} | ||
| 87 | + */ | ||
| 88 | + private LocalDateTime activityEndTime; | ||
| 89 | + | ||
| 68 | } | 90 | } |
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/reward/RewardActivityDO.java
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/member/MemberStatisticsController.java
| @@ -30,13 +30,15 @@ public class MemberStatisticsController { | @@ -30,13 +30,15 @@ public class MemberStatisticsController { | ||
| 30 | @Resource | 30 | @Resource |
| 31 | private MemberStatisticsService memberStatisticsService; | 31 | private MemberStatisticsService memberStatisticsService; |
| 32 | 32 | ||
| 33 | + // TODO 芋艿:已经 review | ||
| 33 | @GetMapping("/summary") | 34 | @GetMapping("/summary") |
| 34 | - @Operation(summary = "获得会员统计") | 35 | + @Operation(summary = "获得会员统计(实时统计)") |
| 35 | @PreAuthorize("@ss.hasPermission('statistics:member:query')") | 36 | @PreAuthorize("@ss.hasPermission('statistics:member:query')") |
| 36 | public CommonResult<MemberSummaryRespVO> getMemberSummary() { | 37 | public CommonResult<MemberSummaryRespVO> getMemberSummary() { |
| 37 | return success(memberStatisticsService.getMemberSummary()); | 38 | return success(memberStatisticsService.getMemberSummary()); |
| 38 | } | 39 | } |
| 39 | 40 | ||
| 41 | + // TODO 芋艿:已经 review | ||
| 40 | @GetMapping("/analyse") | 42 | @GetMapping("/analyse") |
| 41 | @Operation(summary = "获得会员分析数据") | 43 | @Operation(summary = "获得会员分析数据") |
| 42 | @PreAuthorize("@ss.hasPermission('statistics:member:query')") | 44 | @PreAuthorize("@ss.hasPermission('statistics:member:query')") |
| @@ -45,6 +47,7 @@ public class MemberStatisticsController { | @@ -45,6 +47,7 @@ public class MemberStatisticsController { | ||
| 45 | ArrayUtil.get(reqVO.getTimes(), 0), ArrayUtil.get(reqVO.getTimes(), 1))); | 47 | ArrayUtil.get(reqVO.getTimes(), 0), ArrayUtil.get(reqVO.getTimes(), 1))); |
| 46 | } | 48 | } |
| 47 | 49 | ||
| 50 | + // TODO 芋艿:已经 review | ||
| 48 | @GetMapping("/get-area-statistics-list") | 51 | @GetMapping("/get-area-statistics-list") |
| 49 | @Operation(summary = "按照省份,获得会员统计列表") | 52 | @Operation(summary = "按照省份,获得会员统计列表") |
| 50 | @PreAuthorize("@ss.hasPermission('statistics:member:query')") | 53 | @PreAuthorize("@ss.hasPermission('statistics:member:query')") |
| @@ -52,6 +55,7 @@ public class MemberStatisticsController { | @@ -52,6 +55,7 @@ public class MemberStatisticsController { | ||
| 52 | return success(memberStatisticsService.getMemberAreaStatisticsList()); | 55 | return success(memberStatisticsService.getMemberAreaStatisticsList()); |
| 53 | } | 56 | } |
| 54 | 57 | ||
| 58 | + // TODO 芋艿:已经 review | ||
| 55 | @GetMapping("/get-sex-statistics-list") | 59 | @GetMapping("/get-sex-statistics-list") |
| 56 | @Operation(summary = "按照性别,获得会员统计列表") | 60 | @Operation(summary = "按照性别,获得会员统计列表") |
| 57 | @PreAuthorize("@ss.hasPermission('statistics:member:query')") | 61 | @PreAuthorize("@ss.hasPermission('statistics:member:query')") |
| @@ -64,6 +68,7 @@ public class MemberStatisticsController { | @@ -64,6 +68,7 @@ public class MemberStatisticsController { | ||
| 64 | @PreAuthorize("@ss.hasPermission('statistics:member:query')") | 68 | @PreAuthorize("@ss.hasPermission('statistics:member:query')") |
| 65 | public CommonResult<List<MemberTerminalStatisticsRespVO>> getMemberTerminalStatisticsList() { | 69 | public CommonResult<List<MemberTerminalStatisticsRespVO>> getMemberTerminalStatisticsList() { |
| 66 | // TODO 疯狂:这个可以晚点写,因为 user = = 上还没记录 terminal | 70 | // TODO 疯狂:这个可以晚点写,因为 user = = 上还没记录 terminal |
| 71 | + // TODO @疯狂:在 member_user 上,增加 registerTerminal 字段,基于它来统计哈; | ||
| 67 | List<MemberTerminalStatisticsRespVO> list = convertList(TerminalEnum.values(), | 72 | List<MemberTerminalStatisticsRespVO> list = convertList(TerminalEnum.values(), |
| 68 | t -> new MemberTerminalStatisticsRespVO() | 73 | t -> new MemberTerminalStatisticsRespVO() |
| 69 | .setTerminal(t.getTerminal()).setUserCount(t.getTerminal() * 100)); | 74 | .setTerminal(t.getTerminal()).setUserCount(t.getTerminal() * 100)); |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/member/vo/MemberAnalyseComparisonRespVO.java
| @@ -7,9 +7,11 @@ import lombok.Data; | @@ -7,9 +7,11 @@ import lombok.Data; | ||
| 7 | @Data | 7 | @Data |
| 8 | public class MemberAnalyseComparisonRespVO { | 8 | public class MemberAnalyseComparisonRespVO { |
| 9 | 9 | ||
| 10 | + // TODO @疯狂:这个字段,要不改成注册用户量;registerUserCount; | ||
| 10 | @Schema(description = "会员数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | 11 | @Schema(description = "会员数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 11 | private Integer userCount; | 12 | private Integer userCount; |
| 12 | 13 | ||
| 14 | + // TODO @疯狂:这个字段,名字改成 visitUserCount;有访问,就算活跃; | ||
| 13 | @Schema(description = "活跃用户数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | 15 | @Schema(description = "活跃用户数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 14 | private Integer activeUserCount; | 16 | private Integer activeUserCount; |
| 15 | 17 |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/member/vo/MemberAnalyseRespVO.java
| @@ -8,6 +8,7 @@ import lombok.Data; | @@ -8,6 +8,7 @@ import lombok.Data; | ||
| 8 | @Data | 8 | @Data |
| 9 | public class MemberAnalyseRespVO { | 9 | public class MemberAnalyseRespVO { |
| 10 | 10 | ||
| 11 | + // TODO @疯狂:这个字段改成 visitUserCount,保持和 userCount 字段统一 | ||
| 11 | @Schema(description = "访客数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | 12 | @Schema(description = "访客数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 12 | private Integer visitorCount; | 13 | private Integer visitorCount; |
| 13 | 14 | ||
| @@ -17,7 +18,7 @@ public class MemberAnalyseRespVO { | @@ -17,7 +18,7 @@ public class MemberAnalyseRespVO { | ||
| 17 | @Schema(description = "成交用户数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | 18 | @Schema(description = "成交用户数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 18 | private Integer payUserCount; | 19 | private Integer payUserCount; |
| 19 | 20 | ||
| 20 | - @Schema(description = "客单价", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | 21 | + @Schema(description = "客单价,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 21 | private Integer atv; | 22 | private Integer atv; |
| 22 | 23 | ||
| 23 | @Schema(description = "对照数据", requiredMode = Schema.RequiredMode.REQUIRED) | 24 | @Schema(description = "对照数据", requiredMode = Schema.RequiredMode.REQUIRED) |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/member/vo/MemberAreaStatisticsRespVO.java
| @@ -15,10 +15,12 @@ public class MemberAreaStatisticsRespVO { | @@ -15,10 +15,12 @@ public class MemberAreaStatisticsRespVO { | ||
| 15 | @Schema(description = "会员数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | 15 | @Schema(description = "会员数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 16 | private Integer userCount; | 16 | private Integer userCount; |
| 17 | 17 | ||
| 18 | + // TODO @疯狂:要不 orderCreateUserCount 和 orderPayUserCount 貌似更统一一些; | ||
| 18 | @Schema(description = "订单创建数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | 19 | @Schema(description = "订单创建数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 19 | private Integer orderCreateCount; | 20 | private Integer orderCreateCount; |
| 20 | @Schema(description = "订单支付数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "512") | 21 | @Schema(description = "订单支付数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "512") |
| 21 | private Integer orderPayCount; | 22 | private Integer orderPayCount; |
| 23 | + | ||
| 22 | @Schema(description = "订单支付金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "622") | 24 | @Schema(description = "订单支付金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "622") |
| 23 | private Integer orderPayPrice; | 25 | private Integer orderPayPrice; |
| 24 | 26 |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/member/vo/MemberSexStatisticsRespVO.java
| @@ -10,6 +10,7 @@ public class MemberSexStatisticsRespVO { | @@ -10,6 +10,7 @@ public class MemberSexStatisticsRespVO { | ||
| 10 | @Schema(description = "性别", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | 10 | @Schema(description = "性别", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 11 | private Integer sex; | 11 | private Integer sex; |
| 12 | 12 | ||
| 13 | + // TODO @疯狂:要不还是其它字段,我们也补全,这样方便使用的用户,做定制化;就保持和 MemberAreaStatisticsRespVO 一致; | ||
| 13 | @Schema(description = "会员数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | 14 | @Schema(description = "会员数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 14 | private Integer userCount; | 15 | private Integer userCount; |
| 15 | 16 |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/member/vo/MemberSummaryRespVO.java
| @@ -13,10 +13,11 @@ public class MemberSummaryRespVO { | @@ -13,10 +13,11 @@ public class MemberSummaryRespVO { | ||
| 13 | @Schema(description = "充值会员数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "221") | 13 | @Schema(description = "充值会员数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "221") |
| 14 | private Integer rechargeUserCount; | 14 | private Integer rechargeUserCount; |
| 15 | 15 | ||
| 16 | - @Schema(description = "充值金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | 16 | + @Schema(description = "充值金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 17 | private Integer rechargePrice; | 17 | private Integer rechargePrice; |
| 18 | 18 | ||
| 19 | - @Schema(description = "支出金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | ||
| 20 | - private Integer expensePrice; | 19 | + // TODO @疯狂:要不干脆这个字段改成:orderPayPrice?? |
| 20 | + @Schema(description = "支出金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | ||
| 21 | + private Integer expensePrice; // 只计算 mall 交易订单的支付金额,不考虑退款 | ||
| 21 | 22 | ||
| 22 | } | 23 | } |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/member/vo/MemberTerminalStatisticsRespVO.java
| @@ -10,6 +10,7 @@ public class MemberTerminalStatisticsRespVO { | @@ -10,6 +10,7 @@ public class MemberTerminalStatisticsRespVO { | ||
| 10 | @Schema(description = "终端", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | 10 | @Schema(description = "终端", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 11 | private Integer terminal; | 11 | private Integer terminal; |
| 12 | 12 | ||
| 13 | + // TODO @疯狂:要不 orderCreateUserCount 和 orderPayUserCount 貌似更统一一些; | ||
| 13 | @Schema(description = "会员数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | 14 | @Schema(description = "会员数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 14 | private Integer userCount; | 15 | private Integer userCount; |
| 15 | 16 |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/trade/TradeStatisticsController.java
| @@ -36,9 +36,11 @@ public class TradeStatisticsController { | @@ -36,9 +36,11 @@ public class TradeStatisticsController { | ||
| 36 | @Operation(summary = "获得交易统计") | 36 | @Operation(summary = "获得交易统计") |
| 37 | @PreAuthorize("@ss.hasPermission('statistics:trade:query')") | 37 | @PreAuthorize("@ss.hasPermission('statistics:trade:query')") |
| 38 | public CommonResult<TradeStatisticsComparisonRespVO<TradeSummaryRespVO>> getTradeSummaryComparison() { | 38 | public CommonResult<TradeStatisticsComparisonRespVO<TradeSummaryRespVO>> getTradeSummaryComparison() { |
| 39 | + // TODO @疯狂:这个要不要 tradeStatisticsService 调用里面的多个方法,组合出最终的 TradeSummaryRespVO; | ||
| 39 | return success(tradeStatisticsService.getTradeSummaryComparison()); | 40 | return success(tradeStatisticsService.getTradeSummaryComparison()); |
| 40 | } | 41 | } |
| 41 | 42 | ||
| 43 | + // TODO @疯狂:【晚点再改和讨论;等首页的接口出来】这个要不还是叫 analyse,对比选中的时间段,和上一个时间段;类似 MemberStatisticsController 的 getMemberAnalyse | ||
| 42 | @GetMapping("/trend/summary") | 44 | @GetMapping("/trend/summary") |
| 43 | @Operation(summary = "获得交易状况统计") | 45 | @Operation(summary = "获得交易状况统计") |
| 44 | @PreAuthorize("@ss.hasPermission('statistics:trade:query')") | 46 | @PreAuthorize("@ss.hasPermission('statistics:trade:query')") |
| @@ -48,6 +50,8 @@ public class TradeStatisticsController { | @@ -48,6 +50,8 @@ public class TradeStatisticsController { | ||
| 48 | ArrayUtil.get(reqVO.getTimes(), 1))); | 50 | ArrayUtil.get(reqVO.getTimes(), 1))); |
| 49 | } | 51 | } |
| 50 | 52 | ||
| 53 | + // TODO 芋艿:已经 review | ||
| 54 | + // TODO @疯狂:这个要不直接叫 list;它即使就是把每条统计拿出来 | ||
| 51 | @GetMapping("/trend/list") | 55 | @GetMapping("/trend/list") |
| 52 | @Operation(summary = "获得交易状况明细") | 56 | @Operation(summary = "获得交易状况明细") |
| 53 | @PreAuthorize("@ss.hasPermission('statistics:trade:query')") | 57 | @PreAuthorize("@ss.hasPermission('statistics:trade:query')") |
| @@ -57,6 +61,7 @@ public class TradeStatisticsController { | @@ -57,6 +61,7 @@ public class TradeStatisticsController { | ||
| 57 | ArrayUtil.get(reqVO.getTimes(), 1))); | 61 | ArrayUtil.get(reqVO.getTimes(), 1))); |
| 58 | } | 62 | } |
| 59 | 63 | ||
| 64 | + // TODO @疯狂:这个要不直接叫 export;它即使就是把每条统计导出 | ||
| 60 | @GetMapping("/trend/export-excel") | 65 | @GetMapping("/trend/export-excel") |
| 61 | @Operation(summary = "导出获得交易状况明细 Excel") | 66 | @Operation(summary = "导出获得交易状况明细 Excel") |
| 62 | @PreAuthorize("@ss.hasPermission('statistics:trade:export')") | 67 | @PreAuthorize("@ss.hasPermission('statistics:trade:export')") |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/trade/vo/TradeStatisticsComparisonRespVO.java
| @@ -5,6 +5,7 @@ import lombok.AllArgsConstructor; | @@ -5,6 +5,7 @@ import lombok.AllArgsConstructor; | ||
| 5 | import lombok.Data; | 5 | import lombok.Data; |
| 6 | import lombok.NoArgsConstructor; | 6 | import lombok.NoArgsConstructor; |
| 7 | 7 | ||
| 8 | +// TODO @疯狂:是不是搞成公用的哈;类似,controller/admin/common,下面直接放它 | ||
| 8 | @Schema(description = "管理后台 - 交易统计对照 Response VO") | 9 | @Schema(description = "管理后台 - 交易统计对照 Response VO") |
| 9 | @Data | 10 | @Data |
| 10 | @NoArgsConstructor | 11 | @NoArgsConstructor |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/controller/admin/trade/vo/TradeTrendSummaryRespVO.java
| @@ -16,25 +16,26 @@ public class TradeTrendSummaryRespVO { | @@ -16,25 +16,26 @@ public class TradeTrendSummaryRespVO { | ||
| 16 | @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY) | 16 | @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY) |
| 17 | private LocalDate date; | 17 | private LocalDate date; |
| 18 | 18 | ||
| 19 | + // TODO @疯狂,要不加个 turnoverPrice? | ||
| 19 | @Schema(description = "营业额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | 20 | @Schema(description = "营业额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 20 | - private Integer turnover; | 21 | + private Integer turnover; // 营业额 = 商品支付金额 + 充值金额 |
| 21 | 22 | ||
| 22 | - @Schema(description = "商品支付金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | 23 | + @Schema(description = "订单支付金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 23 | private Integer orderPayPrice; | 24 | private Integer orderPayPrice; |
| 24 | 25 | ||
| 26 | + @Schema(description = "订单退款金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | ||
| 27 | + private Integer orderRefundPrice; | ||
| 28 | + | ||
| 29 | + @Schema(description = "支付佣金金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | ||
| 30 | + private Integer brokerageSettlementPrice; | ||
| 31 | + | ||
| 25 | @Schema(description = "充值金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | 32 | @Schema(description = "充值金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 26 | private Integer rechargePrice; | 33 | private Integer rechargePrice; |
| 27 | 34 | ||
| 28 | @Schema(description = "支出金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | 35 | @Schema(description = "支出金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 29 | - private Integer expensePrice; | 36 | + private Integer expensePrice; // 余额支付金额 + 支付佣金金额 + 商品退款金额 |
| 30 | 37 | ||
| 31 | @Schema(description = "余额支付金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | 38 | @Schema(description = "余额支付金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 32 | - private Integer balancePrice; | ||
| 33 | - | ||
| 34 | - @Schema(description = "支付佣金金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | ||
| 35 | - private Integer brokerageSettlementPrice; | ||
| 36 | - | ||
| 37 | - @Schema(description = "商品退款金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | ||
| 38 | - private Integer orderRefundPrice; | 39 | + private Integer balancePrice; // TODO @疯狂:这个字段要不改成:walletPayPrice |
| 39 | 40 | ||
| 40 | } | 41 | } |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/convert/member/MemberStatisticsConvert.java
| @@ -5,6 +5,8 @@ import cn.hutool.core.util.ObjUtil; | @@ -5,6 +5,8 @@ import cn.hutool.core.util.ObjUtil; | ||
| 5 | import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; | 5 | import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils; |
| 6 | import cn.iocoder.yudao.framework.ip.core.Area; | 6 | import cn.iocoder.yudao.framework.ip.core.Area; |
| 7 | import cn.iocoder.yudao.module.statistics.controller.admin.member.vo.MemberAreaStatisticsRespVO; | 7 | import cn.iocoder.yudao.module.statistics.controller.admin.member.vo.MemberAreaStatisticsRespVO; |
| 8 | +import cn.iocoder.yudao.module.statistics.controller.admin.member.vo.MemberSummaryRespVO; | ||
| 9 | +import cn.iocoder.yudao.module.statistics.service.pay.bo.RechargeSummaryRespBO; | ||
| 8 | import org.mapstruct.Mapper; | 10 | import org.mapstruct.Mapper; |
| 9 | import org.mapstruct.factory.Mappers; | 11 | import org.mapstruct.factory.Mappers; |
| 10 | 12 | ||
| @@ -36,4 +38,6 @@ public interface MemberStatisticsConvert { | @@ -36,4 +38,6 @@ public interface MemberStatisticsConvert { | ||
| 36 | }); | 38 | }); |
| 37 | } | 39 | } |
| 38 | 40 | ||
| 41 | + MemberSummaryRespVO convert(RechargeSummaryRespBO rechargeSummary, Integer expensePrice, Integer userCount); | ||
| 42 | + | ||
| 39 | } | 43 | } |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/dataobject/trade/TradeStatisticsDO.java
| @@ -48,6 +48,7 @@ public class TradeStatisticsDO extends TenantBaseDO { | @@ -48,6 +48,7 @@ public class TradeStatisticsDO extends TenantBaseDO { | ||
| 48 | * 总支付金额,单位:分 | 48 | * 总支付金额,单位:分 |
| 49 | */ | 49 | */ |
| 50 | private Integer orderPayPrice; | 50 | private Integer orderPayPrice; |
| 51 | + // TODO @疯狂:这个字段改成 walletPayPrice,然后挪到 rechargePayCount 前面; | ||
| 51 | /** | 52 | /** |
| 52 | * 总支付金额(余额),单位:分 | 53 | * 总支付金额(余额),单位:分 |
| 53 | */ | 54 | */ |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/infra/ApiAccessLogStatisticsMapper.java
| @@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Param; | @@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Param; | ||
| 6 | 6 | ||
| 7 | import java.time.LocalDateTime; | 7 | import java.time.LocalDateTime; |
| 8 | 8 | ||
| 9 | +// TODO @芋艿:api 访问日志,现在会清理,可能要单独有个偏业务的访问表; | ||
| 9 | /** | 10 | /** |
| 10 | * API 访问日志的统计 Mapper | 11 | * API 访问日志的统计 Mapper |
| 11 | * | 12 | * |
| @@ -14,9 +15,11 @@ import java.time.LocalDateTime; | @@ -14,9 +15,11 @@ import java.time.LocalDateTime; | ||
| 14 | @Mapper | 15 | @Mapper |
| 15 | public interface ApiAccessLogStatisticsMapper extends BaseMapperX<Object> { | 16 | public interface ApiAccessLogStatisticsMapper extends BaseMapperX<Object> { |
| 16 | 17 | ||
| 18 | + // TODO @疯狂:是不是 selectIpCount | ||
| 17 | Integer selectCountByIp(@Param("beginTime") LocalDateTime beginTime, | 19 | Integer selectCountByIp(@Param("beginTime") LocalDateTime beginTime, |
| 18 | @Param("endTime") LocalDateTime endTime); | 20 | @Param("endTime") LocalDateTime endTime); |
| 19 | 21 | ||
| 22 | + // TODO @疯狂:是不是 selectUserCount | ||
| 20 | Integer selectCountByUserId(@Param("beginTime") LocalDateTime beginTime, | 23 | Integer selectCountByUserId(@Param("beginTime") LocalDateTime beginTime, |
| 21 | @Param("endTime") LocalDateTime endTime); | 24 | @Param("endTime") LocalDateTime endTime); |
| 22 | 25 |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/member/MemberStatisticsMapper.java
| @@ -17,10 +17,13 @@ import java.util.List; | @@ -17,10 +17,13 @@ import java.util.List; | ||
| 17 | @Mapper | 17 | @Mapper |
| 18 | public interface MemberStatisticsMapper extends BaseMapperX<Object> { | 18 | public interface MemberStatisticsMapper extends BaseMapperX<Object> { |
| 19 | 19 | ||
| 20 | + // TODO @芋艿:已经 review | ||
| 21 | + // TODO @疯狂:要不还是搞下 bo?虽然可能冗余了点~~ | ||
| 20 | List<MemberAreaStatisticsRespVO> selectSummaryListByAreaId(); | 22 | List<MemberAreaStatisticsRespVO> selectSummaryListByAreaId(); |
| 21 | 23 | ||
| 22 | List<MemberSexStatisticsRespVO> selectSummaryListBySex(); | 24 | List<MemberSexStatisticsRespVO> selectSummaryListBySex(); |
| 23 | 25 | ||
| 26 | + // TODO @芋艿:已经 review | ||
| 24 | Integer selectUserCount(@Param("beginTime") LocalDateTime beginTime, | 27 | Integer selectUserCount(@Param("beginTime") LocalDateTime beginTime, |
| 25 | @Param("endTime") LocalDateTime endTime); | 28 | @Param("endTime") LocalDateTime endTime); |
| 26 | 29 |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/pay/PayWalletStatisticsMapper.java
| 1 | package cn.iocoder.yudao.module.statistics.dal.mysql.pay; | 1 | package cn.iocoder.yudao.module.statistics.dal.mysql.pay; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; | 3 | import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; |
| 4 | -import cn.iocoder.yudao.module.statistics.controller.admin.member.vo.MemberSummaryRespVO; | ||
| 5 | -import cn.iocoder.yudao.module.statistics.service.trade.bo.WalletSummaryRespBO; | ||
| 6 | import cn.iocoder.yudao.module.statistics.dal.dataobject.trade.TradeStatisticsDO; | 4 | import cn.iocoder.yudao.module.statistics.dal.dataobject.trade.TradeStatisticsDO; |
| 5 | +import cn.iocoder.yudao.module.statistics.service.pay.bo.RechargeSummaryRespBO; | ||
| 6 | +import cn.iocoder.yudao.module.statistics.service.trade.bo.WalletSummaryRespBO; | ||
| 7 | import org.apache.ibatis.annotations.Mapper; | 7 | import org.apache.ibatis.annotations.Mapper; |
| 8 | import org.apache.ibatis.annotations.Param; | 8 | import org.apache.ibatis.annotations.Param; |
| 9 | 9 | ||
| @@ -17,21 +17,24 @@ import java.time.LocalDateTime; | @@ -17,21 +17,24 @@ import java.time.LocalDateTime; | ||
| 17 | @Mapper | 17 | @Mapper |
| 18 | public interface PayWalletStatisticsMapper extends BaseMapperX<TradeStatisticsDO> { | 18 | public interface PayWalletStatisticsMapper extends BaseMapperX<TradeStatisticsDO> { |
| 19 | 19 | ||
| 20 | + // TODO 芋艿:已经 review; | ||
| 20 | WalletSummaryRespBO selectRechargeSummaryByPayTimeBetween(@Param("beginTime") LocalDateTime beginTime, | 21 | WalletSummaryRespBO selectRechargeSummaryByPayTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 21 | @Param("endTime") LocalDateTime endTime, | 22 | @Param("endTime") LocalDateTime endTime, |
| 22 | @Param("payStatus") Boolean payStatus); | 23 | @Param("payStatus") Boolean payStatus); |
| 23 | 24 | ||
| 25 | + // TODO 芋艿:已经 review; | ||
| 24 | WalletSummaryRespBO selectRechargeSummaryByRefundTimeBetween(@Param("beginTime") LocalDateTime beginTime, | 26 | WalletSummaryRespBO selectRechargeSummaryByRefundTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 25 | @Param("endTime") LocalDateTime endTime, | 27 | @Param("endTime") LocalDateTime endTime, |
| 26 | @Param("refundStatus") Integer refundStatus); | 28 | @Param("refundStatus") Integer refundStatus); |
| 27 | 29 | ||
| 30 | + // TODO 芋艿:已经 review; | ||
| 28 | Integer selectPriceSummaryByBizTypeAndCreateTimeBetween(@Param("beginTime") LocalDateTime beginTime, | 31 | Integer selectPriceSummaryByBizTypeAndCreateTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 29 | @Param("endTime") LocalDateTime endTime, | 32 | @Param("endTime") LocalDateTime endTime, |
| 30 | @Param("bizType") Integer bizType); | 33 | @Param("bizType") Integer bizType); |
| 31 | 34 | ||
| 32 | - // TODO @疯狂:是不是搞个单独的 BO 呀; | ||
| 33 | - MemberSummaryRespVO selectRechargeSummaryGroupByWalletId(@Param("beginTime") LocalDateTime beginTime, | ||
| 34 | - @Param("endTime") LocalDateTime endTime, | ||
| 35 | - @Param("payStatus") Boolean payStatus); | 35 | + // TODO 芋艿:已经 review; |
| 36 | + RechargeSummaryRespBO selectRechargeSummaryGroupByWalletId(@Param("beginTime") LocalDateTime beginTime, | ||
| 37 | + @Param("endTime") LocalDateTime endTime, | ||
| 38 | + @Param("payStatus") Boolean payStatus); | ||
| 36 | 39 | ||
| 37 | } | 40 | } |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/AfterSaleStatisticsMapper.java
| @@ -16,6 +16,7 @@ import java.time.LocalDateTime; | @@ -16,6 +16,7 @@ import java.time.LocalDateTime; | ||
| 16 | @Mapper | 16 | @Mapper |
| 17 | public interface AfterSaleStatisticsMapper extends BaseMapperX<TradeStatisticsDO> { | 17 | public interface AfterSaleStatisticsMapper extends BaseMapperX<TradeStatisticsDO> { |
| 18 | 18 | ||
| 19 | + // TODO 芋艿:已 review | ||
| 19 | AfterSaleSummaryRespBO selectSummaryByRefundTimeBetween(@Param("beginTime") LocalDateTime beginTime, | 20 | AfterSaleSummaryRespBO selectSummaryByRefundTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 20 | @Param("endTime") LocalDateTime endTime); | 21 | @Param("endTime") LocalDateTime endTime); |
| 21 | 22 |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeOrderStatisticsMapper.java
| @@ -17,20 +17,26 @@ import java.util.List; | @@ -17,20 +17,26 @@ import java.util.List; | ||
| 17 | @Mapper | 17 | @Mapper |
| 18 | public interface TradeOrderStatisticsMapper extends BaseMapperX<TradeStatisticsDO> { | 18 | public interface TradeOrderStatisticsMapper extends BaseMapperX<TradeStatisticsDO> { |
| 19 | 19 | ||
| 20 | + // TODO 芋艿:已经 review | ||
| 20 | List<MemberAreaStatisticsRespVO> selectSummaryListByAreaId(); | 21 | List<MemberAreaStatisticsRespVO> selectSummaryListByAreaId(); |
| 21 | 22 | ||
| 23 | + // TODO 芋艿:已经 review | ||
| 22 | Integer selectCountByCreateTimeBetween(@Param("beginTime") LocalDateTime beginTime, | 24 | Integer selectCountByCreateTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 23 | @Param("endTime") LocalDateTime endTime); | 25 | @Param("endTime") LocalDateTime endTime); |
| 24 | 26 | ||
| 27 | + // TODO 芋艿:已经 review | ||
| 25 | Integer selectCountByPayTimeBetween(@Param("beginTime") LocalDateTime beginTime, | 28 | Integer selectCountByPayTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 26 | @Param("endTime") LocalDateTime endTime); | 29 | @Param("endTime") LocalDateTime endTime); |
| 27 | 30 | ||
| 31 | + // TODO 芋艿:已经 review | ||
| 28 | Integer selectSummaryPriceByPayTimeBetween(@Param("beginTime") LocalDateTime beginTime, | 32 | Integer selectSummaryPriceByPayTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 29 | @Param("endTime") LocalDateTime endTime); | 33 | @Param("endTime") LocalDateTime endTime); |
| 30 | 34 | ||
| 35 | + // TODO 芋艿:已经 review | ||
| 31 | Integer selectUserCountByCreateTimeBetween(@Param("beginTime") LocalDateTime beginTime, | 36 | Integer selectUserCountByCreateTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 32 | @Param("endTime") LocalDateTime endTime); | 37 | @Param("endTime") LocalDateTime endTime); |
| 33 | 38 | ||
| 39 | + // TODO 芋艿:已经 review | ||
| 34 | Integer selectUserCountByPayTimeBetween(@Param("beginTime") LocalDateTime beginTime, | 40 | Integer selectUserCountByPayTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 35 | @Param("endTime") LocalDateTime endTime); | 41 | @Param("endTime") LocalDateTime endTime); |
| 36 | 42 |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/dal/mysql/trade/TradeStatisticsMapper.java
| @@ -6,7 +6,6 @@ import cn.iocoder.yudao.module.statistics.dal.dataobject.trade.TradeStatisticsDO | @@ -6,7 +6,6 @@ import cn.iocoder.yudao.module.statistics.dal.dataobject.trade.TradeStatisticsDO | ||
| 6 | import cn.iocoder.yudao.module.statistics.service.trade.bo.TradeSummaryRespBO; | 6 | import cn.iocoder.yudao.module.statistics.service.trade.bo.TradeSummaryRespBO; |
| 7 | import org.apache.ibatis.annotations.Mapper; | 7 | import org.apache.ibatis.annotations.Mapper; |
| 8 | import org.apache.ibatis.annotations.Param; | 8 | import org.apache.ibatis.annotations.Param; |
| 9 | -import org.apache.ibatis.annotations.Select; | ||
| 10 | 9 | ||
| 11 | import java.time.LocalDateTime; | 10 | import java.time.LocalDateTime; |
| 12 | import java.util.List; | 11 | import java.util.List; |
| @@ -19,16 +18,13 @@ import java.util.List; | @@ -19,16 +18,13 @@ import java.util.List; | ||
| 19 | @Mapper | 18 | @Mapper |
| 20 | public interface TradeStatisticsMapper extends BaseMapperX<TradeStatisticsDO> { | 19 | public interface TradeStatisticsMapper extends BaseMapperX<TradeStatisticsDO> { |
| 21 | 20 | ||
| 22 | - // TODO @疯狂:这个要不要也挪到 xml 里,保持统一? | ||
| 23 | - @Select("SELECT IFNULL(SUM(order_create_count), 0) AS count, IFNULL(SUM(order_pay_price), 0) AS summary " + | ||
| 24 | - "FROM trade_statistics " + | ||
| 25 | - "WHERE time BETWEEN #{beginTime} AND #{endTime} AND deleted = FALSE") | ||
| 26 | TradeSummaryRespBO selectOrderCreateCountSumAndOrderPayPriceSumByTimeBetween(@Param("beginTime") LocalDateTime beginTime, | 21 | TradeSummaryRespBO selectOrderCreateCountSumAndOrderPayPriceSumByTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 27 | @Param("endTime") LocalDateTime endTime); | 22 | @Param("endTime") LocalDateTime endTime); |
| 28 | 23 | ||
| 29 | TradeTrendSummaryRespVO selectByTimeBetween(@Param("beginTime") LocalDateTime beginTime, | 24 | TradeTrendSummaryRespVO selectByTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 30 | @Param("endTime") LocalDateTime endTime); | 25 | @Param("endTime") LocalDateTime endTime); |
| 31 | 26 | ||
| 27 | + // TODO @芋艿:已经 review | ||
| 32 | List<TradeTrendSummaryRespVO> selectListByTimeBetween(@Param("beginTime") LocalDateTime beginTime, | 28 | List<TradeTrendSummaryRespVO> selectListByTimeBetween(@Param("beginTime") LocalDateTime beginTime, |
| 33 | @Param("endTime") LocalDateTime endTime); | 29 | @Param("endTime") LocalDateTime endTime); |
| 34 | 30 |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/infra/ApiAccessLogStatisticsService.java
| @@ -9,6 +9,8 @@ import java.time.LocalDateTime; | @@ -9,6 +9,8 @@ import java.time.LocalDateTime; | ||
| 9 | */ | 9 | */ |
| 10 | public interface ApiAccessLogStatisticsService { | 10 | public interface ApiAccessLogStatisticsService { |
| 11 | 11 | ||
| 12 | + // TODO @疯狂:需要传递 userType;因为访问日志,可能涉及多种用户类型; | ||
| 13 | + // TODO @疯狂:方法名,要不改成 getUserCount;原因:让它更业务无关 | ||
| 12 | /** | 14 | /** |
| 13 | * 获取活跃用户数量 | 15 | * 获取活跃用户数量 |
| 14 | * | 16 | * |
| @@ -18,6 +20,8 @@ public interface ApiAccessLogStatisticsService { | @@ -18,6 +20,8 @@ public interface ApiAccessLogStatisticsService { | ||
| 18 | */ | 20 | */ |
| 19 | Integer getActiveUserCount(LocalDateTime beginTime, LocalDateTime endTime); | 21 | Integer getActiveUserCount(LocalDateTime beginTime, LocalDateTime endTime); |
| 20 | 22 | ||
| 23 | + // TODO @疯狂:需要传递 userType;因为访问日志,可能涉及多种用户类型; | ||
| 24 | + // TODO @疯狂:方法名,要不改成 getIpCount;原因:让它更业务无关 | ||
| 21 | /** | 25 | /** |
| 22 | * 获取访问用户数量 | 26 | * 获取访问用户数量 |
| 23 | * | 27 | * |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/infra/ApiAccessLogStatisticsServiceImpl.java
| @@ -28,4 +28,5 @@ public class ApiAccessLogStatisticsServiceImpl implements ApiAccessLogStatistics | @@ -28,4 +28,5 @@ public class ApiAccessLogStatisticsServiceImpl implements ApiAccessLogStatistics | ||
| 28 | public Integer getVisitorUserCount(LocalDateTime beginTime, LocalDateTime endTime) { | 28 | public Integer getVisitorUserCount(LocalDateTime beginTime, LocalDateTime endTime) { |
| 29 | return apiAccessLogStatisticsMapper.selectCountByIp(beginTime, endTime); | 29 | return apiAccessLogStatisticsMapper.selectCountByIp(beginTime, endTime); |
| 30 | } | 30 | } |
| 31 | + | ||
| 31 | } | 32 | } |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/member/MemberStatisticsService.java
| @@ -15,13 +15,24 @@ import java.util.List; | @@ -15,13 +15,24 @@ import java.util.List; | ||
| 15 | */ | 15 | */ |
| 16 | public interface MemberStatisticsService { | 16 | public interface MemberStatisticsService { |
| 17 | 17 | ||
| 18 | + // TODO 芋艿:已经 review | ||
| 18 | /** | 19 | /** |
| 19 | - * 获取会员统计 | 20 | + * 获取会员统计(实时统计) |
| 20 | * | 21 | * |
| 21 | * @return 会员统计 | 22 | * @return 会员统计 |
| 22 | */ | 23 | */ |
| 23 | MemberSummaryRespVO getMemberSummary(); | 24 | MemberSummaryRespVO getMemberSummary(); |
| 24 | 25 | ||
| 26 | + // TODO 芋艿:已经 review | ||
| 27 | + /** | ||
| 28 | + * 获取用户分析数据 | ||
| 29 | + * | ||
| 30 | + * @param beginTime 起始时间 | ||
| 31 | + * @param endTime 截止时间 | ||
| 32 | + * @return 用户分析数据 | ||
| 33 | + */ | ||
| 34 | + MemberAnalyseRespVO getMemberAnalyse(LocalDateTime beginTime, LocalDateTime endTime); | ||
| 35 | + | ||
| 25 | /** | 36 | /** |
| 26 | * 按照省份,获得会员统计列表 | 37 | * 按照省份,获得会员统计列表 |
| 27 | * | 38 | * |
| @@ -36,13 +47,4 @@ public interface MemberStatisticsService { | @@ -36,13 +47,4 @@ public interface MemberStatisticsService { | ||
| 36 | */ | 47 | */ |
| 37 | List<MemberSexStatisticsRespVO> getMemberSexStatisticsList(); | 48 | List<MemberSexStatisticsRespVO> getMemberSexStatisticsList(); |
| 38 | 49 | ||
| 39 | - /** | ||
| 40 | - * 获取用户分析数据 | ||
| 41 | - * | ||
| 42 | - * @param beginTime 起始时间 | ||
| 43 | - * @param endTime 截止时间 | ||
| 44 | - * @return 用户分析数据 | ||
| 45 | - */ | ||
| 46 | - MemberAnalyseRespVO getMemberAnalyse(LocalDateTime beginTime, LocalDateTime endTime); | ||
| 47 | - | ||
| 48 | } | 50 | } |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/member/MemberStatisticsServiceImpl.java
| @@ -5,14 +5,15 @@ import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum; | @@ -5,14 +5,15 @@ import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum; | ||
| 5 | import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; | 5 | import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils; |
| 6 | import cn.iocoder.yudao.module.statistics.controller.admin.member.vo.*; | 6 | import cn.iocoder.yudao.module.statistics.controller.admin.member.vo.*; |
| 7 | import cn.iocoder.yudao.module.statistics.controller.admin.trade.vo.TradeStatisticsComparisonRespVO; | 7 | import cn.iocoder.yudao.module.statistics.controller.admin.trade.vo.TradeStatisticsComparisonRespVO; |
| 8 | -import cn.iocoder.yudao.module.statistics.convert.member.MemberStatisticsConvert; | ||
| 9 | import cn.iocoder.yudao.module.statistics.dal.mysql.member.MemberStatisticsMapper; | 8 | import cn.iocoder.yudao.module.statistics.dal.mysql.member.MemberStatisticsMapper; |
| 10 | import cn.iocoder.yudao.module.statistics.service.infra.ApiAccessLogStatisticsService; | 9 | import cn.iocoder.yudao.module.statistics.service.infra.ApiAccessLogStatisticsService; |
| 11 | import cn.iocoder.yudao.module.statistics.service.pay.PayWalletStatisticsService; | 10 | import cn.iocoder.yudao.module.statistics.service.pay.PayWalletStatisticsService; |
| 11 | +import cn.iocoder.yudao.module.statistics.service.pay.bo.RechargeSummaryRespBO; | ||
| 12 | import cn.iocoder.yudao.module.statistics.service.trade.TradeOrderStatisticsService; | 12 | import cn.iocoder.yudao.module.statistics.service.trade.TradeOrderStatisticsService; |
| 13 | import cn.iocoder.yudao.module.statistics.service.trade.TradeStatisticsService; | 13 | import cn.iocoder.yudao.module.statistics.service.trade.TradeStatisticsService; |
| 14 | import org.springframework.stereotype.Service; | 14 | import org.springframework.stereotype.Service; |
| 15 | import org.springframework.validation.annotation.Validated; | 15 | import org.springframework.validation.annotation.Validated; |
| 16 | +import cn.iocoder.yudao.module.statistics.convert.member.MemberStatisticsConvert; | ||
| 16 | 17 | ||
| 17 | import javax.annotation.Resource; | 18 | import javax.annotation.Resource; |
| 18 | import java.time.Duration; | 19 | import java.time.Duration; |
| @@ -46,19 +47,18 @@ public class MemberStatisticsServiceImpl implements MemberStatisticsService { | @@ -46,19 +47,18 @@ public class MemberStatisticsServiceImpl implements MemberStatisticsService { | ||
| 46 | 47 | ||
| 47 | @Override | 48 | @Override |
| 48 | public MemberSummaryRespVO getMemberSummary() { | 49 | public MemberSummaryRespVO getMemberSummary() { |
| 49 | - MemberSummaryRespVO vo = payWalletStatisticsService.getUserRechargeSummary(null, null); | 50 | + RechargeSummaryRespBO rechargeSummary = payWalletStatisticsService.getUserRechargeSummary(null, null); |
| 51 | + // TODO @疯狂:1)这里是实时统计,不好走走 TradeStatistics 表;2)因为这个放在商城下,所以只考虑订单数据,即按照 trade_order 的 pay_price 并且已支付来计算; | ||
| 50 | Integer expensePrice = tradeStatisticsService.getExpensePrice(null, null); | 52 | Integer expensePrice = tradeStatisticsService.getExpensePrice(null, null); |
| 51 | Integer userCount = memberStatisticsMapper.selectUserCount(null, null); | 53 | Integer userCount = memberStatisticsMapper.selectUserCount(null, null); |
| 52 | - // 拼接数据 | ||
| 53 | - if (vo == null) { | ||
| 54 | - vo = new MemberSummaryRespVO().setRechargeUserCount(0).setRechargePrice(0); | ||
| 55 | - } | ||
| 56 | - return vo.setUserCount(userCount).setExpensePrice(expensePrice); | 54 | + return MemberStatisticsConvert.INSTANCE.convert(rechargeSummary, expensePrice, userCount); |
| 57 | } | 55 | } |
| 58 | 56 | ||
| 59 | @Override | 57 | @Override |
| 60 | public List<MemberAreaStatisticsRespVO> getMemberAreaStatisticsList() { | 58 | public List<MemberAreaStatisticsRespVO> getMemberAreaStatisticsList() { |
| 61 | // 统计用户 | 59 | // 统计用户 |
| 60 | + // TODO @疯狂:要处理下,未知省份;就是没填写省份的情况; | ||
| 61 | + // TODO @疯狂:可能得把每个省的用户,都查询出来,然后去 order 那边 in;因为要按照这些人为基础来计算;;用户规模量大可能不太好,但是暂时就先这样搞吧 = = | ||
| 62 | Map<Integer, Integer> userCountMap = convertMap(memberStatisticsMapper.selectSummaryListByAreaId(), | 62 | Map<Integer, Integer> userCountMap = convertMap(memberStatisticsMapper.selectSummaryListByAreaId(), |
| 63 | vo -> AreaUtils.getParentIdByType(vo.getAreaId(), AreaTypeEnum.PROVINCE), | 63 | vo -> AreaUtils.getParentIdByType(vo.getAreaId(), AreaTypeEnum.PROVINCE), |
| 64 | MemberAreaStatisticsRespVO::getUserCount, Integer::sum); | 64 | MemberAreaStatisticsRespVO::getUserCount, Integer::sum); |
| @@ -74,22 +74,22 @@ public class MemberStatisticsServiceImpl implements MemberStatisticsService { | @@ -74,22 +74,22 @@ public class MemberStatisticsServiceImpl implements MemberStatisticsService { | ||
| 74 | return MemberStatisticsConvert.INSTANCE.convertList(AreaUtils.getByType(AreaTypeEnum.PROVINCE, area -> area), userCountMap, orderMap); | 74 | return MemberStatisticsConvert.INSTANCE.convertList(AreaUtils.getByType(AreaTypeEnum.PROVINCE, area -> area), userCountMap, orderMap); |
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | - @Override | ||
| 78 | - public List<MemberSexStatisticsRespVO> getMemberSexStatisticsList() { | ||
| 79 | - return memberStatisticsMapper.selectSummaryListBySex(); | ||
| 80 | - } | ||
| 81 | - | 77 | + // TODO @疯狂:这个方法,要不拆成:1)controller 调用 getMemberAnalyseComparisonData;2)tradeOrderStatisticsService.getPayUserCount;3)tradeOrderStatisticsService.getOrderPayPrice;4)。。。 |
| 78 | + // TODO 就是说:分析交给 controller 去组合; | ||
| 82 | @Override | 79 | @Override |
| 83 | public MemberAnalyseRespVO getMemberAnalyse(LocalDateTime beginTime, LocalDateTime endTime) { | 80 | public MemberAnalyseRespVO getMemberAnalyse(LocalDateTime beginTime, LocalDateTime endTime) { |
| 84 | // 对照数据 | 81 | // 对照数据 |
| 85 | MemberAnalyseComparisonRespVO vo = getMemberAnalyseComparisonData(beginTime, endTime); | 82 | MemberAnalyseComparisonRespVO vo = getMemberAnalyseComparisonData(beginTime, endTime); |
| 83 | + // TODO @疯狂:如果时间段这么处理,会不会 beginTime 重叠了。因为是 <= 一个时间;如果数据库插入的是 ,xxxx-yy-zz 00:00:00 的话,它既满足 >= ? 也满足 <= ;(如果不好理解,微信聊) | ||
| 86 | LocalDateTime referenceBeginTime = beginTime.minus(Duration.between(beginTime, endTime)); | 84 | LocalDateTime referenceBeginTime = beginTime.minus(Duration.between(beginTime, endTime)); |
| 87 | MemberAnalyseComparisonRespVO reference = getMemberAnalyseComparisonData(referenceBeginTime, beginTime); | 85 | MemberAnalyseComparisonRespVO reference = getMemberAnalyseComparisonData(referenceBeginTime, beginTime); |
| 88 | 86 | ||
| 89 | - Integer payUserCount = tradeOrderStatisticsService.getPayUserCount(beginTime, endTime); | ||
| 90 | // 计算客单价 | 87 | // 计算客单价 |
| 88 | + // TODO @疯狂:这个可能有点特殊,要按照 create_time 来查询;不然它的漏斗就不统一;因为是访问数量 > 今日下单人 > 今日支付人;是一个统一的维度; | ||
| 89 | + Integer payUserCount = tradeOrderStatisticsService.getPayUserCount(beginTime, endTime); | ||
| 91 | int atv = 0; | 90 | int atv = 0; |
| 92 | if (payUserCount != null && payUserCount > 0) { | 91 | if (payUserCount != null && payUserCount > 0) { |
| 92 | + // TODO @疯狂:类似上面的 payUserCount | ||
| 93 | Integer payPrice = tradeOrderStatisticsService.getOrderPayPrice(beginTime, endTime); | 93 | Integer payPrice = tradeOrderStatisticsService.getOrderPayPrice(beginTime, endTime); |
| 94 | atv = NumberUtil.div(payPrice, payUserCount).intValue(); | 94 | atv = NumberUtil.div(payPrice, payUserCount).intValue(); |
| 95 | } | 95 | } |
| @@ -103,11 +103,17 @@ public class MemberStatisticsServiceImpl implements MemberStatisticsService { | @@ -103,11 +103,17 @@ public class MemberStatisticsServiceImpl implements MemberStatisticsService { | ||
| 103 | 103 | ||
| 104 | private MemberAnalyseComparisonRespVO getMemberAnalyseComparisonData(LocalDateTime beginTime, LocalDateTime endTime) { | 104 | private MemberAnalyseComparisonRespVO getMemberAnalyseComparisonData(LocalDateTime beginTime, LocalDateTime endTime) { |
| 105 | Integer rechargeUserCount = Optional.ofNullable(payWalletStatisticsService.getUserRechargeSummary(beginTime, endTime)) | 105 | Integer rechargeUserCount = Optional.ofNullable(payWalletStatisticsService.getUserRechargeSummary(beginTime, endTime)) |
| 106 | - .map(MemberSummaryRespVO::getRechargeUserCount).orElse(0); | 106 | + .map(RechargeSummaryRespBO::getRechargeUserCount).orElse(0); |
| 107 | return new MemberAnalyseComparisonRespVO() | 107 | return new MemberAnalyseComparisonRespVO() |
| 108 | .setUserCount(memberStatisticsMapper.selectUserCount(beginTime, endTime)) | 108 | .setUserCount(memberStatisticsMapper.selectUserCount(beginTime, endTime)) |
| 109 | .setActiveUserCount(apiAccessLogStatisticsService.getActiveUserCount(beginTime, endTime)) | 109 | .setActiveUserCount(apiAccessLogStatisticsService.getActiveUserCount(beginTime, endTime)) |
| 110 | .setRechargeUserCount(rechargeUserCount); | 110 | .setRechargeUserCount(rechargeUserCount); |
| 111 | } | 111 | } |
| 112 | 112 | ||
| 113 | + @Override | ||
| 114 | + public List<MemberSexStatisticsRespVO> getMemberSexStatisticsList() { | ||
| 115 | + // TODO @疯狂:需要考虑,用户性别为空,则是“未知” | ||
| 116 | + return memberStatisticsMapper.selectSummaryListBySex(); | ||
| 117 | + } | ||
| 118 | + | ||
| 113 | } | 119 | } |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/pay/PayWalletStatisticsService.java
| 1 | package cn.iocoder.yudao.module.statistics.service.pay; | 1 | package cn.iocoder.yudao.module.statistics.service.pay; |
| 2 | 2 | ||
| 3 | -import cn.iocoder.yudao.module.statistics.controller.admin.member.vo.MemberSummaryRespVO; | 3 | +import cn.iocoder.yudao.module.statistics.service.pay.bo.RechargeSummaryRespBO; |
| 4 | import cn.iocoder.yudao.module.statistics.service.trade.bo.WalletSummaryRespBO; | 4 | import cn.iocoder.yudao.module.statistics.service.trade.bo.WalletSummaryRespBO; |
| 5 | 5 | ||
| 6 | import java.time.LocalDateTime; | 6 | import java.time.LocalDateTime; |
| @@ -12,6 +12,7 @@ import java.time.LocalDateTime; | @@ -12,6 +12,7 @@ import java.time.LocalDateTime; | ||
| 12 | */ | 12 | */ |
| 13 | public interface PayWalletStatisticsService { | 13 | public interface PayWalletStatisticsService { |
| 14 | 14 | ||
| 15 | + // TODO 芋艿:已经 review | ||
| 15 | /** | 16 | /** |
| 16 | * 获取钱包统计 | 17 | * 获取钱包统计 |
| 17 | * | 18 | * |
| @@ -21,6 +22,7 @@ public interface PayWalletStatisticsService { | @@ -21,6 +22,7 @@ public interface PayWalletStatisticsService { | ||
| 21 | */ | 22 | */ |
| 22 | WalletSummaryRespBO getWalletSummary(LocalDateTime beginTime, LocalDateTime endTime); | 23 | WalletSummaryRespBO getWalletSummary(LocalDateTime beginTime, LocalDateTime endTime); |
| 23 | 24 | ||
| 25 | + // TODO 芋艿:已经 review | ||
| 24 | /** | 26 | /** |
| 25 | * 获取钱包充值统计 | 27 | * 获取钱包充值统计 |
| 26 | * | 28 | * |
| @@ -28,6 +30,6 @@ public interface PayWalletStatisticsService { | @@ -28,6 +30,6 @@ public interface PayWalletStatisticsService { | ||
| 28 | * @param endTime 截止时间 | 30 | * @param endTime 截止时间 |
| 29 | * @return 钱包充值统计 | 31 | * @return 钱包充值统计 |
| 30 | */ | 32 | */ |
| 31 | - MemberSummaryRespVO getUserRechargeSummary(LocalDateTime beginTime, LocalDateTime endTime); | 33 | + RechargeSummaryRespBO getUserRechargeSummary(LocalDateTime beginTime, LocalDateTime endTime); |
| 32 | 34 | ||
| 33 | } | 35 | } |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/pay/PayWalletStatisticsServiceImpl.java
| @@ -2,8 +2,8 @@ package cn.iocoder.yudao.module.statistics.service.pay; | @@ -2,8 +2,8 @@ package cn.iocoder.yudao.module.statistics.service.pay; | ||
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.module.pay.enums.member.PayWalletBizTypeEnum; | 3 | import cn.iocoder.yudao.module.pay.enums.member.PayWalletBizTypeEnum; |
| 4 | import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum; | 4 | import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum; |
| 5 | -import cn.iocoder.yudao.module.statistics.controller.admin.member.vo.MemberSummaryRespVO; | ||
| 6 | import cn.iocoder.yudao.module.statistics.dal.mysql.pay.PayWalletStatisticsMapper; | 5 | import cn.iocoder.yudao.module.statistics.dal.mysql.pay.PayWalletStatisticsMapper; |
| 6 | +import cn.iocoder.yudao.module.statistics.service.pay.bo.RechargeSummaryRespBO; | ||
| 7 | import cn.iocoder.yudao.module.statistics.service.trade.bo.WalletSummaryRespBO; | 7 | import cn.iocoder.yudao.module.statistics.service.trade.bo.WalletSummaryRespBO; |
| 8 | import org.springframework.stereotype.Service; | 8 | import org.springframework.stereotype.Service; |
| 9 | import org.springframework.validation.annotation.Validated; | 9 | import org.springframework.validation.annotation.Validated; |
| @@ -39,7 +39,7 @@ public class PayWalletStatisticsServiceImpl implements PayWalletStatisticsServic | @@ -39,7 +39,7 @@ public class PayWalletStatisticsServiceImpl implements PayWalletStatisticsServic | ||
| 39 | } | 39 | } |
| 40 | 40 | ||
| 41 | @Override | 41 | @Override |
| 42 | - public MemberSummaryRespVO getUserRechargeSummary(LocalDateTime beginTime, LocalDateTime endTime) { | 42 | + public RechargeSummaryRespBO getUserRechargeSummary(LocalDateTime beginTime, LocalDateTime endTime) { |
| 43 | return payWalletStatisticsMapper.selectRechargeSummaryGroupByWalletId(beginTime, endTime, true); | 43 | return payWalletStatisticsMapper.selectRechargeSummaryGroupByWalletId(beginTime, endTime, true); |
| 44 | } | 44 | } |
| 45 | 45 |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/pay/bo/RechargeSummaryRespBO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.statistics.service.pay.bo; | ||
| 2 | + | ||
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | +import lombok.Data; | ||
| 5 | + | ||
| 6 | +// TODO @疯狂:BO 不用写 swagger 注解哈,写注释就好啦; | ||
| 7 | +@Schema(description = "管理后台 - 充值统计 Response VO") | ||
| 8 | +@Data | ||
| 9 | +public class RechargeSummaryRespBO { | ||
| 10 | + | ||
| 11 | + @Schema(description = "充值会员数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "221") | ||
| 12 | + private Integer rechargeUserCount; | ||
| 13 | + | ||
| 14 | + @Schema(description = "充值金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") | ||
| 15 | + private Integer rechargePrice; | ||
| 16 | + | ||
| 17 | +} |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/AfterSaleStatisticsService.java
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/BrokerageStatisticsService.java
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeOrderStatisticsService.java
| @@ -22,6 +22,7 @@ public interface TradeOrderStatisticsService { | @@ -22,6 +22,7 @@ public interface TradeOrderStatisticsService { | ||
| 22 | */ | 22 | */ |
| 23 | TradeOrderSummaryRespBO getOrderSummary(LocalDateTime beginTime, LocalDateTime endTime); | 23 | TradeOrderSummaryRespBO getOrderSummary(LocalDateTime beginTime, LocalDateTime endTime); |
| 24 | 24 | ||
| 25 | + // TODO 芋艿:已经 review | ||
| 25 | /** | 26 | /** |
| 26 | * 获取地区订单统计 | 27 | * 获取地区订单统计 |
| 27 | * | 28 | * |
| @@ -29,15 +30,17 @@ public interface TradeOrderStatisticsService { | @@ -29,15 +30,17 @@ public interface TradeOrderStatisticsService { | ||
| 29 | */ | 30 | */ |
| 30 | List<MemberAreaStatisticsRespVO> getSummaryListByAreaId(); | 31 | List<MemberAreaStatisticsRespVO> getSummaryListByAreaId(); |
| 31 | 32 | ||
| 33 | + // TODO 芋艿:已经 review | ||
| 32 | /** | 34 | /** |
| 33 | * 获取下单用户数量 | 35 | * 获取下单用户数量 |
| 34 | * | 36 | * |
| 35 | * @param beginTime 起始时间 | 37 | * @param beginTime 起始时间 |
| 36 | * @param endTime 截止时间 | 38 | * @param endTime 截止时间 |
| 37 | - * @return 支付下单数量 | 39 | + * @return 下单用户数量 |
| 38 | */ | 40 | */ |
| 39 | Integer getOrderUserCount(LocalDateTime beginTime, LocalDateTime endTime); | 41 | Integer getOrderUserCount(LocalDateTime beginTime, LocalDateTime endTime); |
| 40 | 42 | ||
| 43 | + // TODO 芋艿:已经 review | ||
| 41 | /** | 44 | /** |
| 42 | * 获取支付用户数量 | 45 | * 获取支付用户数量 |
| 43 | * | 46 | * |
| @@ -47,6 +50,7 @@ public interface TradeOrderStatisticsService { | @@ -47,6 +50,7 @@ public interface TradeOrderStatisticsService { | ||
| 47 | */ | 50 | */ |
| 48 | Integer getPayUserCount(LocalDateTime beginTime, LocalDateTime endTime); | 51 | Integer getPayUserCount(LocalDateTime beginTime, LocalDateTime endTime); |
| 49 | 52 | ||
| 53 | + // TODO 芋艿:已经 review | ||
| 50 | /** | 54 | /** |
| 51 | * 获取支付金额 | 55 | * 获取支付金额 |
| 52 | * | 56 | * |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeStatisticsService.java
| @@ -32,6 +32,8 @@ public interface TradeStatisticsService { | @@ -32,6 +32,8 @@ public interface TradeStatisticsService { | ||
| 32 | /** | 32 | /** |
| 33 | * 获得交易状况统计 | 33 | * 获得交易状况统计 |
| 34 | * | 34 | * |
| 35 | + * @param beginTime 开始时间 | ||
| 36 | + * @param endTime 结束时间 | ||
| 35 | * @return 统计数据对照 | 37 | * @return 统计数据对照 |
| 36 | */ | 38 | */ |
| 37 | Integer getExpensePrice(LocalDateTime beginTime, LocalDateTime endTime); | 39 | Integer getExpensePrice(LocalDateTime beginTime, LocalDateTime endTime); |
| @@ -43,6 +45,7 @@ public interface TradeStatisticsService { | @@ -43,6 +45,7 @@ public interface TradeStatisticsService { | ||
| 43 | */ | 45 | */ |
| 44 | List<TradeTrendSummaryRespVO> getTradeStatisticsList(LocalDateTime beginTime, LocalDateTime endTime); | 46 | List<TradeTrendSummaryRespVO> getTradeStatisticsList(LocalDateTime beginTime, LocalDateTime endTime); |
| 45 | 47 | ||
| 48 | + // TODO 芋艿:已经 review; | ||
| 46 | /** | 49 | /** |
| 47 | * 统计昨日交易 | 50 | * 统计昨日交易 |
| 48 | * | 51 | * |
yudao-module-mall/yudao-module-statistics-biz/src/main/java/cn/iocoder/yudao/module/statistics/service/trade/TradeStatisticsServiceImpl.java
| @@ -57,6 +57,30 @@ public class TradeStatisticsServiceImpl implements TradeStatisticsService { | @@ -57,6 +57,30 @@ public class TradeStatisticsServiceImpl implements TradeStatisticsService { | ||
| 57 | return TradeStatisticsConvert.INSTANCE.convert(yesterdayData, beforeYesterdayData, monthData, lastMonthData); | 57 | return TradeStatisticsConvert.INSTANCE.convert(yesterdayData, beforeYesterdayData, monthData, lastMonthData); |
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | + /** | ||
| 61 | + * 统计指定日期的交易数据 | ||
| 62 | + * | ||
| 63 | + * @param days 增加的天数 | ||
| 64 | + * @return 交易数据 | ||
| 65 | + */ | ||
| 66 | + private TradeSummaryRespBO getTradeSummaryByDays(int days) { | ||
| 67 | + LocalDateTime date = LocalDateTime.now().plusDays(days); | ||
| 68 | + return tradeStatisticsMapper.selectOrderCreateCountSumAndOrderPayPriceSumByTimeBetween( | ||
| 69 | + LocalDateTimeUtil.beginOfDay(date), LocalDateTimeUtil.endOfDay(date)); | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + /** | ||
| 73 | + * 统计指定月份的交易数据 | ||
| 74 | + * | ||
| 75 | + * @param months 增加的月数 | ||
| 76 | + * @return 交易数据 | ||
| 77 | + */ | ||
| 78 | + private TradeSummaryRespBO getTradeSummaryByMonths(int months) { | ||
| 79 | + LocalDateTime monthDate = LocalDateTime.now().plusMonths(months); | ||
| 80 | + return tradeStatisticsMapper.selectOrderCreateCountSumAndOrderPayPriceSumByTimeBetween( | ||
| 81 | + LocalDateTimeUtils.beginOfMonth(monthDate), LocalDateTimeUtils.endOfMonth(monthDate)); | ||
| 82 | + } | ||
| 83 | + | ||
| 60 | @Override | 84 | @Override |
| 61 | public TradeStatisticsComparisonRespVO<TradeTrendSummaryRespVO> getTradeTrendSummaryComparison(LocalDateTime beginTime, | 85 | public TradeStatisticsComparisonRespVO<TradeTrendSummaryRespVO> getTradeTrendSummaryComparison(LocalDateTime beginTime, |
| 62 | LocalDateTime endTime) { | 86 | LocalDateTime endTime) { |
| @@ -73,6 +97,7 @@ public class TradeStatisticsServiceImpl implements TradeStatisticsService { | @@ -73,6 +97,7 @@ public class TradeStatisticsServiceImpl implements TradeStatisticsService { | ||
| 73 | return tradeStatisticsMapper.selectExpensePriceByTimeBetween(beginTime, endTime); | 97 | return tradeStatisticsMapper.selectExpensePriceByTimeBetween(beginTime, endTime); |
| 74 | } | 98 | } |
| 75 | 99 | ||
| 100 | + // TODO @疯狂:是不是直接返回 TradeStatisticsDO;上层在去聚合? | ||
| 76 | @Override | 101 | @Override |
| 77 | public List<TradeTrendSummaryRespVO> getTradeStatisticsList(LocalDateTime beginTime, LocalDateTime endTime) { | 102 | public List<TradeTrendSummaryRespVO> getTradeStatisticsList(LocalDateTime beginTime, LocalDateTime endTime) { |
| 78 | return tradeStatisticsMapper.selectListByTimeBetween(beginTime, endTime); | 103 | return tradeStatisticsMapper.selectListByTimeBetween(beginTime, endTime); |
| @@ -80,6 +105,9 @@ public class TradeStatisticsServiceImpl implements TradeStatisticsService { | @@ -80,6 +105,9 @@ public class TradeStatisticsServiceImpl implements TradeStatisticsService { | ||
| 80 | 105 | ||
| 81 | @Override | 106 | @Override |
| 82 | public String statisticsYesterdayTrade() { | 107 | public String statisticsYesterdayTrade() { |
| 108 | + // TODO @疯狂:如果已经统计,则跳过; | ||
| 109 | + // TODO @疯狂:改成 statisticsTrade,然后传入 days,统计多少天;days 通过 job 传参;方便把历史给统计出来;或者大家有的时候要修复数据(会 fix 业务数据,然后清理统计表),重新统计的时候; | ||
| 110 | + // 1. 从各个数据表,统计对应数据 | ||
| 83 | LocalDateTime yesterday = LocalDateTime.now().minusDays(1); | 111 | LocalDateTime yesterday = LocalDateTime.now().minusDays(1); |
| 84 | LocalDateTime beginTime = LocalDateTimeUtil.beginOfDay(yesterday); | 112 | LocalDateTime beginTime = LocalDateTimeUtil.beginOfDay(yesterday); |
| 85 | LocalDateTime endTime = LocalDateTimeUtil.endOfDay(yesterday); | 113 | LocalDateTime endTime = LocalDateTimeUtil.endOfDay(yesterday); |
| @@ -108,28 +136,4 @@ public class TradeStatisticsServiceImpl implements TradeStatisticsService { | @@ -108,28 +136,4 @@ public class TradeStatisticsServiceImpl implements TradeStatisticsService { | ||
| 108 | return stopWatch.prettyPrint(); | 136 | return stopWatch.prettyPrint(); |
| 109 | } | 137 | } |
| 110 | 138 | ||
| 111 | - /** | ||
| 112 | - * 统计指定日期的交易数据 | ||
| 113 | - * | ||
| 114 | - * @param days 增加的天数 | ||
| 115 | - * @return 交易数据 | ||
| 116 | - */ | ||
| 117 | - private TradeSummaryRespBO getTradeSummaryByDays(int days) { | ||
| 118 | - LocalDateTime date = LocalDateTime.now().plusDays(days); | ||
| 119 | - return tradeStatisticsMapper.selectOrderCreateCountSumAndOrderPayPriceSumByTimeBetween( | ||
| 120 | - LocalDateTimeUtil.beginOfDay(date), LocalDateTimeUtil.endOfDay(date)); | ||
| 121 | - } | ||
| 122 | - | ||
| 123 | - /** | ||
| 124 | - * 统计指定月份的交易数据 | ||
| 125 | - * | ||
| 126 | - * @param months 增加的月数 | ||
| 127 | - * @return 交易数据 | ||
| 128 | - */ | ||
| 129 | - private TradeSummaryRespBO getTradeSummaryByMonths(int months) { | ||
| 130 | - LocalDateTime monthDate = LocalDateTime.now().plusMonths(months); | ||
| 131 | - return tradeStatisticsMapper.selectOrderCreateCountSumAndOrderPayPriceSumByTimeBetween( | ||
| 132 | - LocalDateTimeUtils.beginOfMonth(monthDate), LocalDateTimeUtils.endOfMonth(monthDate)); | ||
| 133 | - } | ||
| 134 | - | ||
| 135 | } | 139 | } |
yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/infra/ApiAccessLogStatisticsMapper.xml
| @@ -3,6 +3,7 @@ | @@ -3,6 +3,7 @@ | ||
| 3 | <mapper namespace="cn.iocoder.yudao.module.statistics.dal.mysql.infra.ApiAccessLogStatisticsMapper"> | 3 | <mapper namespace="cn.iocoder.yudao.module.statistics.dal.mysql.infra.ApiAccessLogStatisticsMapper"> |
| 4 | 4 | ||
| 5 | <select id="selectCountByIp" resultType="java.lang.Integer"> | 5 | <select id="selectCountByIp" resultType="java.lang.Integer"> |
| 6 | + <!-- TODO @疯狂:distinct 会不会更合适哈 --> | ||
| 6 | SELECT COUNT(1) | 7 | SELECT COUNT(1) |
| 7 | FROM infra_api_access_log | 8 | FROM infra_api_access_log |
| 8 | WHERE create_time BETWEEN #{beginTime} AND #{endTime} | 9 | WHERE create_time BETWEEN #{beginTime} AND #{endTime} |
| @@ -11,6 +12,7 @@ | @@ -11,6 +12,7 @@ | ||
| 11 | </select> | 12 | </select> |
| 12 | 13 | ||
| 13 | <select id="selectCountByUserId" resultType="java.lang.Integer"> | 14 | <select id="selectCountByUserId" resultType="java.lang.Integer"> |
| 15 | + <!-- TODO @疯狂:distinct 会不会更合适哈 --> | ||
| 14 | SELECT COUNT(1) | 16 | SELECT COUNT(1) |
| 15 | FROM infra_api_access_log | 17 | FROM infra_api_access_log |
| 16 | WHERE user_id > 0 | 18 | WHERE user_id > 0 |
yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/member/MemberStatisticsMapper.xml
| @@ -8,8 +8,6 @@ | @@ -8,8 +8,6 @@ | ||
| 8 | FROM member_user | 8 | FROM member_user |
| 9 | WHERE deleted = FALSE | 9 | WHERE deleted = FALSE |
| 10 | GROUP BY area_id | 10 | GROUP BY area_id |
| 11 | - <!-- TODO @疯狂:order by 是不是交给内存哈 --> | ||
| 12 | - ORDER BY userCount DESC | ||
| 13 | </select> | 11 | </select> |
| 14 | 12 | ||
| 15 | <select id="selectSummaryListBySex" | 13 | <select id="selectSummaryListBySex" |
| @@ -18,8 +16,6 @@ | @@ -18,8 +16,6 @@ | ||
| 18 | FROM member_user | 16 | FROM member_user |
| 19 | WHERE deleted = FALSE | 17 | WHERE deleted = FALSE |
| 20 | GROUP BY sex | 18 | GROUP BY sex |
| 21 | - <!-- TODO @疯狂:order by 是不是交给内存哈 --> | ||
| 22 | - ORDER BY userCount DESC | ||
| 23 | </select> | 19 | </select> |
| 24 | 20 | ||
| 25 | <select id="selectUserCount" resultType="java.lang.Integer"> | 21 | <select id="selectUserCount" resultType="java.lang.Integer"> |
yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/pay/PayWalletStatisticsMapper.xml
| 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| 3 | <mapper namespace="cn.iocoder.yudao.module.statistics.dal.mysql.pay.PayWalletStatisticsMapper"> | 3 | <mapper namespace="cn.iocoder.yudao.module.statistics.dal.mysql.pay.PayWalletStatisticsMapper"> |
| 4 | + | ||
| 4 | <select id="selectRechargeSummaryByPayTimeBetween" | 5 | <select id="selectRechargeSummaryByPayTimeBetween" |
| 5 | resultType="cn.iocoder.yudao.module.statistics.service.trade.bo.WalletSummaryRespBO"> | 6 | resultType="cn.iocoder.yudao.module.statistics.service.trade.bo.WalletSummaryRespBO"> |
| 6 | SELECT COUNT(1) AS rechargePayCount, | 7 | SELECT COUNT(1) AS rechargePayCount, |
| @@ -30,7 +31,8 @@ | @@ -30,7 +31,8 @@ | ||
| 30 | </select> | 31 | </select> |
| 31 | 32 | ||
| 32 | <select id="selectRechargeSummaryGroupByWalletId" | 33 | <select id="selectRechargeSummaryGroupByWalletId" |
| 33 | - resultType="cn.iocoder.yudao.module.statistics.controller.admin.member.vo.MemberSummaryRespVO"> | 34 | + resultType="cn.iocoder.yudao.module.statistics.service.pay.bo.RechargeSummaryRespBO"> |
| 35 | + <!-- TODO @疯狂:是不是不用 group by,而是通过 DISTINCT wallet_id 更合适哈? --> | ||
| 34 | SELECT COUNT(1) AS rechargeUserCount, | 36 | SELECT COUNT(1) AS rechargeUserCount, |
| 35 | SUM(pay_price) AS rechargePrice | 37 | SUM(pay_price) AS rechargePrice |
| 36 | FROM pay_wallet_recharge | 38 | FROM pay_wallet_recharge |
yudao-module-mall/yudao-module-statistics-biz/src/main/resources/mapper/trade/TradeStatisticsMapper.xml
| @@ -2,6 +2,15 @@ | @@ -2,6 +2,15 @@ | ||
| 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | 2 | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| 3 | <mapper namespace="cn.iocoder.yudao.module.statistics.dal.mysql.trade.TradeStatisticsMapper"> | 3 | <mapper namespace="cn.iocoder.yudao.module.statistics.dal.mysql.trade.TradeStatisticsMapper"> |
| 4 | 4 | ||
| 5 | + <select id="selectOrderCreateCountSumAndOrderPayPriceSumByTimeBetween" | ||
| 6 | + resultType="cn.iocoder.yudao.module.statistics.service.trade.bo.TradeSummaryRespBO"> | ||
| 7 | + SELECT IFNULL(SUM(order_create_count), 0) AS count, | ||
| 8 | + IFNULL(SUM(order_pay_price), 0) AS summary | ||
| 9 | + FROM trade_statistics | ||
| 10 | + WHERE time BETWEEN #{beginTime} AND #{endTime} | ||
| 11 | + AND deleted = FALSE | ||
| 12 | + </select> | ||
| 13 | + | ||
| 5 | <select id="selectByTimeBetween" | 14 | <select id="selectByTimeBetween" |
| 6 | resultType="cn.iocoder.yudao.module.statistics.controller.admin.trade.vo.TradeTrendSummaryRespVO"> | 15 | resultType="cn.iocoder.yudao.module.statistics.controller.admin.trade.vo.TradeTrendSummaryRespVO"> |
| 7 | SELECT | 16 | SELECT |
| @@ -34,13 +43,14 @@ | @@ -34,13 +43,14 @@ | ||
| 34 | FROM trade_statistics | 43 | FROM trade_statistics |
| 35 | WHERE time BETWEEN #{beginTime} AND #{endTime} | 44 | WHERE time BETWEEN #{beginTime} AND #{endTime} |
| 36 | AND deleted = FALSE | 45 | AND deleted = FALSE |
| 46 | + <!-- TODO @疯狂:已经不用 group by,它就是每天统计一条; --> | ||
| 37 | GROUP BY date | 47 | GROUP BY date |
| 38 | </select> | 48 | </select> |
| 39 | 49 | ||
| 40 | <select id="selectExpensePriceByTimeBetween" resultType="java.lang.Integer"> | 50 | <select id="selectExpensePriceByTimeBetween" resultType="java.lang.Integer"> |
| 41 | SELECT -- 支出金额 = 余额支付金额 + 支付佣金金额 + 商品退款金额 | 51 | SELECT -- 支出金额 = 余额支付金额 + 支付佣金金额 + 商品退款金额 |
| 42 | SUM(order_wallet_pay_price + brokerage_settlement_price + after_sale_refund_price) AS expensePrice | 52 | SUM(order_wallet_pay_price + brokerage_settlement_price + after_sale_refund_price) AS expensePrice |
| 43 | - FROM trade_statistics | 53 | + FROM trade_statistics |
| 44 | WHERE deleted = FALSE | 54 | WHERE deleted = FALSE |
| 45 | <if test="beginTime != null"> | 55 | <if test="beginTime != null"> |
| 46 | AND time >= #{beginTime} | 56 | AND time >= #{beginTime} |
yudao-module-mall/yudao-module-trade-api/src/main/java/cn/iocoder/yudao/module/trade/enums/order/TradeOrderOperateTypeEnum.java
| @@ -20,7 +20,8 @@ public enum TradeOrderOperateTypeEnum { | @@ -20,7 +20,8 @@ public enum TradeOrderOperateTypeEnum { | ||
| 20 | ADMIN_DELIVERY(20, "已发货,快递公司:{deliveryName},快递单号:{logisticsNo}"), | 20 | ADMIN_DELIVERY(20, "已发货,快递公司:{deliveryName},快递单号:{logisticsNo}"), |
| 21 | MEMBER_RECEIVE(30, "用户已收货"), | 21 | MEMBER_RECEIVE(30, "用户已收货"), |
| 22 | SYSTEM_RECEIVE(31, "到期未收货,系统自动确认收货"), | 22 | SYSTEM_RECEIVE(31, "到期未收货,系统自动确认收货"), |
| 23 | - PICK_UP_RECEIVE(32, "自提收货"), | 23 | + ADMIN_PICK_UP_RECEIVE(32, "管理员自提收货"), |
| 24 | + MEMBER_PICK_UP_RECEIVE(32, "用户自提收货"), | ||
| 24 | MEMBER_COMMENT(33, "用户评价"), | 25 | MEMBER_COMMENT(33, "用户评价"), |
| 25 | SYSTEM_COMMENT(34, "到期未评价,系统自动评价"), | 26 | SYSTEM_COMMENT(34, "到期未评价,系统自动评价"), |
| 26 | MEMBER_CANCEL(40, "取消订单"), | 27 | MEMBER_CANCEL(40, "取消订单"), |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/order/TradeOrderController.java
| @@ -126,11 +126,17 @@ public class TradeOrderController { | @@ -126,11 +126,17 @@ public class TradeOrderController { | ||
| 126 | return success(true); | 126 | return success(true); |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | + // TODO @疯狂:1、在【订单列表】界面,增加一个【核销按钮】。点击后,弹窗出一个核销码输入的窗口。 | ||
| 130 | + // | ||
| 131 | + //2、输入核销码后,点击确认,基于 code 查询对应的订单,之后弹窗展示。 | ||
| 132 | + // | ||
| 133 | + //3、新的弹窗,下面有个【确认核销】按钮。确认后,进行订单核销逻辑。注意,只有门店自提的订单,才可以核销。 | ||
| 134 | + // TODO 这里的 id 应该是 pickUpVerifyCode 参数哈; | ||
| 129 | @PutMapping("/pick-up") | 135 | @PutMapping("/pick-up") |
| 130 | @Operation(summary = "订单核销") | 136 | @Operation(summary = "订单核销") |
| 131 | @PreAuthorize("@ss.hasPermission('trade:order:pick-up')") | 137 | @PreAuthorize("@ss.hasPermission('trade:order:pick-up')") |
| 132 | public CommonResult<Boolean> pickUpOrder(@RequestParam("id") Long id) { | 138 | public CommonResult<Boolean> pickUpOrder(@RequestParam("id") Long id) { |
| 133 | - tradeOrderUpdateService.pickUpOrder(id); | 139 | + tradeOrderUpdateService.pickUpOrderByMember(id); |
| 134 | return success(true); | 140 | return success(true); |
| 135 | } | 141 | } |
| 136 | 142 |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateService.java
| @@ -120,14 +120,14 @@ public interface TradeOrderUpdateService { | @@ -120,14 +120,14 @@ public interface TradeOrderUpdateService { | ||
| 120 | * | 120 | * |
| 121 | * @param id 订单编号 | 121 | * @param id 订单编号 |
| 122 | */ | 122 | */ |
| 123 | - void pickUpOrder(Long id); | 123 | + void pickUpOrderByMember(Long id); |
| 124 | 124 | ||
| 125 | /** | 125 | /** |
| 126 | * 【管理员】核销订单 | 126 | * 【管理员】核销订单 |
| 127 | * | 127 | * |
| 128 | * @param pickUpVerifyCode 自提核销码 | 128 | * @param pickUpVerifyCode 自提核销码 |
| 129 | */ | 129 | */ |
| 130 | - void pickUpOrder(String pickUpVerifyCode); | 130 | + void pickUpOrderByAdmin(String pickUpVerifyCode); |
| 131 | 131 | ||
| 132 | // =================== Order Item =================== | 132 | // =================== Order Item =================== |
| 133 | 133 | ||
| @@ -178,9 +178,9 @@ public interface TradeOrderUpdateService { | @@ -178,9 +178,9 @@ public interface TradeOrderUpdateService { | ||
| 178 | * @param combinationRecordId 拼团记录编号 | 178 | * @param combinationRecordId 拼团记录编号 |
| 179 | * @param headId 团长编号 | 179 | * @param headId 团长编号 |
| 180 | */ | 180 | */ |
| 181 | - // TODO 芋艿:再 review 拼团 | ||
| 182 | void updateOrderCombinationInfo(Long orderId, Long activityId, Long combinationRecordId, Long headId); | 181 | void updateOrderCombinationInfo(Long orderId, Long activityId, Long combinationRecordId, Long headId); |
| 183 | 182 | ||
| 183 | + // TODO 芋艿:拼团取消,不调这个接口哈; | ||
| 184 | /** | 184 | /** |
| 185 | * 取消支付订单 | 185 | * 取消支付订单 |
| 186 | * | 186 | * |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderUpdateServiceImpl.java
| @@ -670,17 +670,18 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService { | @@ -670,17 +670,18 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService { | ||
| 670 | } | 670 | } |
| 671 | 671 | ||
| 672 | @Override | 672 | @Override |
| 673 | - public void pickUpOrder(Long id) { | 673 | + @TradeOrderLog(operateType = TradeOrderOperateTypeEnum.MEMBER_PICK_UP_RECEIVE) |
| 674 | + public void pickUpOrderByMember(Long id) { | ||
| 674 | getSelf().pickUpOrder(tradeOrderMapper.selectById(id)); | 675 | getSelf().pickUpOrder(tradeOrderMapper.selectById(id)); |
| 675 | } | 676 | } |
| 676 | 677 | ||
| 677 | @Override | 678 | @Override |
| 678 | - public void pickUpOrder(String pickUpVerifyCode) { | 679 | + @TradeOrderLog(operateType = TradeOrderOperateTypeEnum.ADMIN_PICK_UP_RECEIVE) |
| 680 | + public void pickUpOrderByAdmin(String pickUpVerifyCode) { | ||
| 679 | getSelf().pickUpOrder(tradeOrderMapper.selectOneByPickUpVerifyCode(pickUpVerifyCode)); | 681 | getSelf().pickUpOrder(tradeOrderMapper.selectOneByPickUpVerifyCode(pickUpVerifyCode)); |
| 680 | } | 682 | } |
| 681 | 683 | ||
| 682 | @Transactional(rollbackFor = Exception.class) | 684 | @Transactional(rollbackFor = Exception.class) |
| 683 | - @TradeOrderLog(operateType = TradeOrderOperateTypeEnum.PICK_UP_RECEIVE) | ||
| 684 | public void pickUpOrder(TradeOrderDO order) { | 685 | public void pickUpOrder(TradeOrderDO order) { |
| 685 | if (order == null) { | 686 | if (order == null) { |
| 686 | throw exception(ORDER_NOT_FOUND); | 687 | throw exception(ORDER_NOT_FOUND); |
| @@ -688,7 +689,6 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService { | @@ -688,7 +689,6 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService { | ||
| 688 | if (ObjUtil.notEqual(DeliveryTypeEnum.PICK_UP.getType(), order.getDeliveryType())) { | 689 | if (ObjUtil.notEqual(DeliveryTypeEnum.PICK_UP.getType(), order.getDeliveryType())) { |
| 689 | throw exception(ORDER_RECEIVE_FAIL_DELIVERY_TYPE_NOT_PICK_UP); | 690 | throw exception(ORDER_RECEIVE_FAIL_DELIVERY_TYPE_NOT_PICK_UP); |
| 690 | } | 691 | } |
| 691 | - // todo 校验核销操作人? | ||
| 692 | receiveOrder0(order); | 692 | receiveOrder0(order); |
| 693 | } | 693 | } |
| 694 | 694 |
yudao-module-pay/yudao-module-pay-api/src/main/java/cn/iocoder/yudao/module/pay/enums/ErrorCodeConstants.java
| @@ -63,6 +63,7 @@ public interface ErrorCodeConstants { | @@ -63,6 +63,7 @@ public interface ErrorCodeConstants { | ||
| 63 | ErrorCode WALLET_RECHARGE_REFUND_FAIL_REFUND_PRICE_NOT_MATCH = new ErrorCode(1_007_008_010, "钱包退款更新失败,退款单金额不匹配"); | 63 | ErrorCode WALLET_RECHARGE_REFUND_FAIL_REFUND_PRICE_NOT_MATCH = new ErrorCode(1_007_008_010, "钱包退款更新失败,退款单金额不匹配"); |
| 64 | ErrorCode WALLET_RECHARGE_PACKAGE_AND_PRICE_IS_EMPTY = new ErrorCode(1_007_008_011, "充值金额和充钱套餐不能同时为空"); | 64 | ErrorCode WALLET_RECHARGE_PACKAGE_AND_PRICE_IS_EMPTY = new ErrorCode(1_007_008_011, "充值金额和充钱套餐不能同时为空"); |
| 65 | ErrorCode WALLET_RECHARGE_PACKAGE_NOT_FOUND = new ErrorCode(1_007_008_012, "钱包充值套餐不存在"); | 65 | ErrorCode WALLET_RECHARGE_PACKAGE_NOT_FOUND = new ErrorCode(1_007_008_012, "钱包充值套餐不存在"); |
| 66 | + ErrorCode WALLET_RECHARGE_PACKAGE_IS_DISABLE = new ErrorCode(1_007_008_013, "钱包充值套餐已禁用"); | ||
| 66 | // ========== 转账模块 1-007-009-000 ========== | 67 | // ========== 转账模块 1-007-009-000 ========== |
| 67 | ErrorCode PAY_TRANSFER_SUBMIT_CHANNEL_ERROR = new ErrorCode(1_007_009_000, "发起转账报错,错误码:{},错误提示:{}"); | 68 | ErrorCode PAY_TRANSFER_SUBMIT_CHANNEL_ERROR = new ErrorCode(1_007_009_000, "发起转账报错,错误码:{},错误提示:{}"); |
| 68 | ErrorCode PAY_TRANSFER_ALIPAY_LOGIN_ID_IS_EMPTY = new ErrorCode(1_007_009_001, "支付宝登录 ID 不能为空"); | 69 | ErrorCode PAY_TRANSFER_ALIPAY_LOGIN_ID_IS_EMPTY = new ErrorCode(1_007_009_001, "支付宝登录 ID 不能为空"); |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/PayWalletRechargePackageController.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.pay.controller.admin.wallet; | ||
| 2 | + | ||
| 3 | +import cn.iocoder.yudao.framework.common.pojo.CommonResult; | ||
| 4 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 5 | +import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageCreateReqVO; | ||
| 6 | +import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackagePageReqVO; | ||
| 7 | +import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageRespVO; | ||
| 8 | +import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageUpdateReqVO; | ||
| 9 | +import cn.iocoder.yudao.module.pay.convert.wallet.WalletRechargePackageConvert; | ||
| 10 | +import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargePackageDO; | ||
| 11 | +import cn.iocoder.yudao.module.pay.service.wallet.PayWalletRechargePackageService; | ||
| 12 | +import io.swagger.v3.oas.annotations.Operation; | ||
| 13 | +import io.swagger.v3.oas.annotations.Parameter; | ||
| 14 | +import io.swagger.v3.oas.annotations.tags.Tag; | ||
| 15 | +import org.springframework.security.access.prepost.PreAuthorize; | ||
| 16 | +import org.springframework.validation.annotation.Validated; | ||
| 17 | +import org.springframework.web.bind.annotation.*; | ||
| 18 | + | ||
| 19 | +import javax.annotation.Resource; | ||
| 20 | +import javax.validation.Valid; | ||
| 21 | + | ||
| 22 | +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; | ||
| 23 | + | ||
| 24 | + | ||
| 25 | +@Tag(name = "管理后台 - 钱包充值套餐") | ||
| 26 | +@RestController | ||
| 27 | +@RequestMapping("/pay/wallet-recharge-package") | ||
| 28 | +@Validated | ||
| 29 | +public class PayWalletRechargePackageController { | ||
| 30 | + | ||
| 31 | + @Resource | ||
| 32 | + private PayWalletRechargePackageService walletRechargePackageService; | ||
| 33 | + | ||
| 34 | + @PostMapping("/create") | ||
| 35 | + @Operation(summary = "创建钱包充值套餐") | ||
| 36 | + @PreAuthorize("@ss.hasPermission('pay:wallet-recharge-package:create')") | ||
| 37 | + public CommonResult<Long> createWalletRechargePackage(@Valid @RequestBody WalletRechargePackageCreateReqVO createReqVO) { | ||
| 38 | + return success(walletRechargePackageService.createWalletRechargePackage(createReqVO)); | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + @PutMapping("/update") | ||
| 42 | + @Operation(summary = "更新钱包充值套餐") | ||
| 43 | + @PreAuthorize("@ss.hasPermission('pay:wallet-recharge-package:update')") | ||
| 44 | + public CommonResult<Boolean> updateWalletRechargePackage(@Valid @RequestBody WalletRechargePackageUpdateReqVO updateReqVO) { | ||
| 45 | + walletRechargePackageService.updateWalletRechargePackage(updateReqVO); | ||
| 46 | + return success(true); | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + @DeleteMapping("/delete") | ||
| 50 | + @Operation(summary = "删除钱包充值套餐") | ||
| 51 | + @Parameter(name = "id", description = "编号", required = true) | ||
| 52 | + @PreAuthorize("@ss.hasPermission('pay:wallet-recharge-package:delete')") | ||
| 53 | + public CommonResult<Boolean> deleteWalletRechargePackage(@RequestParam("id") Long id) { | ||
| 54 | + walletRechargePackageService.deleteWalletRechargePackage(id); | ||
| 55 | + return success(true); | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + @GetMapping("/get") | ||
| 59 | + @Operation(summary = "获得钱包充值套餐") | ||
| 60 | + @Parameter(name = "id", description = "编号", required = true, example = "1024") | ||
| 61 | + @PreAuthorize("@ss.hasPermission('pay:wallet-recharge-package:query')") | ||
| 62 | + public CommonResult<WalletRechargePackageRespVO> getWalletRechargePackage(@RequestParam("id") Long id) { | ||
| 63 | + PayWalletRechargePackageDO walletRechargePackage = walletRechargePackageService.getWalletRechargePackage(id); | ||
| 64 | + return success(WalletRechargePackageConvert.INSTANCE.convert(walletRechargePackage)); | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + @GetMapping("/page") | ||
| 68 | + @Operation(summary = "获得钱包充值套餐分页") | ||
| 69 | + @PreAuthorize("@ss.hasPermission('pay:wallet-recharge-package:query')") | ||
| 70 | + public CommonResult<PageResult<WalletRechargePackageRespVO>> getWalletRechargePackagePage(@Valid WalletRechargePackagePageReqVO pageVO) { | ||
| 71 | + PageResult<PayWalletRechargePackageDO> pageResult = walletRechargePackageService.getWalletRechargePackagePage(pageVO); | ||
| 72 | + return success(WalletRechargePackageConvert.INSTANCE.convertPage(pageResult)); | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | +} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/rechargepackage/WalletRechargePackageBaseVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage; | ||
| 2 | + | ||
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | +import lombok.Data; | ||
| 5 | + | ||
| 6 | +import javax.validation.constraints.NotNull; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * 套餐充值 Base VO,提供给添加、修改、详细的子 VO 使用 | ||
| 10 | + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 | ||
| 11 | + */ | ||
| 12 | +@Data | ||
| 13 | +public class WalletRechargePackageBaseVO { | ||
| 14 | + | ||
| 15 | + @Schema(description = "套餐名", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") | ||
| 16 | + @NotNull(message = "套餐名不能为空") | ||
| 17 | + private String name; | ||
| 18 | + | ||
| 19 | + @Schema(description = "支付金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "16454") | ||
| 20 | + @NotNull(message = "支付金额不能为空") | ||
| 21 | + private Integer payPrice; | ||
| 22 | + | ||
| 23 | + @Schema(description = "赠送金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "20887") | ||
| 24 | + @NotNull(message = "赠送金额不能为空") | ||
| 25 | + private Integer bonusPrice; | ||
| 26 | + | ||
| 27 | + @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") | ||
| 28 | + @NotNull(message = "状态不能为空") | ||
| 29 | + private Byte status; | ||
| 30 | + | ||
| 31 | +} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/rechargepackage/WalletRechargePackageCreateReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage; | ||
| 2 | + | ||
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | +import lombok.Data; | ||
| 5 | +import lombok.EqualsAndHashCode; | ||
| 6 | +import lombok.ToString; | ||
| 7 | + | ||
| 8 | +@Schema(description = "管理后台 - 套餐充值创建 Request VO") | ||
| 9 | +@Data | ||
| 10 | +@EqualsAndHashCode(callSuper = true) | ||
| 11 | +@ToString(callSuper = true) | ||
| 12 | +public class WalletRechargePackageCreateReqVO extends WalletRechargePackageBaseVO { | ||
| 13 | + | ||
| 14 | +} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/rechargepackage/WalletRechargePackagePageReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage; | ||
| 2 | + | ||
| 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; | ||
| 8 | +import org.springframework.format.annotation.DateTimeFormat; | ||
| 9 | + | ||
| 10 | +import java.time.LocalDateTime; | ||
| 11 | + | ||
| 12 | +import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; | ||
| 13 | + | ||
| 14 | +@Schema(description = "管理后台 - 套餐充值分页 Request VO") | ||
| 15 | +@Data | ||
| 16 | +@EqualsAndHashCode(callSuper = true) | ||
| 17 | +@ToString(callSuper = true) | ||
| 18 | +public class WalletRechargePackagePageReqVO extends PageParam { | ||
| 19 | + | ||
| 20 | + @Schema(description = "套餐名", example = "李四") | ||
| 21 | + private String name; | ||
| 22 | + | ||
| 23 | + @Schema(description = "支付金额", example = "16454") | ||
| 24 | + private Integer payPrice; | ||
| 25 | + | ||
| 26 | + @Schema(description = "赠送金额", example = "20887") | ||
| 27 | + private Integer bonusPrice; | ||
| 28 | + | ||
| 29 | + @Schema(description = "状态", example = "2") | ||
| 30 | + private Integer status; | ||
| 31 | + | ||
| 32 | + @Schema(description = "创建时间") | ||
| 33 | + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) | ||
| 34 | + private LocalDateTime[] createTime; | ||
| 35 | + | ||
| 36 | +} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/rechargepackage/WalletRechargePackageRespVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage; | ||
| 2 | + | ||
| 3 | +import io.swagger.v3.oas.annotations.media.Schema; | ||
| 4 | +import lombok.*; | ||
| 5 | +import java.time.LocalDateTime; | ||
| 6 | + | ||
| 7 | +@Schema(description = "管理后台 - 套餐充值 Response VO") | ||
| 8 | +@Data | ||
| 9 | +@EqualsAndHashCode(callSuper = true) | ||
| 10 | +@ToString(callSuper = true) | ||
| 11 | +public class WalletRechargePackageRespVO extends WalletRechargePackageBaseVO { | ||
| 12 | + | ||
| 13 | + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9032") | ||
| 14 | + private Long id; | ||
| 15 | + | ||
| 16 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) | ||
| 17 | + private LocalDateTime createTime; | ||
| 18 | + | ||
| 19 | +} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/controller/admin/wallet/vo/rechargepackage/WalletRechargePackageUpdateReqVO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage; | ||
| 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 javax.validation.constraints.NotNull; | ||
| 9 | + | ||
| 10 | +@Schema(description = "管理后台 - 套餐充值更新 Request VO") | ||
| 11 | +@Data | ||
| 12 | +@EqualsAndHashCode(callSuper = true) | ||
| 13 | +@ToString(callSuper = true) | ||
| 14 | +public class WalletRechargePackageUpdateReqVO extends WalletRechargePackageBaseVO { | ||
| 15 | + | ||
| 16 | + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9032") | ||
| 17 | + @NotNull(message = "编号不能为空") | ||
| 18 | + private Long id; | ||
| 19 | + | ||
| 20 | +} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/transfer/PayTransferConvert.java
| @@ -7,9 +7,6 @@ import org.mapstruct.Mapper; | @@ -7,9 +7,6 @@ import org.mapstruct.Mapper; | ||
| 7 | import org.mapstruct.Mapping; | 7 | import org.mapstruct.Mapping; |
| 8 | import org.mapstruct.factory.Mappers; | 8 | import org.mapstruct.factory.Mappers; |
| 9 | 9 | ||
| 10 | -/** | ||
| 11 | - * @author jason | ||
| 12 | - */ | ||
| 13 | @Mapper | 10 | @Mapper |
| 14 | public interface PayTransferConvert { | 11 | public interface PayTransferConvert { |
| 15 | 12 |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/wallet/PayWalletRechargeConvert.java
| @@ -6,9 +6,6 @@ import org.mapstruct.Mapper; | @@ -6,9 +6,6 @@ import org.mapstruct.Mapper; | ||
| 6 | import org.mapstruct.Mapping; | 6 | import org.mapstruct.Mapping; |
| 7 | import org.mapstruct.factory.Mappers; | 7 | import org.mapstruct.factory.Mappers; |
| 8 | 8 | ||
| 9 | -/** | ||
| 10 | - * @author jason | ||
| 11 | - */ | ||
| 12 | @Mapper | 9 | @Mapper |
| 13 | public interface PayWalletRechargeConvert { | 10 | public interface PayWalletRechargeConvert { |
| 14 | 11 |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/convert/wallet/WalletRechargePackageConvert.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.pay.convert.wallet; | ||
| 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.wallet.vo.rechargepackage.WalletRechargePackageCreateReqVO; | ||
| 8 | +import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageRespVO; | ||
| 9 | +import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageUpdateReqVO; | ||
| 10 | +import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargePackageDO; | ||
| 11 | +import org.mapstruct.Mapper; | ||
| 12 | +import org.mapstruct.factory.Mappers; | ||
| 13 | + | ||
| 14 | +@Mapper | ||
| 15 | +public interface WalletRechargePackageConvert { | ||
| 16 | + | ||
| 17 | + WalletRechargePackageConvert INSTANCE = Mappers.getMapper(WalletRechargePackageConvert.class); | ||
| 18 | + | ||
| 19 | + PayWalletRechargePackageDO convert(WalletRechargePackageCreateReqVO bean); | ||
| 20 | + | ||
| 21 | + PayWalletRechargePackageDO convert(WalletRechargePackageUpdateReqVO bean); | ||
| 22 | + | ||
| 23 | + WalletRechargePackageRespVO convert(PayWalletRechargePackageDO bean); | ||
| 24 | + | ||
| 25 | + List<WalletRechargePackageRespVO> convertList(List<PayWalletRechargePackageDO> list); | ||
| 26 | + | ||
| 27 | + PageResult<WalletRechargePackageRespVO> convertPage(PageResult<PayWalletRechargePackageDO> page); | ||
| 28 | + | ||
| 29 | +} |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/dal/mysql/wallet/PayWalletRechargePackageMapper.java
| 1 | package cn.iocoder.yudao.module.pay.dal.mysql.wallet; | 1 | package cn.iocoder.yudao.module.pay.dal.mysql.wallet; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | +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.mapper.BaseMapperX; |
| 6 | +import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; | ||
| 7 | +import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackagePageReqVO; | ||
| 5 | import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargePackageDO; | 8 | import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargePackageDO; |
| 6 | import org.apache.ibatis.annotations.Mapper; | 9 | import org.apache.ibatis.annotations.Mapper; |
| 7 | 10 | ||
| 8 | @Mapper | 11 | @Mapper |
| 9 | public interface PayWalletRechargePackageMapper extends BaseMapperX<PayWalletRechargePackageDO> { | 12 | public interface PayWalletRechargePackageMapper extends BaseMapperX<PayWalletRechargePackageDO> { |
| 10 | 13 | ||
| 14 | + default PageResult<PayWalletRechargePackageDO> selectPage(WalletRechargePackagePageReqVO reqVO) { | ||
| 15 | + return selectPage(reqVO, new LambdaQueryWrapperX<PayWalletRechargePackageDO>() | ||
| 16 | + .likeIfPresent(PayWalletRechargePackageDO::getName, reqVO.getName()) | ||
| 17 | + .eqIfPresent(PayWalletRechargePackageDO::getPayPrice, reqVO.getPayPrice()) | ||
| 18 | + .eqIfPresent(PayWalletRechargePackageDO::getBonusPrice, reqVO.getBonusPrice()) | ||
| 19 | + .eqIfPresent(PayWalletRechargePackageDO::getStatus, reqVO.getStatus()) | ||
| 20 | + .betweenIfPresent(PayWalletRechargePackageDO::getCreateTime, reqVO.getCreateTime()) | ||
| 21 | + .orderByDesc(PayWalletRechargePackageDO::getId)); | ||
| 22 | + } | ||
| 11 | } | 23 | } |
| 12 | 24 | ||
| 13 | 25 |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargePackageService.java
| 1 | package cn.iocoder.yudao.module.pay.service.wallet; | 1 | package cn.iocoder.yudao.module.pay.service.wallet; |
| 2 | 2 | ||
| 3 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 4 | +import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageCreateReqVO; | ||
| 5 | +import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackagePageReqVO; | ||
| 6 | +import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageUpdateReqVO; | ||
| 3 | import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargePackageDO; | 7 | import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargePackageDO; |
| 4 | 8 | ||
| 9 | +import javax.validation.Valid; | ||
| 10 | +import java.util.Collection; | ||
| 11 | +import java.util.List; | ||
| 12 | + | ||
| 5 | /** | 13 | /** |
| 6 | * 钱包充值套餐 Service 接口 | 14 | * 钱包充值套餐 Service 接口 |
| 7 | * | 15 | * |
| @@ -14,4 +22,50 @@ public interface PayWalletRechargePackageService { | @@ -14,4 +22,50 @@ public interface PayWalletRechargePackageService { | ||
| 14 | * @param packageId 充值套餐编号 | 22 | * @param packageId 充值套餐编号 |
| 15 | */ | 23 | */ |
| 16 | PayWalletRechargePackageDO getWalletRechargePackage(Long packageId); | 24 | PayWalletRechargePackageDO getWalletRechargePackage(Long packageId); |
| 25 | + | ||
| 26 | + /** | ||
| 27 | + * 校验钱包充值套餐的有效性, 无效的话抛出 ServiceException 异常 | ||
| 28 | + * | ||
| 29 | + * @param packageId 充值套餐编号 | ||
| 30 | + */ | ||
| 31 | + PayWalletRechargePackageDO validWalletRechargePackage(Long packageId); | ||
| 32 | + | ||
| 33 | + /** | ||
| 34 | + * 创建套餐充值 | ||
| 35 | + * | ||
| 36 | + * @param createReqVO 创建信息 | ||
| 37 | + * @return 编号 | ||
| 38 | + */ | ||
| 39 | + Long createWalletRechargePackage(@Valid WalletRechargePackageCreateReqVO createReqVO); | ||
| 40 | + | ||
| 41 | + /** | ||
| 42 | + * 更新套餐充值 | ||
| 43 | + * | ||
| 44 | + * @param updateReqVO 更新信息 | ||
| 45 | + */ | ||
| 46 | + void updateWalletRechargePackage(@Valid WalletRechargePackageUpdateReqVO updateReqVO); | ||
| 47 | + | ||
| 48 | + | ||
| 49 | + /** | ||
| 50 | + * 删除套餐充值 | ||
| 51 | + * | ||
| 52 | + * @param id 编号 | ||
| 53 | + */ | ||
| 54 | + void deleteWalletRechargePackage(Long id); | ||
| 55 | + | ||
| 56 | + /** | ||
| 57 | + * 获得套餐充值列表 | ||
| 58 | + * | ||
| 59 | + * @param ids 编号 | ||
| 60 | + * @return 套餐充值列表 | ||
| 61 | + */ | ||
| 62 | + List<PayWalletRechargePackageDO> getWalletRechargePackageList(Collection<Long> ids); | ||
| 63 | + | ||
| 64 | + /** | ||
| 65 | + * 获得套餐充值分页 | ||
| 66 | + * | ||
| 67 | + * @param pageReqVO 分页查询 | ||
| 68 | + * @return 套餐充值分页 | ||
| 69 | + */ | ||
| 70 | + PageResult<PayWalletRechargePackageDO> getWalletRechargePackagePage(WalletRechargePackagePageReqVO pageReqVO); | ||
| 17 | } | 71 | } |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargePackageServiceImpl.java
| 1 | package cn.iocoder.yudao.module.pay.service.wallet; | 1 | package cn.iocoder.yudao.module.pay.service.wallet; |
| 2 | 2 | ||
| 3 | +import cn.hutool.core.collection.CollUtil; | ||
| 4 | +import cn.hutool.core.collection.ListUtil; | ||
| 5 | +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | ||
| 6 | +import cn.iocoder.yudao.framework.common.pojo.PageResult; | ||
| 7 | +import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageCreateReqVO; | ||
| 8 | +import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackagePageReqVO; | ||
| 9 | +import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageUpdateReqVO; | ||
| 10 | +import cn.iocoder.yudao.module.pay.convert.wallet.WalletRechargePackageConvert; | ||
| 3 | import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargePackageDO; | 11 | import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargePackageDO; |
| 4 | import cn.iocoder.yudao.module.pay.dal.mysql.wallet.PayWalletRechargePackageMapper; | 12 | import cn.iocoder.yudao.module.pay.dal.mysql.wallet.PayWalletRechargePackageMapper; |
| 5 | import org.springframework.stereotype.Service; | 13 | import org.springframework.stereotype.Service; |
| 6 | 14 | ||
| 7 | import javax.annotation.Resource; | 15 | import javax.annotation.Resource; |
| 8 | 16 | ||
| 17 | +import java.util.Collection; | ||
| 18 | +import java.util.List; | ||
| 19 | + | ||
| 20 | +import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; | ||
| 21 | +import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.*; | ||
| 22 | + | ||
| 9 | /** | 23 | /** |
| 10 | * 钱包充值套餐 Service 实现类 | 24 | * 钱包充值套餐 Service 实现类 |
| 11 | * | 25 | * |
| @@ -15,10 +29,68 @@ import javax.annotation.Resource; | @@ -15,10 +29,68 @@ import javax.annotation.Resource; | ||
| 15 | public class PayWalletRechargePackageServiceImpl implements PayWalletRechargePackageService { | 29 | public class PayWalletRechargePackageServiceImpl implements PayWalletRechargePackageService { |
| 16 | 30 | ||
| 17 | @Resource | 31 | @Resource |
| 18 | - private PayWalletRechargePackageMapper rechargePackageMapper; | 32 | + private PayWalletRechargePackageMapper walletRechargePackageMapper; |
| 19 | 33 | ||
| 20 | @Override | 34 | @Override |
| 21 | public PayWalletRechargePackageDO getWalletRechargePackage(Long packageId) { | 35 | public PayWalletRechargePackageDO getWalletRechargePackage(Long packageId) { |
| 22 | - return rechargePackageMapper.selectById(packageId); | 36 | + return walletRechargePackageMapper.selectById(packageId); |
| 37 | + } | ||
| 38 | + | ||
| 39 | + @Override | ||
| 40 | + public PayWalletRechargePackageDO validWalletRechargePackage(Long packageId) { | ||
| 41 | + PayWalletRechargePackageDO rechargePackageDO = walletRechargePackageMapper.selectById(packageId); | ||
| 42 | + if (rechargePackageDO == null) { | ||
| 43 | + throw exception(WALLET_RECHARGE_PACKAGE_NOT_FOUND); | ||
| 44 | + } | ||
| 45 | + if (CommonStatusEnum.DISABLE.getStatus().equals(rechargePackageDO.getStatus())) { | ||
| 46 | + throw exception(WALLET_RECHARGE_PACKAGE_IS_DISABLE); | ||
| 47 | + } | ||
| 48 | + return rechargePackageDO; | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + @Override | ||
| 52 | + public Long createWalletRechargePackage(WalletRechargePackageCreateReqVO createReqVO) { | ||
| 53 | + // 插入 | ||
| 54 | + PayWalletRechargePackageDO walletRechargePackage = WalletRechargePackageConvert.INSTANCE.convert(createReqVO); | ||
| 55 | + walletRechargePackageMapper.insert(walletRechargePackage); | ||
| 56 | + // 返回 | ||
| 57 | + return walletRechargePackage.getId(); | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + @Override | ||
| 61 | + public void updateWalletRechargePackage(WalletRechargePackageUpdateReqVO updateReqVO) { | ||
| 62 | + // 校验存在 | ||
| 63 | + validateWalletRechargePackageExists(updateReqVO.getId()); | ||
| 64 | + // 更新 | ||
| 65 | + PayWalletRechargePackageDO updateObj = WalletRechargePackageConvert.INSTANCE.convert(updateReqVO); | ||
| 66 | + walletRechargePackageMapper.updateById(updateObj); | ||
| 23 | } | 67 | } |
| 68 | + | ||
| 69 | + @Override | ||
| 70 | + public void deleteWalletRechargePackage(Long id) { | ||
| 71 | + // 校验存在 | ||
| 72 | + validateWalletRechargePackageExists(id); | ||
| 73 | + // 删除 | ||
| 74 | + walletRechargePackageMapper.deleteById(id); | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + private void validateWalletRechargePackageExists(Long id) { | ||
| 78 | + if (walletRechargePackageMapper.selectById(id) == null) { | ||
| 79 | + throw exception(WALLET_RECHARGE_PACKAGE_NOT_FOUND); | ||
| 80 | + } | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + @Override | ||
| 84 | + public List<PayWalletRechargePackageDO> getWalletRechargePackageList(Collection<Long> ids) { | ||
| 85 | + if (CollUtil.isEmpty(ids)) { | ||
| 86 | + return ListUtil.empty(); | ||
| 87 | + } | ||
| 88 | + return walletRechargePackageMapper.selectBatchIds(ids); | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + @Override | ||
| 92 | + public PageResult<PayWalletRechargePackageDO> getWalletRechargePackagePage(WalletRechargePackagePageReqVO pageReqVO) { | ||
| 93 | + return walletRechargePackageMapper.selectPage(pageReqVO); | ||
| 94 | + } | ||
| 95 | + | ||
| 24 | } | 96 | } |
yudao-module-pay/yudao-module-pay-biz/src/main/java/cn/iocoder/yudao/module/pay/service/wallet/PayWalletRechargeServiceImpl.java
| @@ -52,7 +52,6 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService { | @@ -52,7 +52,6 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService { | ||
| 52 | 52 | ||
| 53 | @Resource | 53 | @Resource |
| 54 | private PayWalletRechargeMapper walletRechargeMapper; | 54 | private PayWalletRechargeMapper walletRechargeMapper; |
| 55 | - | ||
| 56 | @Resource | 55 | @Resource |
| 57 | private PayWalletService payWalletService; | 56 | private PayWalletService payWalletService; |
| 58 | @Resource | 57 | @Resource |
| @@ -74,10 +73,7 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService { | @@ -74,10 +73,7 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService { | ||
| 74 | int payPrice ; | 73 | int payPrice ; |
| 75 | int bonusPrice = 0 ; | 74 | int bonusPrice = 0 ; |
| 76 | if (Objects.nonNull(reqVO.getPackageId())) { | 75 | if (Objects.nonNull(reqVO.getPackageId())) { |
| 77 | - PayWalletRechargePackageDO rechargePackage = payWalletRechargePackageService.getWalletRechargePackage(reqVO.getPackageId()); | ||
| 78 | - if (rechargePackage == null) { | ||
| 79 | - throw exception(WALLET_RECHARGE_PACKAGE_NOT_FOUND); | ||
| 80 | - } | 76 | + PayWalletRechargePackageDO rechargePackage = payWalletRechargePackageService.validWalletRechargePackage(reqVO.getPackageId()); |
| 81 | payPrice = rechargePackage.getPayPrice(); | 77 | payPrice = rechargePackage.getPayPrice(); |
| 82 | bonusPrice = rechargePackage.getBonusPrice(); | 78 | bonusPrice = rechargePackage.getBonusPrice(); |
| 83 | } else { | 79 | } else { |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/auth/AuthController.java
| @@ -18,10 +18,10 @@ import cn.iocoder.yudao.module.system.service.permission.PermissionService; | @@ -18,10 +18,10 @@ import cn.iocoder.yudao.module.system.service.permission.PermissionService; | ||
| 18 | import cn.iocoder.yudao.module.system.service.permission.RoleService; | 18 | import cn.iocoder.yudao.module.system.service.permission.RoleService; |
| 19 | import cn.iocoder.yudao.module.system.service.social.SocialUserService; | 19 | import cn.iocoder.yudao.module.system.service.social.SocialUserService; |
| 20 | import cn.iocoder.yudao.module.system.service.user.AdminUserService; | 20 | import cn.iocoder.yudao.module.system.service.user.AdminUserService; |
| 21 | -import io.swagger.v3.oas.annotations.tags.Tag; | 21 | +import io.swagger.v3.oas.annotations.Operation; |
| 22 | import io.swagger.v3.oas.annotations.Parameter; | 22 | import io.swagger.v3.oas.annotations.Parameter; |
| 23 | import io.swagger.v3.oas.annotations.Parameters; | 23 | import io.swagger.v3.oas.annotations.Parameters; |
| 24 | -import io.swagger.v3.oas.annotations.Operation; | 24 | +import io.swagger.v3.oas.annotations.tags.Tag; |
| 25 | import lombok.extern.slf4j.Slf4j; | 25 | import lombok.extern.slf4j.Slf4j; |
| 26 | import org.springframework.validation.annotation.Validated; | 26 | import org.springframework.validation.annotation.Validated; |
| 27 | import org.springframework.web.bind.annotation.*; | 27 | import org.springframework.web.bind.annotation.*; |
| @@ -30,6 +30,7 @@ import javax.annotation.Resource; | @@ -30,6 +30,7 @@ import javax.annotation.Resource; | ||
| 30 | import javax.annotation.security.PermitAll; | 30 | import javax.annotation.security.PermitAll; |
| 31 | import javax.servlet.http.HttpServletRequest; | 31 | import javax.servlet.http.HttpServletRequest; |
| 32 | import javax.validation.Valid; | 32 | import javax.validation.Valid; |
| 33 | +import java.util.Collections; | ||
| 33 | import java.util.List; | 34 | import java.util.List; |
| 34 | import java.util.Set; | 35 | import java.util.Set; |
| 35 | 36 | ||
| @@ -101,6 +102,9 @@ public class AuthController { | @@ -101,6 +102,9 @@ public class AuthController { | ||
| 101 | 102 | ||
| 102 | // 1.2 获得角色列表 | 103 | // 1.2 获得角色列表 |
| 103 | Set<Long> roleIds = permissionService.getUserRoleIdListByUserId(getLoginUserId()); | 104 | Set<Long> roleIds = permissionService.getUserRoleIdListByUserId(getLoginUserId()); |
| 105 | + if (CollUtil.isEmpty(roleIds)) { | ||
| 106 | + return success(AuthConvert.INSTANCE.convert(user, Collections.emptyList(), Collections.emptyList())); | ||
| 107 | + } | ||
| 104 | List<RoleDO> roles = roleService.getRoleList(roleIds); | 108 | List<RoleDO> roles = roleService.getRoleList(roleIds); |
| 105 | roles.removeIf(role -> !CommonStatusEnum.ENABLE.getStatus().equals(role.getStatus())); // 移除禁用的角色 | 109 | roles.removeIf(role -> !CommonStatusEnum.ENABLE.getStatus().equals(role.getStatus())); // 移除禁用的角色 |
| 106 | 110 | ||
| @@ -154,4 +158,4 @@ public class AuthController { | @@ -154,4 +158,4 @@ public class AuthController { | ||
| 154 | return success(authService.socialLogin(reqVO)); | 158 | return success(authService.socialLogin(reqVO)); |
| 155 | } | 159 | } |
| 156 | 160 | ||
| 157 | -} | ||
| 158 | \ No newline at end of file | 161 | \ No newline at end of file |
| 162 | +} |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/NotifyTemplateController.java
| 1 | package cn.iocoder.yudao.module.system.controller.admin.notify; | 1 | package cn.iocoder.yudao.module.system.controller.admin.notify; |
| 2 | 2 | ||
| 3 | +import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; | 4 | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| 4 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 5 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 5 | import cn.iocoder.yudao.module.system.controller.admin.notify.vo.template.*; | 6 | import cn.iocoder.yudao.module.system.controller.admin.notify.vo.template.*; |
| @@ -76,8 +77,12 @@ public class NotifyTemplateController { | @@ -76,8 +77,12 @@ public class NotifyTemplateController { | ||
| 76 | @Operation(summary = "发送站内信") | 77 | @Operation(summary = "发送站内信") |
| 77 | @PreAuthorize("@ss.hasPermission('system:notify-template:send-notify')") | 78 | @PreAuthorize("@ss.hasPermission('system:notify-template:send-notify')") |
| 78 | public CommonResult<Long> sendNotify(@Valid @RequestBody NotifyTemplateSendReqVO sendReqVO) { | 79 | public CommonResult<Long> sendNotify(@Valid @RequestBody NotifyTemplateSendReqVO sendReqVO) { |
| 79 | - return success(notifySendService.sendSingleNotifyToAdmin(sendReqVO.getUserId(), | ||
| 80 | - sendReqVO.getTemplateCode(), sendReqVO.getTemplateParams())); | 80 | + if (UserTypeEnum.MEMBER.getValue().equals(sendReqVO.getUserType())) { |
| 81 | + return success(notifySendService.sendSingleNotifyToMember(sendReqVO.getUserId(), | ||
| 82 | + sendReqVO.getTemplateCode(), sendReqVO.getTemplateParams())); | ||
| 83 | + } else { | ||
| 84 | + return success(notifySendService.sendSingleNotifyToAdmin(sendReqVO.getUserId(), | ||
| 85 | + sendReqVO.getTemplateCode(), sendReqVO.getTemplateParams())); | ||
| 86 | + } | ||
| 81 | } | 87 | } |
| 82 | - | ||
| 83 | } | 88 | } |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/notify/vo/template/NotifyTemplateSendReqVO.java
| @@ -15,6 +15,10 @@ public class NotifyTemplateSendReqVO { | @@ -15,6 +15,10 @@ public class NotifyTemplateSendReqVO { | ||
| 15 | @NotNull(message = "用户id不能为空") | 15 | @NotNull(message = "用户id不能为空") |
| 16 | private Long userId; | 16 | private Long userId; |
| 17 | 17 | ||
| 18 | + @Schema(description = "用户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") | ||
| 19 | + @NotNull(message = "用户类型不能为空") | ||
| 20 | + private Integer userType; | ||
| 21 | + | ||
| 18 | @Schema(description = "模板编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "01") | 22 | @Schema(description = "模板编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "01") |
| 19 | @NotEmpty(message = "模板编码不能为空") | 23 | @NotEmpty(message = "模板编码不能为空") |
| 20 | private String templateCode; | 24 | private String templateCode; |
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/convert/auth/AuthConvert.java
| 1 | package cn.iocoder.yudao.module.system.convert.auth; | 1 | package cn.iocoder.yudao.module.system.convert.auth; |
| 2 | 2 | ||
| 3 | +import cn.hutool.core.collection.CollUtil; | ||
| 3 | import cn.iocoder.yudao.module.system.api.sms.dto.code.SmsCodeSendReqDTO; | 4 | import cn.iocoder.yudao.module.system.api.sms.dto.code.SmsCodeSendReqDTO; |
| 4 | import cn.iocoder.yudao.module.system.api.sms.dto.code.SmsCodeUseReqDTO; | 5 | import cn.iocoder.yudao.module.system.api.sms.dto.code.SmsCodeUseReqDTO; |
| 5 | import cn.iocoder.yudao.module.system.api.social.dto.SocialUserBindReqDTO; | 6 | import cn.iocoder.yudao.module.system.api.social.dto.SocialUserBindReqDTO; |
| @@ -46,6 +47,9 @@ public interface AuthConvert { | @@ -46,6 +47,9 @@ public interface AuthConvert { | ||
| 46 | * @return 菜单树 | 47 | * @return 菜单树 |
| 47 | */ | 48 | */ |
| 48 | default List<AuthPermissionInfoRespVO.MenuVO> buildMenuTree(List<MenuDO> menuList) { | 49 | default List<AuthPermissionInfoRespVO.MenuVO> buildMenuTree(List<MenuDO> menuList) { |
| 50 | + if (CollUtil.isEmpty(menuList)) { | ||
| 51 | + return Collections.emptyList(); | ||
| 52 | + } | ||
| 49 | // 移除按钮 | 53 | // 移除按钮 |
| 50 | menuList.removeIf(menu -> menu.getType().equals(MenuTypeEnum.BUTTON.getType())); | 54 | menuList.removeIf(menu -> menu.getType().equals(MenuTypeEnum.BUTTON.getType())); |
| 51 | // 排序,保证菜单的有序性 | 55 | // 排序,保证菜单的有序性 |