mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 15:21:53 +08:00
Merge remote-tracking branch 'yudao/feature/mall_product' into feature/mall_product
This commit is contained in:
commit
1fe6c82899
@ -11,7 +11,7 @@
|
||||
Target Server Version : 80034
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 05/10/2023 12:42:16
|
||||
Date: 14/10/2023 20:04:17
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
@ -384,7 +384,7 @@ CREATE TABLE `infra_api_error_log` (
|
||||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1662 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统异常日志';
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1734 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统异常日志';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of infra_api_error_log
|
||||
@ -422,7 +422,7 @@ CREATE TABLE `infra_codegen_column` (
|
||||
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1778 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表字段定义';
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1805 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表字段定义';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of infra_codegen_column
|
||||
@ -455,7 +455,7 @@ CREATE TABLE `infra_codegen_table` (
|
||||
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 135 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表定义';
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 137 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '代码生成表定义';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of infra_codegen_table
|
||||
@ -709,7 +709,7 @@ CREATE TABLE `member_address` (
|
||||
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_userId`(`user_id` ASC) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 24 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '用户收件地址';
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 25 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_bin COMMENT = '用户收件地址';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of member_address
|
||||
@ -717,6 +717,33 @@ CREATE TABLE `member_address` (
|
||||
BEGIN;
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for member_config
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `member_config`;
|
||||
CREATE TABLE `member_config` (
|
||||
`id` bigint NOT NULL AUTO_INCREMENT COMMENT '自增主键',
|
||||
`point_trade_deduct_enable` bit(1) NOT NULL COMMENT '是否开启积分抵扣',
|
||||
`point_trade_deduct_unit_price` int NOT NULL COMMENT '积分抵扣(单位:分)',
|
||||
`point_trade_deduct_max_price` int NULL DEFAULT NULL COMMENT '积分抵扣最大值',
|
||||
`point_trade_give_point` bigint NULL DEFAULT NULL COMMENT '1 元赠送多少分',
|
||||
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
|
||||
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||
`updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
|
||||
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '会员配置表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of member_config
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
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);
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
@ -741,7 +768,7 @@ CREATE TABLE `member_experience_record` (
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_user_id`(`user_id` ASC) USING BTREE COMMENT '会员经验记录-用户编号',
|
||||
INDEX `idx_user_biz_type`(`user_id` ASC, `biz_type` ASC) USING BTREE COMMENT '会员经验记录-用户业务类型'
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '会员经验记录';
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 41 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '会员经验记录';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of member_experience_record
|
||||
@ -759,6 +786,27 @@ INSERT INTO `member_experience_record` (`id`, `user_id`, `biz_id`, `biz_type`, `
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
@ -835,7 +883,7 @@ CREATE TABLE `member_level_record` (
|
||||
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_user_id`(`user_id` ASC) USING BTREE COMMENT '会员等级记录-用户编号'
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '会员等级记录';
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '会员等级记录';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of member_level_record
|
||||
@ -865,7 +913,7 @@ CREATE TABLE `member_point_record` (
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `index_userId`(`user_id` ASC) USING BTREE,
|
||||
INDEX `index_title`(`title` ASC) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 32 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户积分记录';
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 60 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '用户积分记录';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of member_point_record
|
||||
@ -902,6 +950,27 @@ INSERT INTO `member_point_record` (`id`, `user_id`, `biz_id`, `biz_type`, `title
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
@ -1092,7 +1161,7 @@ CREATE TABLE `system_dict_data` (
|
||||
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1386 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典数据表';
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1398 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典数据表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of system_dict_data
|
||||
@ -1298,7 +1367,7 @@ INSERT INTO `system_dict_data` (`id`, `sort`, `label`, `value`, `dict_type`, `st
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
@ -1368,7 +1446,7 @@ CREATE TABLE `system_dict_type` (
|
||||
`deleted_time` datetime NULL DEFAULT NULL COMMENT '删除时间',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
UNIQUE INDEX `dict_type`(`type` ASC) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 183 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典类型表';
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 185 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '字典类型表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of system_dict_type
|
||||
@ -1441,6 +1519,7 @@ INSERT INTO `system_dict_type` (`id`, `name`, `type`, `status`, `remark`, `creat
|
||||
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);
|
||||
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);
|
||||
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');
|
||||
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');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
@ -1489,7 +1568,7 @@ CREATE TABLE `system_login_log` (
|
||||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 2516 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录';
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 2561 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '系统访问记录';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of system_login_log
|
||||
@ -1619,7 +1698,7 @@ CREATE TABLE `system_menu` (
|
||||
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 2366 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '菜单权限表';
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 2377 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '菜单权限表';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of system_menu
|
||||
@ -2037,7 +2116,7 @@ INSERT INTO `system_menu` (`id`, `name`, `permission`, `type`, `sort`, `parent_i
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
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');
|
||||
COMMIT;
|
||||
|
||||
-- ----------------------------
|
||||
@ -2215,7 +2298,7 @@ CREATE TABLE `system_oauth2_access_token` (
|
||||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 2880 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌';
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 3022 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 访问令牌';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of system_oauth2_access_token
|
||||
@ -2337,7 +2420,7 @@ CREATE TABLE `system_oauth2_refresh_token` (
|
||||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1014 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌';
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 1049 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = 'OAuth2 刷新令牌';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of system_oauth2_refresh_token
|
||||
@ -2377,7 +2460,7 @@ CREATE TABLE `system_operate_log` (
|
||||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 8643 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录';
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 8718 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '操作日志记录';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of system_operate_log
|
||||
@ -3385,7 +3468,7 @@ CREATE TABLE `system_sms_code` (
|
||||
`tenant_id` bigint NOT NULL DEFAULT 0 COMMENT '租户编号',
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `idx_mobile`(`mobile` ASC) USING BTREE COMMENT '手机号'
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 515 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '手机验证码';
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 531 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '手机验证码';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of system_sms_code
|
||||
@ -3428,7 +3511,7 @@ CREATE TABLE `system_sms_log` (
|
||||
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 426 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '短信日志';
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 442 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '短信日志';
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of system_sms_log
|
||||
@ -3701,7 +3784,7 @@ CREATE TABLE `system_users` (
|
||||
-- Records of system_users
|
||||
-- ----------------------------
|
||||
BEGIN;
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
|
@ -18,8 +18,7 @@ public enum TerminalEnum implements IntArrayValuable {
|
||||
WECHAT_MINI_PROGRAM(10, "微信小程序"),
|
||||
WECHAT_WAP(11, "微信公众号"),
|
||||
H5(20, "H5 网页"),
|
||||
IOS(31, "苹果 App"),
|
||||
ANDROID(32, "安卓 App"),
|
||||
APP(31, "手机 App"),
|
||||
;
|
||||
|
||||
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(TerminalEnum::getTerminal).toArray();
|
||||
|
@ -132,25 +132,31 @@ public class AreaUtils {
|
||||
return convertList(areas.values(), func, area -> type.getType().equals(area.getType()));
|
||||
}
|
||||
|
||||
// TODO @疯狂:注释写下;
|
||||
/**
|
||||
* 根据区域编号、上级区域类型,获取上级区域编号
|
||||
*
|
||||
* @param id 区域编号
|
||||
* @param type 区域类型
|
||||
* @return 上级区域编号
|
||||
*/
|
||||
public static Integer getParentIdByType(Integer id, @NonNull AreaTypeEnum type) {
|
||||
// TODO @疯狂:这种不要用 while true;因为万一脏数据,可能会死循环;可以转换成 for (int i = 0; i < Byte.MAX; i++) 一般是优先层级;
|
||||
do {
|
||||
for (int i = 0; i < Byte.MAX_VALUE; i++) {
|
||||
Area area = AreaUtils.getArea(id);
|
||||
if (area == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 情况一:匹配到,返回它
|
||||
if (type.getType().equals(area.getType())) {
|
||||
return area.getId();
|
||||
}
|
||||
|
||||
// 情况二:找到根节点,返回空
|
||||
if (area.getParent() == null || area.getParent().getId() == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// 其它:继续向上查找
|
||||
id = area.getParent().getId();
|
||||
} while (true);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -33,7 +33,6 @@ public class DiscountActivityDO extends BaseDO {
|
||||
* 活动标题
|
||||
*/
|
||||
private String name;
|
||||
// TODO 芋艿:状态调整,只有开启和关闭;
|
||||
/**
|
||||
* 状态
|
||||
*
|
||||
|
@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 限时折扣商品 DO
|
||||
*
|
||||
@ -25,7 +27,6 @@ public class DiscountProductDO extends BaseDO {
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
// TODO 芋艿:把 activity 所有的字段冗余过来
|
||||
/**
|
||||
* 限时折扣活动的编号
|
||||
*
|
||||
@ -33,6 +34,7 @@ public class DiscountProductDO extends BaseDO {
|
||||
*/
|
||||
private Long activityId;
|
||||
|
||||
|
||||
/**
|
||||
* 商品 SPU 编号
|
||||
*
|
||||
@ -65,4 +67,24 @@ public class DiscountProductDO extends BaseDO {
|
||||
*/
|
||||
private Integer discountPrice;
|
||||
|
||||
// TODO 芋艿:这几个字段,要新增下;
|
||||
/**
|
||||
* 活动状态
|
||||
*
|
||||
* 关联 {@link DiscountActivityDO#getStatus()}
|
||||
*/
|
||||
private Integer activityStatus;
|
||||
/**
|
||||
* 活动开始时间点
|
||||
*
|
||||
* 冗余 {@link DiscountActivityDO#getStartTime()}
|
||||
*/
|
||||
private LocalDateTime activityStartTime;
|
||||
/**
|
||||
* 活动结束时间点
|
||||
*
|
||||
* 冗余 {@link DiscountActivityDO#getEndTime()}
|
||||
*/
|
||||
private LocalDateTime activityEndTime;
|
||||
|
||||
}
|
||||
|
@ -38,7 +38,6 @@ public class RewardActivityDO extends BaseDO {
|
||||
* 活动标题
|
||||
*/
|
||||
private String name;
|
||||
// TODO @芋艿:改成开启、禁用两种状态
|
||||
/**
|
||||
* 状态
|
||||
*
|
||||
|
@ -30,13 +30,15 @@ public class MemberStatisticsController {
|
||||
@Resource
|
||||
private MemberStatisticsService memberStatisticsService;
|
||||
|
||||
// TODO 芋艿:已经 review
|
||||
@GetMapping("/summary")
|
||||
@Operation(summary = "获得会员统计")
|
||||
@Operation(summary = "获得会员统计(实时统计)")
|
||||
@PreAuthorize("@ss.hasPermission('statistics:member:query')")
|
||||
public CommonResult<MemberSummaryRespVO> getMemberSummary() {
|
||||
return success(memberStatisticsService.getMemberSummary());
|
||||
}
|
||||
|
||||
// TODO 芋艿:已经 review
|
||||
@GetMapping("/analyse")
|
||||
@Operation(summary = "获得会员分析数据")
|
||||
@PreAuthorize("@ss.hasPermission('statistics:member:query')")
|
||||
@ -45,6 +47,7 @@ public class MemberStatisticsController {
|
||||
ArrayUtil.get(reqVO.getTimes(), 0), ArrayUtil.get(reqVO.getTimes(), 1)));
|
||||
}
|
||||
|
||||
// TODO 芋艿:已经 review
|
||||
@GetMapping("/get-area-statistics-list")
|
||||
@Operation(summary = "按照省份,获得会员统计列表")
|
||||
@PreAuthorize("@ss.hasPermission('statistics:member:query')")
|
||||
@ -52,6 +55,7 @@ public class MemberStatisticsController {
|
||||
return success(memberStatisticsService.getMemberAreaStatisticsList());
|
||||
}
|
||||
|
||||
// TODO 芋艿:已经 review
|
||||
@GetMapping("/get-sex-statistics-list")
|
||||
@Operation(summary = "按照性别,获得会员统计列表")
|
||||
@PreAuthorize("@ss.hasPermission('statistics:member:query')")
|
||||
@ -64,6 +68,7 @@ public class MemberStatisticsController {
|
||||
@PreAuthorize("@ss.hasPermission('statistics:member:query')")
|
||||
public CommonResult<List<MemberTerminalStatisticsRespVO>> getMemberTerminalStatisticsList() {
|
||||
// TODO 疯狂:这个可以晚点写,因为 user = = 上还没记录 terminal
|
||||
// TODO @疯狂:在 member_user 上,增加 registerTerminal 字段,基于它来统计哈;
|
||||
List<MemberTerminalStatisticsRespVO> list = convertList(TerminalEnum.values(),
|
||||
t -> new MemberTerminalStatisticsRespVO()
|
||||
.setTerminal(t.getTerminal()).setUserCount(t.getTerminal() * 100));
|
||||
|
@ -7,9 +7,11 @@ import lombok.Data;
|
||||
@Data
|
||||
public class MemberAnalyseComparisonRespVO {
|
||||
|
||||
// TODO @疯狂:这个字段,要不改成注册用户量;registerUserCount;
|
||||
@Schema(description = "会员数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer userCount;
|
||||
|
||||
// TODO @疯狂:这个字段,名字改成 visitUserCount;有访问,就算活跃;
|
||||
@Schema(description = "活跃用户数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer activeUserCount;
|
||||
|
||||
|
@ -8,6 +8,7 @@ import lombok.Data;
|
||||
@Data
|
||||
public class MemberAnalyseRespVO {
|
||||
|
||||
// TODO @疯狂:这个字段改成 visitUserCount,保持和 userCount 字段统一
|
||||
@Schema(description = "访客数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer visitorCount;
|
||||
|
||||
@ -17,7 +18,7 @@ public class MemberAnalyseRespVO {
|
||||
@Schema(description = "成交用户数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer payUserCount;
|
||||
|
||||
@Schema(description = "客单价", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@Schema(description = "客单价,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer atv;
|
||||
|
||||
@Schema(description = "对照数据", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
|
@ -15,10 +15,12 @@ public class MemberAreaStatisticsRespVO {
|
||||
@Schema(description = "会员数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer userCount;
|
||||
|
||||
// TODO @疯狂:要不 orderCreateUserCount 和 orderPayUserCount 貌似更统一一些;
|
||||
@Schema(description = "订单创建数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer orderCreateCount;
|
||||
@Schema(description = "订单支付数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "512")
|
||||
private Integer orderPayCount;
|
||||
|
||||
@Schema(description = "订单支付金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "622")
|
||||
private Integer orderPayPrice;
|
||||
|
||||
|
@ -10,6 +10,7 @@ public class MemberSexStatisticsRespVO {
|
||||
@Schema(description = "性别", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer sex;
|
||||
|
||||
// TODO @疯狂:要不还是其它字段,我们也补全,这样方便使用的用户,做定制化;就保持和 MemberAreaStatisticsRespVO 一致;
|
||||
@Schema(description = "会员数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer userCount;
|
||||
|
||||
|
@ -13,10 +13,11 @@ public class MemberSummaryRespVO {
|
||||
@Schema(description = "充值会员数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "221")
|
||||
private Integer rechargeUserCount;
|
||||
|
||||
@Schema(description = "充值金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@Schema(description = "充值金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer rechargePrice;
|
||||
|
||||
@Schema(description = "支出金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer expensePrice;
|
||||
// TODO @疯狂:要不干脆这个字段改成:orderPayPrice??
|
||||
@Schema(description = "支出金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer expensePrice; // 只计算 mall 交易订单的支付金额,不考虑退款
|
||||
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ public class MemberTerminalStatisticsRespVO {
|
||||
@Schema(description = "终端", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer terminal;
|
||||
|
||||
// TODO @疯狂:要不 orderCreateUserCount 和 orderPayUserCount 貌似更统一一些;
|
||||
@Schema(description = "会员数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer userCount;
|
||||
|
||||
|
@ -36,9 +36,11 @@ public class TradeStatisticsController {
|
||||
@Operation(summary = "获得交易统计")
|
||||
@PreAuthorize("@ss.hasPermission('statistics:trade:query')")
|
||||
public CommonResult<TradeStatisticsComparisonRespVO<TradeSummaryRespVO>> getTradeSummaryComparison() {
|
||||
// TODO @疯狂:这个要不要 tradeStatisticsService 调用里面的多个方法,组合出最终的 TradeSummaryRespVO;
|
||||
return success(tradeStatisticsService.getTradeSummaryComparison());
|
||||
}
|
||||
|
||||
// TODO @疯狂:【晚点再改和讨论;等首页的接口出来】这个要不还是叫 analyse,对比选中的时间段,和上一个时间段;类似 MemberStatisticsController 的 getMemberAnalyse
|
||||
@GetMapping("/trend/summary")
|
||||
@Operation(summary = "获得交易状况统计")
|
||||
@PreAuthorize("@ss.hasPermission('statistics:trade:query')")
|
||||
@ -48,6 +50,8 @@ public class TradeStatisticsController {
|
||||
ArrayUtil.get(reqVO.getTimes(), 1)));
|
||||
}
|
||||
|
||||
// TODO 芋艿:已经 review
|
||||
// TODO @疯狂:这个要不直接叫 list;它即使就是把每条统计拿出来
|
||||
@GetMapping("/trend/list")
|
||||
@Operation(summary = "获得交易状况明细")
|
||||
@PreAuthorize("@ss.hasPermission('statistics:trade:query')")
|
||||
@ -57,6 +61,7 @@ public class TradeStatisticsController {
|
||||
ArrayUtil.get(reqVO.getTimes(), 1)));
|
||||
}
|
||||
|
||||
// TODO @疯狂:这个要不直接叫 export;它即使就是把每条统计导出
|
||||
@GetMapping("/trend/export-excel")
|
||||
@Operation(summary = "导出获得交易状况明细 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('statistics:trade:export')")
|
||||
|
@ -5,6 +5,7 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
// TODO @疯狂:是不是搞成公用的哈;类似,controller/admin/common,下面直接放它
|
||||
@Schema(description = "管理后台 - 交易统计对照 Response VO")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
|
@ -16,25 +16,26 @@ public class TradeTrendSummaryRespVO {
|
||||
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
private LocalDate date;
|
||||
|
||||
// TODO @疯狂,要不加个 turnoverPrice?
|
||||
@Schema(description = "营业额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer turnover;
|
||||
private Integer turnover; // 营业额 = 商品支付金额 + 充值金额
|
||||
|
||||
@Schema(description = "商品支付金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
@Schema(description = "订单支付金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer orderPayPrice;
|
||||
|
||||
@Schema(description = "订单退款金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer orderRefundPrice;
|
||||
|
||||
@Schema(description = "支付佣金金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer brokerageSettlementPrice;
|
||||
|
||||
@Schema(description = "充值金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer rechargePrice;
|
||||
|
||||
@Schema(description = "支出金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer expensePrice;
|
||||
private Integer expensePrice; // 余额支付金额 + 支付佣金金额 + 商品退款金额
|
||||
|
||||
@Schema(description = "余额支付金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer balancePrice;
|
||||
|
||||
@Schema(description = "支付佣金金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer brokerageSettlementPrice;
|
||||
|
||||
@Schema(description = "商品退款金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer orderRefundPrice;
|
||||
private Integer balancePrice; // TODO @疯狂:这个字段要不改成:walletPayPrice
|
||||
|
||||
}
|
||||
|
@ -5,6 +5,8 @@ import cn.hutool.core.util.ObjUtil;
|
||||
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
|
||||
import cn.iocoder.yudao.framework.ip.core.Area;
|
||||
import cn.iocoder.yudao.module.statistics.controller.admin.member.vo.MemberAreaStatisticsRespVO;
|
||||
import cn.iocoder.yudao.module.statistics.controller.admin.member.vo.MemberSummaryRespVO;
|
||||
import cn.iocoder.yudao.module.statistics.service.pay.bo.RechargeSummaryRespBO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
@ -36,4 +38,6 @@ public interface MemberStatisticsConvert {
|
||||
});
|
||||
}
|
||||
|
||||
MemberSummaryRespVO convert(RechargeSummaryRespBO rechargeSummary, Integer expensePrice, Integer userCount);
|
||||
|
||||
}
|
||||
|
@ -48,6 +48,7 @@ public class TradeStatisticsDO extends TenantBaseDO {
|
||||
* 总支付金额,单位:分
|
||||
*/
|
||||
private Integer orderPayPrice;
|
||||
// TODO @疯狂:这个字段改成 walletPayPrice,然后挪到 rechargePayCount 前面;
|
||||
/**
|
||||
* 总支付金额(余额),单位:分
|
||||
*/
|
||||
|
@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
// TODO @芋艿:api 访问日志,现在会清理,可能要单独有个偏业务的访问表;
|
||||
/**
|
||||
* API 访问日志的统计 Mapper
|
||||
*
|
||||
@ -14,9 +15,11 @@ import java.time.LocalDateTime;
|
||||
@Mapper
|
||||
public interface ApiAccessLogStatisticsMapper extends BaseMapperX<Object> {
|
||||
|
||||
// TODO @疯狂:是不是 selectIpCount
|
||||
Integer selectCountByIp(@Param("beginTime") LocalDateTime beginTime,
|
||||
@Param("endTime") LocalDateTime endTime);
|
||||
|
||||
// TODO @疯狂:是不是 selectUserCount
|
||||
Integer selectCountByUserId(@Param("beginTime") LocalDateTime beginTime,
|
||||
@Param("endTime") LocalDateTime endTime);
|
||||
|
||||
|
@ -17,10 +17,13 @@ import java.util.List;
|
||||
@Mapper
|
||||
public interface MemberStatisticsMapper extends BaseMapperX<Object> {
|
||||
|
||||
// TODO @芋艿:已经 review
|
||||
// TODO @疯狂:要不还是搞下 bo?虽然可能冗余了点~~
|
||||
List<MemberAreaStatisticsRespVO> selectSummaryListByAreaId();
|
||||
|
||||
List<MemberSexStatisticsRespVO> selectSummaryListBySex();
|
||||
|
||||
// TODO @芋艿:已经 review
|
||||
Integer selectUserCount(@Param("beginTime") LocalDateTime beginTime,
|
||||
@Param("endTime") LocalDateTime endTime);
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
package cn.iocoder.yudao.module.statistics.dal.mysql.pay;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.module.statistics.controller.admin.member.vo.MemberSummaryRespVO;
|
||||
import cn.iocoder.yudao.module.statistics.service.trade.bo.WalletSummaryRespBO;
|
||||
import cn.iocoder.yudao.module.statistics.dal.dataobject.trade.TradeStatisticsDO;
|
||||
import cn.iocoder.yudao.module.statistics.service.pay.bo.RechargeSummaryRespBO;
|
||||
import cn.iocoder.yudao.module.statistics.service.trade.bo.WalletSummaryRespBO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@ -17,21 +17,24 @@ import java.time.LocalDateTime;
|
||||
@Mapper
|
||||
public interface PayWalletStatisticsMapper extends BaseMapperX<TradeStatisticsDO> {
|
||||
|
||||
// TODO 芋艿:已经 review;
|
||||
WalletSummaryRespBO selectRechargeSummaryByPayTimeBetween(@Param("beginTime") LocalDateTime beginTime,
|
||||
@Param("endTime") LocalDateTime endTime,
|
||||
@Param("payStatus") Boolean payStatus);
|
||||
|
||||
// TODO 芋艿:已经 review;
|
||||
WalletSummaryRespBO selectRechargeSummaryByRefundTimeBetween(@Param("beginTime") LocalDateTime beginTime,
|
||||
@Param("endTime") LocalDateTime endTime,
|
||||
@Param("refundStatus") Integer refundStatus);
|
||||
|
||||
// TODO 芋艿:已经 review;
|
||||
Integer selectPriceSummaryByBizTypeAndCreateTimeBetween(@Param("beginTime") LocalDateTime beginTime,
|
||||
@Param("endTime") LocalDateTime endTime,
|
||||
@Param("bizType") Integer bizType);
|
||||
|
||||
// TODO @疯狂:是不是搞个单独的 BO 呀;
|
||||
MemberSummaryRespVO selectRechargeSummaryGroupByWalletId(@Param("beginTime") LocalDateTime beginTime,
|
||||
@Param("endTime") LocalDateTime endTime,
|
||||
@Param("payStatus") Boolean payStatus);
|
||||
// TODO 芋艿:已经 review;
|
||||
RechargeSummaryRespBO selectRechargeSummaryGroupByWalletId(@Param("beginTime") LocalDateTime beginTime,
|
||||
@Param("endTime") LocalDateTime endTime,
|
||||
@Param("payStatus") Boolean payStatus);
|
||||
|
||||
}
|
||||
|
@ -16,6 +16,7 @@ import java.time.LocalDateTime;
|
||||
@Mapper
|
||||
public interface AfterSaleStatisticsMapper extends BaseMapperX<TradeStatisticsDO> {
|
||||
|
||||
// TODO 芋艿:已 review
|
||||
AfterSaleSummaryRespBO selectSummaryByRefundTimeBetween(@Param("beginTime") LocalDateTime beginTime,
|
||||
@Param("endTime") LocalDateTime endTime);
|
||||
|
||||
|
@ -17,20 +17,26 @@ import java.util.List;
|
||||
@Mapper
|
||||
public interface TradeOrderStatisticsMapper extends BaseMapperX<TradeStatisticsDO> {
|
||||
|
||||
// TODO 芋艿:已经 review
|
||||
List<MemberAreaStatisticsRespVO> selectSummaryListByAreaId();
|
||||
|
||||
// TODO 芋艿:已经 review
|
||||
Integer selectCountByCreateTimeBetween(@Param("beginTime") LocalDateTime beginTime,
|
||||
@Param("endTime") LocalDateTime endTime);
|
||||
|
||||
// TODO 芋艿:已经 review
|
||||
Integer selectCountByPayTimeBetween(@Param("beginTime") LocalDateTime beginTime,
|
||||
@Param("endTime") LocalDateTime endTime);
|
||||
|
||||
// TODO 芋艿:已经 review
|
||||
Integer selectSummaryPriceByPayTimeBetween(@Param("beginTime") LocalDateTime beginTime,
|
||||
@Param("endTime") LocalDateTime endTime);
|
||||
|
||||
// TODO 芋艿:已经 review
|
||||
Integer selectUserCountByCreateTimeBetween(@Param("beginTime") LocalDateTime beginTime,
|
||||
@Param("endTime") LocalDateTime endTime);
|
||||
|
||||
// TODO 芋艿:已经 review
|
||||
Integer selectUserCountByPayTimeBetween(@Param("beginTime") LocalDateTime beginTime,
|
||||
@Param("endTime") LocalDateTime endTime);
|
||||
|
||||
|
@ -6,7 +6,6 @@ import cn.iocoder.yudao.module.statistics.dal.dataobject.trade.TradeStatisticsDO
|
||||
import cn.iocoder.yudao.module.statistics.service.trade.bo.TradeSummaryRespBO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
@ -19,16 +18,13 @@ import java.util.List;
|
||||
@Mapper
|
||||
public interface TradeStatisticsMapper extends BaseMapperX<TradeStatisticsDO> {
|
||||
|
||||
// TODO @疯狂:这个要不要也挪到 xml 里,保持统一?
|
||||
@Select("SELECT IFNULL(SUM(order_create_count), 0) AS count, IFNULL(SUM(order_pay_price), 0) AS summary " +
|
||||
"FROM trade_statistics " +
|
||||
"WHERE time BETWEEN #{beginTime} AND #{endTime} AND deleted = FALSE")
|
||||
TradeSummaryRespBO selectOrderCreateCountSumAndOrderPayPriceSumByTimeBetween(@Param("beginTime") LocalDateTime beginTime,
|
||||
@Param("endTime") LocalDateTime endTime);
|
||||
|
||||
TradeTrendSummaryRespVO selectByTimeBetween(@Param("beginTime") LocalDateTime beginTime,
|
||||
@Param("endTime") LocalDateTime endTime);
|
||||
|
||||
// TODO @芋艿:已经 review
|
||||
List<TradeTrendSummaryRespVO> selectListByTimeBetween(@Param("beginTime") LocalDateTime beginTime,
|
||||
@Param("endTime") LocalDateTime endTime);
|
||||
|
||||
|
@ -9,6 +9,8 @@ import java.time.LocalDateTime;
|
||||
*/
|
||||
public interface ApiAccessLogStatisticsService {
|
||||
|
||||
// TODO @疯狂:需要传递 userType;因为访问日志,可能涉及多种用户类型;
|
||||
// TODO @疯狂:方法名,要不改成 getUserCount;原因:让它更业务无关
|
||||
/**
|
||||
* 获取活跃用户数量
|
||||
*
|
||||
@ -18,6 +20,8 @@ public interface ApiAccessLogStatisticsService {
|
||||
*/
|
||||
Integer getActiveUserCount(LocalDateTime beginTime, LocalDateTime endTime);
|
||||
|
||||
// TODO @疯狂:需要传递 userType;因为访问日志,可能涉及多种用户类型;
|
||||
// TODO @疯狂:方法名,要不改成 getIpCount;原因:让它更业务无关
|
||||
/**
|
||||
* 获取访问用户数量
|
||||
*
|
||||
|
@ -28,4 +28,5 @@ public class ApiAccessLogStatisticsServiceImpl implements ApiAccessLogStatistics
|
||||
public Integer getVisitorUserCount(LocalDateTime beginTime, LocalDateTime endTime) {
|
||||
return apiAccessLogStatisticsMapper.selectCountByIp(beginTime, endTime);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -15,13 +15,24 @@ import java.util.List;
|
||||
*/
|
||||
public interface MemberStatisticsService {
|
||||
|
||||
// TODO 芋艿:已经 review
|
||||
/**
|
||||
* 获取会员统计
|
||||
* 获取会员统计(实时统计)
|
||||
*
|
||||
* @return 会员统计
|
||||
*/
|
||||
MemberSummaryRespVO getMemberSummary();
|
||||
|
||||
// TODO 芋艿:已经 review
|
||||
/**
|
||||
* 获取用户分析数据
|
||||
*
|
||||
* @param beginTime 起始时间
|
||||
* @param endTime 截止时间
|
||||
* @return 用户分析数据
|
||||
*/
|
||||
MemberAnalyseRespVO getMemberAnalyse(LocalDateTime beginTime, LocalDateTime endTime);
|
||||
|
||||
/**
|
||||
* 按照省份,获得会员统计列表
|
||||
*
|
||||
@ -36,13 +47,4 @@ public interface MemberStatisticsService {
|
||||
*/
|
||||
List<MemberSexStatisticsRespVO> getMemberSexStatisticsList();
|
||||
|
||||
/**
|
||||
* 获取用户分析数据
|
||||
*
|
||||
* @param beginTime 起始时间
|
||||
* @param endTime 截止时间
|
||||
* @return 用户分析数据
|
||||
*/
|
||||
MemberAnalyseRespVO getMemberAnalyse(LocalDateTime beginTime, LocalDateTime endTime);
|
||||
|
||||
}
|
||||
|
@ -5,14 +5,15 @@ import cn.iocoder.yudao.framework.ip.core.enums.AreaTypeEnum;
|
||||
import cn.iocoder.yudao.framework.ip.core.utils.AreaUtils;
|
||||
import cn.iocoder.yudao.module.statistics.controller.admin.member.vo.*;
|
||||
import cn.iocoder.yudao.module.statistics.controller.admin.trade.vo.TradeStatisticsComparisonRespVO;
|
||||
import cn.iocoder.yudao.module.statistics.convert.member.MemberStatisticsConvert;
|
||||
import cn.iocoder.yudao.module.statistics.dal.mysql.member.MemberStatisticsMapper;
|
||||
import cn.iocoder.yudao.module.statistics.service.infra.ApiAccessLogStatisticsService;
|
||||
import cn.iocoder.yudao.module.statistics.service.pay.PayWalletStatisticsService;
|
||||
import cn.iocoder.yudao.module.statistics.service.pay.bo.RechargeSummaryRespBO;
|
||||
import cn.iocoder.yudao.module.statistics.service.trade.TradeOrderStatisticsService;
|
||||
import cn.iocoder.yudao.module.statistics.service.trade.TradeStatisticsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import cn.iocoder.yudao.module.statistics.convert.member.MemberStatisticsConvert;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.Duration;
|
||||
@ -46,19 +47,18 @@ public class MemberStatisticsServiceImpl implements MemberStatisticsService {
|
||||
|
||||
@Override
|
||||
public MemberSummaryRespVO getMemberSummary() {
|
||||
MemberSummaryRespVO vo = payWalletStatisticsService.getUserRechargeSummary(null, null);
|
||||
RechargeSummaryRespBO rechargeSummary = payWalletStatisticsService.getUserRechargeSummary(null, null);
|
||||
// TODO @疯狂:1)这里是实时统计,不好走走 TradeStatistics 表;2)因为这个放在商城下,所以只考虑订单数据,即按照 trade_order 的 pay_price 并且已支付来计算;
|
||||
Integer expensePrice = tradeStatisticsService.getExpensePrice(null, null);
|
||||
Integer userCount = memberStatisticsMapper.selectUserCount(null, null);
|
||||
// 拼接数据
|
||||
if (vo == null) {
|
||||
vo = new MemberSummaryRespVO().setRechargeUserCount(0).setRechargePrice(0);
|
||||
}
|
||||
return vo.setUserCount(userCount).setExpensePrice(expensePrice);
|
||||
return MemberStatisticsConvert.INSTANCE.convert(rechargeSummary, expensePrice, userCount);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MemberAreaStatisticsRespVO> getMemberAreaStatisticsList() {
|
||||
// 统计用户
|
||||
// TODO @疯狂:要处理下,未知省份;就是没填写省份的情况;
|
||||
// TODO @疯狂:可能得把每个省的用户,都查询出来,然后去 order 那边 in;因为要按照这些人为基础来计算;;用户规模量大可能不太好,但是暂时就先这样搞吧 = =
|
||||
Map<Integer, Integer> userCountMap = convertMap(memberStatisticsMapper.selectSummaryListByAreaId(),
|
||||
vo -> AreaUtils.getParentIdByType(vo.getAreaId(), AreaTypeEnum.PROVINCE),
|
||||
MemberAreaStatisticsRespVO::getUserCount, Integer::sum);
|
||||
@ -74,22 +74,22 @@ public class MemberStatisticsServiceImpl implements MemberStatisticsService {
|
||||
return MemberStatisticsConvert.INSTANCE.convertList(AreaUtils.getByType(AreaTypeEnum.PROVINCE, area -> area), userCountMap, orderMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MemberSexStatisticsRespVO> getMemberSexStatisticsList() {
|
||||
return memberStatisticsMapper.selectSummaryListBySex();
|
||||
}
|
||||
|
||||
// TODO @疯狂:这个方法,要不拆成:1)controller 调用 getMemberAnalyseComparisonData;2)tradeOrderStatisticsService.getPayUserCount;3)tradeOrderStatisticsService.getOrderPayPrice;4)。。。
|
||||
// TODO 就是说:分析交给 controller 去组合;
|
||||
@Override
|
||||
public MemberAnalyseRespVO getMemberAnalyse(LocalDateTime beginTime, LocalDateTime endTime) {
|
||||
// 对照数据
|
||||
MemberAnalyseComparisonRespVO vo = getMemberAnalyseComparisonData(beginTime, endTime);
|
||||
// TODO @疯狂:如果时间段这么处理,会不会 beginTime 重叠了。因为是 <= 一个时间;如果数据库插入的是 ,xxxx-yy-zz 00:00:00 的话,它既满足 >= ? 也满足 <= ;(如果不好理解,微信聊)
|
||||
LocalDateTime referenceBeginTime = beginTime.minus(Duration.between(beginTime, endTime));
|
||||
MemberAnalyseComparisonRespVO reference = getMemberAnalyseComparisonData(referenceBeginTime, beginTime);
|
||||
|
||||
Integer payUserCount = tradeOrderStatisticsService.getPayUserCount(beginTime, endTime);
|
||||
// 计算客单价
|
||||
// TODO @疯狂:这个可能有点特殊,要按照 create_time 来查询;不然它的漏斗就不统一;因为是访问数量 > 今日下单人 > 今日支付人;是一个统一的维度;
|
||||
Integer payUserCount = tradeOrderStatisticsService.getPayUserCount(beginTime, endTime);
|
||||
int atv = 0;
|
||||
if (payUserCount != null && payUserCount > 0) {
|
||||
// TODO @疯狂:类似上面的 payUserCount
|
||||
Integer payPrice = tradeOrderStatisticsService.getOrderPayPrice(beginTime, endTime);
|
||||
atv = NumberUtil.div(payPrice, payUserCount).intValue();
|
||||
}
|
||||
@ -103,11 +103,17 @@ public class MemberStatisticsServiceImpl implements MemberStatisticsService {
|
||||
|
||||
private MemberAnalyseComparisonRespVO getMemberAnalyseComparisonData(LocalDateTime beginTime, LocalDateTime endTime) {
|
||||
Integer rechargeUserCount = Optional.ofNullable(payWalletStatisticsService.getUserRechargeSummary(beginTime, endTime))
|
||||
.map(MemberSummaryRespVO::getRechargeUserCount).orElse(0);
|
||||
.map(RechargeSummaryRespBO::getRechargeUserCount).orElse(0);
|
||||
return new MemberAnalyseComparisonRespVO()
|
||||
.setUserCount(memberStatisticsMapper.selectUserCount(beginTime, endTime))
|
||||
.setActiveUserCount(apiAccessLogStatisticsService.getActiveUserCount(beginTime, endTime))
|
||||
.setRechargeUserCount(rechargeUserCount);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MemberSexStatisticsRespVO> getMemberSexStatisticsList() {
|
||||
// TODO @疯狂:需要考虑,用户性别为空,则是“未知”
|
||||
return memberStatisticsMapper.selectSummaryListBySex();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package cn.iocoder.yudao.module.statistics.service.pay;
|
||||
|
||||
import cn.iocoder.yudao.module.statistics.controller.admin.member.vo.MemberSummaryRespVO;
|
||||
import cn.iocoder.yudao.module.statistics.service.pay.bo.RechargeSummaryRespBO;
|
||||
import cn.iocoder.yudao.module.statistics.service.trade.bo.WalletSummaryRespBO;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
@ -12,6 +12,7 @@ import java.time.LocalDateTime;
|
||||
*/
|
||||
public interface PayWalletStatisticsService {
|
||||
|
||||
// TODO 芋艿:已经 review
|
||||
/**
|
||||
* 获取钱包统计
|
||||
*
|
||||
@ -21,6 +22,7 @@ public interface PayWalletStatisticsService {
|
||||
*/
|
||||
WalletSummaryRespBO getWalletSummary(LocalDateTime beginTime, LocalDateTime endTime);
|
||||
|
||||
// TODO 芋艿:已经 review
|
||||
/**
|
||||
* 获取钱包充值统计
|
||||
*
|
||||
@ -28,6 +30,6 @@ public interface PayWalletStatisticsService {
|
||||
* @param endTime 截止时间
|
||||
* @return 钱包充值统计
|
||||
*/
|
||||
MemberSummaryRespVO getUserRechargeSummary(LocalDateTime beginTime, LocalDateTime endTime);
|
||||
RechargeSummaryRespBO getUserRechargeSummary(LocalDateTime beginTime, LocalDateTime endTime);
|
||||
|
||||
}
|
||||
|
@ -2,8 +2,8 @@ package cn.iocoder.yudao.module.statistics.service.pay;
|
||||
|
||||
import cn.iocoder.yudao.module.pay.enums.member.PayWalletBizTypeEnum;
|
||||
import cn.iocoder.yudao.module.pay.enums.refund.PayRefundStatusEnum;
|
||||
import cn.iocoder.yudao.module.statistics.controller.admin.member.vo.MemberSummaryRespVO;
|
||||
import cn.iocoder.yudao.module.statistics.dal.mysql.pay.PayWalletStatisticsMapper;
|
||||
import cn.iocoder.yudao.module.statistics.service.pay.bo.RechargeSummaryRespBO;
|
||||
import cn.iocoder.yudao.module.statistics.service.trade.bo.WalletSummaryRespBO;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -39,7 +39,7 @@ public class PayWalletStatisticsServiceImpl implements PayWalletStatisticsServic
|
||||
}
|
||||
|
||||
@Override
|
||||
public MemberSummaryRespVO getUserRechargeSummary(LocalDateTime beginTime, LocalDateTime endTime) {
|
||||
public RechargeSummaryRespBO getUserRechargeSummary(LocalDateTime beginTime, LocalDateTime endTime) {
|
||||
return payWalletStatisticsMapper.selectRechargeSummaryGroupByWalletId(beginTime, endTime, true);
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,17 @@
|
||||
package cn.iocoder.yudao.module.statistics.service.pay.bo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
// TODO @疯狂:BO 不用写 swagger 注解哈,写注释就好啦;
|
||||
@Schema(description = "管理后台 - 充值统计 Response VO")
|
||||
@Data
|
||||
public class RechargeSummaryRespBO {
|
||||
|
||||
@Schema(description = "充值会员数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "221")
|
||||
private Integer rechargeUserCount;
|
||||
|
||||
@Schema(description = "充值金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer rechargePrice;
|
||||
|
||||
}
|
@ -11,6 +11,7 @@ import java.time.LocalDateTime;
|
||||
*/
|
||||
public interface AfterSaleStatisticsService {
|
||||
|
||||
// TODO 芋艿:已经 review
|
||||
/**
|
||||
* 获取售后单统计
|
||||
*
|
||||
|
@ -9,6 +9,7 @@ import java.time.LocalDateTime;
|
||||
*/
|
||||
public interface BrokerageStatisticsService {
|
||||
|
||||
// TODO 芋艿:已经 review
|
||||
/**
|
||||
* 获取已结算的佣金金额
|
||||
*
|
||||
|
@ -22,6 +22,7 @@ public interface TradeOrderStatisticsService {
|
||||
*/
|
||||
TradeOrderSummaryRespBO getOrderSummary(LocalDateTime beginTime, LocalDateTime endTime);
|
||||
|
||||
// TODO 芋艿:已经 review
|
||||
/**
|
||||
* 获取地区订单统计
|
||||
*
|
||||
@ -29,15 +30,17 @@ public interface TradeOrderStatisticsService {
|
||||
*/
|
||||
List<MemberAreaStatisticsRespVO> getSummaryListByAreaId();
|
||||
|
||||
// TODO 芋艿:已经 review
|
||||
/**
|
||||
* 获取下单用户数量
|
||||
*
|
||||
* @param beginTime 起始时间
|
||||
* @param endTime 截止时间
|
||||
* @return 支付下单数量
|
||||
* @return 下单用户数量
|
||||
*/
|
||||
Integer getOrderUserCount(LocalDateTime beginTime, LocalDateTime endTime);
|
||||
|
||||
// TODO 芋艿:已经 review
|
||||
/**
|
||||
* 获取支付用户数量
|
||||
*
|
||||
@ -47,6 +50,7 @@ public interface TradeOrderStatisticsService {
|
||||
*/
|
||||
Integer getPayUserCount(LocalDateTime beginTime, LocalDateTime endTime);
|
||||
|
||||
// TODO 芋艿:已经 review
|
||||
/**
|
||||
* 获取支付金额
|
||||
*
|
||||
|
@ -32,6 +32,8 @@ public interface TradeStatisticsService {
|
||||
/**
|
||||
* 获得交易状况统计
|
||||
*
|
||||
* @param beginTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 统计数据对照
|
||||
*/
|
||||
Integer getExpensePrice(LocalDateTime beginTime, LocalDateTime endTime);
|
||||
@ -43,6 +45,7 @@ public interface TradeStatisticsService {
|
||||
*/
|
||||
List<TradeTrendSummaryRespVO> getTradeStatisticsList(LocalDateTime beginTime, LocalDateTime endTime);
|
||||
|
||||
// TODO 芋艿:已经 review;
|
||||
/**
|
||||
* 统计昨日交易
|
||||
*
|
||||
|
@ -57,6 +57,30 @@ public class TradeStatisticsServiceImpl implements TradeStatisticsService {
|
||||
return TradeStatisticsConvert.INSTANCE.convert(yesterdayData, beforeYesterdayData, monthData, lastMonthData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计指定日期的交易数据
|
||||
*
|
||||
* @param days 增加的天数
|
||||
* @return 交易数据
|
||||
*/
|
||||
private TradeSummaryRespBO getTradeSummaryByDays(int days) {
|
||||
LocalDateTime date = LocalDateTime.now().plusDays(days);
|
||||
return tradeStatisticsMapper.selectOrderCreateCountSumAndOrderPayPriceSumByTimeBetween(
|
||||
LocalDateTimeUtil.beginOfDay(date), LocalDateTimeUtil.endOfDay(date));
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计指定月份的交易数据
|
||||
*
|
||||
* @param months 增加的月数
|
||||
* @return 交易数据
|
||||
*/
|
||||
private TradeSummaryRespBO getTradeSummaryByMonths(int months) {
|
||||
LocalDateTime monthDate = LocalDateTime.now().plusMonths(months);
|
||||
return tradeStatisticsMapper.selectOrderCreateCountSumAndOrderPayPriceSumByTimeBetween(
|
||||
LocalDateTimeUtils.beginOfMonth(monthDate), LocalDateTimeUtils.endOfMonth(monthDate));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TradeStatisticsComparisonRespVO<TradeTrendSummaryRespVO> getTradeTrendSummaryComparison(LocalDateTime beginTime,
|
||||
LocalDateTime endTime) {
|
||||
@ -73,6 +97,7 @@ public class TradeStatisticsServiceImpl implements TradeStatisticsService {
|
||||
return tradeStatisticsMapper.selectExpensePriceByTimeBetween(beginTime, endTime);
|
||||
}
|
||||
|
||||
// TODO @疯狂:是不是直接返回 TradeStatisticsDO;上层在去聚合?
|
||||
@Override
|
||||
public List<TradeTrendSummaryRespVO> getTradeStatisticsList(LocalDateTime beginTime, LocalDateTime endTime) {
|
||||
return tradeStatisticsMapper.selectListByTimeBetween(beginTime, endTime);
|
||||
@ -80,6 +105,9 @@ public class TradeStatisticsServiceImpl implements TradeStatisticsService {
|
||||
|
||||
@Override
|
||||
public String statisticsYesterdayTrade() {
|
||||
// TODO @疯狂:如果已经统计,则跳过;
|
||||
// TODO @疯狂:改成 statisticsTrade,然后传入 days,统计多少天;days 通过 job 传参;方便把历史给统计出来;或者大家有的时候要修复数据(会 fix 业务数据,然后清理统计表),重新统计的时候;
|
||||
// 1. 从各个数据表,统计对应数据
|
||||
LocalDateTime yesterday = LocalDateTime.now().minusDays(1);
|
||||
LocalDateTime beginTime = LocalDateTimeUtil.beginOfDay(yesterday);
|
||||
LocalDateTime endTime = LocalDateTimeUtil.endOfDay(yesterday);
|
||||
@ -108,28 +136,4 @@ public class TradeStatisticsServiceImpl implements TradeStatisticsService {
|
||||
return stopWatch.prettyPrint();
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计指定日期的交易数据
|
||||
*
|
||||
* @param days 增加的天数
|
||||
* @return 交易数据
|
||||
*/
|
||||
private TradeSummaryRespBO getTradeSummaryByDays(int days) {
|
||||
LocalDateTime date = LocalDateTime.now().plusDays(days);
|
||||
return tradeStatisticsMapper.selectOrderCreateCountSumAndOrderPayPriceSumByTimeBetween(
|
||||
LocalDateTimeUtil.beginOfDay(date), LocalDateTimeUtil.endOfDay(date));
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计指定月份的交易数据
|
||||
*
|
||||
* @param months 增加的月数
|
||||
* @return 交易数据
|
||||
*/
|
||||
private TradeSummaryRespBO getTradeSummaryByMonths(int months) {
|
||||
LocalDateTime monthDate = LocalDateTime.now().plusMonths(months);
|
||||
return tradeStatisticsMapper.selectOrderCreateCountSumAndOrderPayPriceSumByTimeBetween(
|
||||
LocalDateTimeUtils.beginOfMonth(monthDate), LocalDateTimeUtils.endOfMonth(monthDate));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,6 +3,7 @@
|
||||
<mapper namespace="cn.iocoder.yudao.module.statistics.dal.mysql.infra.ApiAccessLogStatisticsMapper">
|
||||
|
||||
<select id="selectCountByIp" resultType="java.lang.Integer">
|
||||
<!-- TODO @疯狂:distinct 会不会更合适哈 -->
|
||||
SELECT COUNT(1)
|
||||
FROM infra_api_access_log
|
||||
WHERE create_time BETWEEN #{beginTime} AND #{endTime}
|
||||
@ -11,6 +12,7 @@
|
||||
</select>
|
||||
|
||||
<select id="selectCountByUserId" resultType="java.lang.Integer">
|
||||
<!-- TODO @疯狂:distinct 会不会更合适哈 -->
|
||||
SELECT COUNT(1)
|
||||
FROM infra_api_access_log
|
||||
WHERE user_id > 0
|
||||
|
@ -8,8 +8,6 @@
|
||||
FROM member_user
|
||||
WHERE deleted = FALSE
|
||||
GROUP BY area_id
|
||||
<!-- TODO @疯狂:order by 是不是交给内存哈 -->
|
||||
ORDER BY userCount DESC
|
||||
</select>
|
||||
|
||||
<select id="selectSummaryListBySex"
|
||||
@ -18,8 +16,6 @@
|
||||
FROM member_user
|
||||
WHERE deleted = FALSE
|
||||
GROUP BY sex
|
||||
<!-- TODO @疯狂:order by 是不是交给内存哈 -->
|
||||
ORDER BY userCount DESC
|
||||
</select>
|
||||
|
||||
<select id="selectUserCount" resultType="java.lang.Integer">
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.statistics.dal.mysql.pay.PayWalletStatisticsMapper">
|
||||
|
||||
<select id="selectRechargeSummaryByPayTimeBetween"
|
||||
resultType="cn.iocoder.yudao.module.statistics.service.trade.bo.WalletSummaryRespBO">
|
||||
SELECT COUNT(1) AS rechargePayCount,
|
||||
@ -30,7 +31,8 @@
|
||||
</select>
|
||||
|
||||
<select id="selectRechargeSummaryGroupByWalletId"
|
||||
resultType="cn.iocoder.yudao.module.statistics.controller.admin.member.vo.MemberSummaryRespVO">
|
||||
resultType="cn.iocoder.yudao.module.statistics.service.pay.bo.RechargeSummaryRespBO">
|
||||
<!-- TODO @疯狂:是不是不用 group by,而是通过 DISTINCT wallet_id 更合适哈? -->
|
||||
SELECT COUNT(1) AS rechargeUserCount,
|
||||
SUM(pay_price) AS rechargePrice
|
||||
FROM pay_wallet_recharge
|
||||
|
@ -2,6 +2,15 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.statistics.dal.mysql.trade.TradeStatisticsMapper">
|
||||
|
||||
<select id="selectOrderCreateCountSumAndOrderPayPriceSumByTimeBetween"
|
||||
resultType="cn.iocoder.yudao.module.statistics.service.trade.bo.TradeSummaryRespBO">
|
||||
SELECT IFNULL(SUM(order_create_count), 0) AS count,
|
||||
IFNULL(SUM(order_pay_price), 0) AS summary
|
||||
FROM trade_statistics
|
||||
WHERE time BETWEEN #{beginTime} AND #{endTime}
|
||||
AND deleted = FALSE
|
||||
</select>
|
||||
|
||||
<select id="selectByTimeBetween"
|
||||
resultType="cn.iocoder.yudao.module.statistics.controller.admin.trade.vo.TradeTrendSummaryRespVO">
|
||||
SELECT
|
||||
@ -34,13 +43,14 @@
|
||||
FROM trade_statistics
|
||||
WHERE time BETWEEN #{beginTime} AND #{endTime}
|
||||
AND deleted = FALSE
|
||||
<!-- TODO @疯狂:已经不用 group by,它就是每天统计一条; -->
|
||||
GROUP BY date
|
||||
</select>
|
||||
|
||||
<select id="selectExpensePriceByTimeBetween" resultType="java.lang.Integer">
|
||||
SELECT -- 支出金额 = 余额支付金额 + 支付佣金金额 + 商品退款金额
|
||||
SUM(order_wallet_pay_price + brokerage_settlement_price + after_sale_refund_price) AS expensePrice
|
||||
FROM trade_statistics
|
||||
FROM trade_statistics
|
||||
WHERE deleted = FALSE
|
||||
<if test="beginTime != null">
|
||||
AND time >= #{beginTime}
|
||||
|
@ -20,7 +20,8 @@ public enum TradeOrderOperateTypeEnum {
|
||||
ADMIN_DELIVERY(20, "已发货,快递公司:{deliveryName},快递单号:{logisticsNo}"),
|
||||
MEMBER_RECEIVE(30, "用户已收货"),
|
||||
SYSTEM_RECEIVE(31, "到期未收货,系统自动确认收货"),
|
||||
PICK_UP_RECEIVE(32, "自提收货"),
|
||||
ADMIN_PICK_UP_RECEIVE(32, "管理员自提收货"),
|
||||
MEMBER_PICK_UP_RECEIVE(32, "用户自提收货"),
|
||||
MEMBER_COMMENT(33, "用户评价"),
|
||||
SYSTEM_COMMENT(34, "到期未评价,系统自动评价"),
|
||||
MEMBER_CANCEL(40, "取消订单"),
|
||||
|
@ -126,11 +126,17 @@ public class TradeOrderController {
|
||||
return success(true);
|
||||
}
|
||||
|
||||
// TODO @疯狂:1、在【订单列表】界面,增加一个【核销按钮】。点击后,弹窗出一个核销码输入的窗口。
|
||||
//
|
||||
//2、输入核销码后,点击确认,基于 code 查询对应的订单,之后弹窗展示。
|
||||
//
|
||||
//3、新的弹窗,下面有个【确认核销】按钮。确认后,进行订单核销逻辑。注意,只有门店自提的订单,才可以核销。
|
||||
// TODO 这里的 id 应该是 pickUpVerifyCode 参数哈;
|
||||
@PutMapping("/pick-up")
|
||||
@Operation(summary = "订单核销")
|
||||
@PreAuthorize("@ss.hasPermission('trade:order:pick-up')")
|
||||
public CommonResult<Boolean> pickUpOrder(@RequestParam("id") Long id) {
|
||||
tradeOrderUpdateService.pickUpOrder(id);
|
||||
tradeOrderUpdateService.pickUpOrderByMember(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
|
@ -120,14 +120,14 @@ public interface TradeOrderUpdateService {
|
||||
*
|
||||
* @param id 订单编号
|
||||
*/
|
||||
void pickUpOrder(Long id);
|
||||
void pickUpOrderByMember(Long id);
|
||||
|
||||
/**
|
||||
* 【管理员】核销订单
|
||||
*
|
||||
* @param pickUpVerifyCode 自提核销码
|
||||
*/
|
||||
void pickUpOrder(String pickUpVerifyCode);
|
||||
void pickUpOrderByAdmin(String pickUpVerifyCode);
|
||||
|
||||
// =================== Order Item ===================
|
||||
|
||||
@ -178,9 +178,9 @@ public interface TradeOrderUpdateService {
|
||||
* @param combinationRecordId 拼团记录编号
|
||||
* @param headId 团长编号
|
||||
*/
|
||||
// TODO 芋艿:再 review 拼团
|
||||
void updateOrderCombinationInfo(Long orderId, Long activityId, Long combinationRecordId, Long headId);
|
||||
|
||||
// TODO 芋艿:拼团取消,不调这个接口哈;
|
||||
/**
|
||||
* 取消支付订单
|
||||
*
|
||||
|
@ -670,17 +670,18 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pickUpOrder(Long id) {
|
||||
@TradeOrderLog(operateType = TradeOrderOperateTypeEnum.MEMBER_PICK_UP_RECEIVE)
|
||||
public void pickUpOrderByMember(Long id) {
|
||||
getSelf().pickUpOrder(tradeOrderMapper.selectById(id));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void pickUpOrder(String pickUpVerifyCode) {
|
||||
@TradeOrderLog(operateType = TradeOrderOperateTypeEnum.ADMIN_PICK_UP_RECEIVE)
|
||||
public void pickUpOrderByAdmin(String pickUpVerifyCode) {
|
||||
getSelf().pickUpOrder(tradeOrderMapper.selectOneByPickUpVerifyCode(pickUpVerifyCode));
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@TradeOrderLog(operateType = TradeOrderOperateTypeEnum.PICK_UP_RECEIVE)
|
||||
public void pickUpOrder(TradeOrderDO order) {
|
||||
if (order == null) {
|
||||
throw exception(ORDER_NOT_FOUND);
|
||||
@ -688,7 +689,6 @@ public class TradeOrderUpdateServiceImpl implements TradeOrderUpdateService {
|
||||
if (ObjUtil.notEqual(DeliveryTypeEnum.PICK_UP.getType(), order.getDeliveryType())) {
|
||||
throw exception(ORDER_RECEIVE_FAIL_DELIVERY_TYPE_NOT_PICK_UP);
|
||||
}
|
||||
// todo 校验核销操作人?
|
||||
receiveOrder0(order);
|
||||
}
|
||||
|
||||
|
@ -63,6 +63,7 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode WALLET_RECHARGE_REFUND_FAIL_REFUND_PRICE_NOT_MATCH = new ErrorCode(1_007_008_010, "钱包退款更新失败,退款单金额不匹配");
|
||||
ErrorCode WALLET_RECHARGE_PACKAGE_AND_PRICE_IS_EMPTY = new ErrorCode(1_007_008_011, "充值金额和充钱套餐不能同时为空");
|
||||
ErrorCode WALLET_RECHARGE_PACKAGE_NOT_FOUND = new ErrorCode(1_007_008_012, "钱包充值套餐不存在");
|
||||
ErrorCode WALLET_RECHARGE_PACKAGE_IS_DISABLE = new ErrorCode(1_007_008_013, "钱包充值套餐已禁用");
|
||||
// ========== 转账模块 1-007-009-000 ==========
|
||||
ErrorCode PAY_TRANSFER_SUBMIT_CHANNEL_ERROR = new ErrorCode(1_007_009_000, "发起转账报错,错误码:{},错误提示:{}");
|
||||
ErrorCode PAY_TRANSFER_ALIPAY_LOGIN_ID_IS_EMPTY = new ErrorCode(1_007_009_001, "支付宝登录 ID 不能为空");
|
||||
|
@ -0,0 +1,75 @@
|
||||
package cn.iocoder.yudao.module.pay.controller.admin.wallet;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageCreateReqVO;
|
||||
import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackagePageReqVO;
|
||||
import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageRespVO;
|
||||
import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.pay.convert.wallet.WalletRechargePackageConvert;
|
||||
import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargePackageDO;
|
||||
import cn.iocoder.yudao.module.pay.service.wallet.PayWalletRechargePackageService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
|
||||
@Tag(name = "管理后台 - 钱包充值套餐")
|
||||
@RestController
|
||||
@RequestMapping("/pay/wallet-recharge-package")
|
||||
@Validated
|
||||
public class PayWalletRechargePackageController {
|
||||
|
||||
@Resource
|
||||
private PayWalletRechargePackageService walletRechargePackageService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建钱包充值套餐")
|
||||
@PreAuthorize("@ss.hasPermission('pay:wallet-recharge-package:create')")
|
||||
public CommonResult<Long> createWalletRechargePackage(@Valid @RequestBody WalletRechargePackageCreateReqVO createReqVO) {
|
||||
return success(walletRechargePackageService.createWalletRechargePackage(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新钱包充值套餐")
|
||||
@PreAuthorize("@ss.hasPermission('pay:wallet-recharge-package:update')")
|
||||
public CommonResult<Boolean> updateWalletRechargePackage(@Valid @RequestBody WalletRechargePackageUpdateReqVO updateReqVO) {
|
||||
walletRechargePackageService.updateWalletRechargePackage(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除钱包充值套餐")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('pay:wallet-recharge-package:delete')")
|
||||
public CommonResult<Boolean> deleteWalletRechargePackage(@RequestParam("id") Long id) {
|
||||
walletRechargePackageService.deleteWalletRechargePackage(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得钱包充值套餐")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('pay:wallet-recharge-package:query')")
|
||||
public CommonResult<WalletRechargePackageRespVO> getWalletRechargePackage(@RequestParam("id") Long id) {
|
||||
PayWalletRechargePackageDO walletRechargePackage = walletRechargePackageService.getWalletRechargePackage(id);
|
||||
return success(WalletRechargePackageConvert.INSTANCE.convert(walletRechargePackage));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得钱包充值套餐分页")
|
||||
@PreAuthorize("@ss.hasPermission('pay:wallet-recharge-package:query')")
|
||||
public CommonResult<PageResult<WalletRechargePackageRespVO>> getWalletRechargePackagePage(@Valid WalletRechargePackagePageReqVO pageVO) {
|
||||
PageResult<PayWalletRechargePackageDO> pageResult = walletRechargePackageService.getWalletRechargePackagePage(pageVO);
|
||||
return success(WalletRechargePackageConvert.INSTANCE.convertPage(pageResult));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 套餐充值 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
|
||||
*/
|
||||
@Data
|
||||
public class WalletRechargePackageBaseVO {
|
||||
|
||||
@Schema(description = "套餐名", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四")
|
||||
@NotNull(message = "套餐名不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "支付金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "16454")
|
||||
@NotNull(message = "支付金额不能为空")
|
||||
private Integer payPrice;
|
||||
|
||||
@Schema(description = "赠送金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "20887")
|
||||
@NotNull(message = "赠送金额不能为空")
|
||||
private Integer bonusPrice;
|
||||
|
||||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
|
||||
@NotNull(message = "状态不能为空")
|
||||
private Byte status;
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(description = "管理后台 - 套餐充值创建 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class WalletRechargePackageCreateReqVO extends WalletRechargePackageBaseVO {
|
||||
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 套餐充值分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class WalletRechargePackagePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "套餐名", example = "李四")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "支付金额", example = "16454")
|
||||
private Integer payPrice;
|
||||
|
||||
@Schema(description = "赠送金额", example = "20887")
|
||||
private Integer bonusPrice;
|
||||
|
||||
@Schema(description = "状态", example = "2")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 套餐充值 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class WalletRechargePackageRespVO extends WalletRechargePackageBaseVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9032")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "管理后台 - 套餐充值更新 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class WalletRechargePackageUpdateReqVO extends WalletRechargePackageBaseVO {
|
||||
|
||||
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "9032")
|
||||
@NotNull(message = "编号不能为空")
|
||||
private Long id;
|
||||
|
||||
}
|
@ -7,9 +7,6 @@ import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
/**
|
||||
* @author jason
|
||||
*/
|
||||
@Mapper
|
||||
public interface PayTransferConvert {
|
||||
|
||||
|
@ -6,9 +6,6 @@ import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
/**
|
||||
* @author jason
|
||||
*/
|
||||
@Mapper
|
||||
public interface PayWalletRechargeConvert {
|
||||
|
||||
|
@ -0,0 +1,29 @@
|
||||
package cn.iocoder.yudao.module.pay.convert.wallet;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
|
||||
import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageCreateReqVO;
|
||||
import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageRespVO;
|
||||
import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargePackageDO;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
@Mapper
|
||||
public interface WalletRechargePackageConvert {
|
||||
|
||||
WalletRechargePackageConvert INSTANCE = Mappers.getMapper(WalletRechargePackageConvert.class);
|
||||
|
||||
PayWalletRechargePackageDO convert(WalletRechargePackageCreateReqVO bean);
|
||||
|
||||
PayWalletRechargePackageDO convert(WalletRechargePackageUpdateReqVO bean);
|
||||
|
||||
WalletRechargePackageRespVO convert(PayWalletRechargePackageDO bean);
|
||||
|
||||
List<WalletRechargePackageRespVO> convertList(List<PayWalletRechargePackageDO> list);
|
||||
|
||||
PageResult<WalletRechargePackageRespVO> convertPage(PageResult<PayWalletRechargePackageDO> page);
|
||||
|
||||
}
|
@ -1,13 +1,25 @@
|
||||
package cn.iocoder.yudao.module.pay.dal.mysql.wallet;
|
||||
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||
import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackagePageReqVO;
|
||||
import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargePackageDO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface PayWalletRechargePackageMapper extends BaseMapperX<PayWalletRechargePackageDO> {
|
||||
|
||||
default PageResult<PayWalletRechargePackageDO> selectPage(WalletRechargePackagePageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<PayWalletRechargePackageDO>()
|
||||
.likeIfPresent(PayWalletRechargePackageDO::getName, reqVO.getName())
|
||||
.eqIfPresent(PayWalletRechargePackageDO::getPayPrice, reqVO.getPayPrice())
|
||||
.eqIfPresent(PayWalletRechargePackageDO::getBonusPrice, reqVO.getBonusPrice())
|
||||
.eqIfPresent(PayWalletRechargePackageDO::getStatus, reqVO.getStatus())
|
||||
.betweenIfPresent(PayWalletRechargePackageDO::getCreateTime, reqVO.getCreateTime())
|
||||
.orderByDesc(PayWalletRechargePackageDO::getId));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,7 +1,15 @@
|
||||
package cn.iocoder.yudao.module.pay.service.wallet;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageCreateReqVO;
|
||||
import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackagePageReqVO;
|
||||
import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargePackageDO;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 钱包充值套餐 Service 接口
|
||||
*
|
||||
@ -14,4 +22,50 @@ public interface PayWalletRechargePackageService {
|
||||
* @param packageId 充值套餐编号
|
||||
*/
|
||||
PayWalletRechargePackageDO getWalletRechargePackage(Long packageId);
|
||||
|
||||
/**
|
||||
* 校验钱包充值套餐的有效性, 无效的话抛出 ServiceException 异常
|
||||
*
|
||||
* @param packageId 充值套餐编号
|
||||
*/
|
||||
PayWalletRechargePackageDO validWalletRechargePackage(Long packageId);
|
||||
|
||||
/**
|
||||
* 创建套餐充值
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
Long createWalletRechargePackage(@Valid WalletRechargePackageCreateReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新套餐充值
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updateWalletRechargePackage(@Valid WalletRechargePackageUpdateReqVO updateReqVO);
|
||||
|
||||
|
||||
/**
|
||||
* 删除套餐充值
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deleteWalletRechargePackage(Long id);
|
||||
|
||||
/**
|
||||
* 获得套餐充值列表
|
||||
*
|
||||
* @param ids 编号
|
||||
* @return 套餐充值列表
|
||||
*/
|
||||
List<PayWalletRechargePackageDO> getWalletRechargePackageList(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得套餐充值分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 套餐充值分页
|
||||
*/
|
||||
PageResult<PayWalletRechargePackageDO> getWalletRechargePackagePage(WalletRechargePackagePageReqVO pageReqVO);
|
||||
}
|
||||
|
@ -1,11 +1,25 @@
|
||||
package cn.iocoder.yudao.module.pay.service.wallet;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.ListUtil;
|
||||
import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageCreateReqVO;
|
||||
import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackagePageReqVO;
|
||||
import cn.iocoder.yudao.module.pay.controller.admin.wallet.vo.rechargepackage.WalletRechargePackageUpdateReqVO;
|
||||
import cn.iocoder.yudao.module.pay.convert.wallet.WalletRechargePackageConvert;
|
||||
import cn.iocoder.yudao.module.pay.dal.dataobject.wallet.PayWalletRechargePackageDO;
|
||||
import cn.iocoder.yudao.module.pay.dal.mysql.wallet.PayWalletRechargePackageMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.module.pay.enums.ErrorCodeConstants.*;
|
||||
|
||||
/**
|
||||
* 钱包充值套餐 Service 实现类
|
||||
*
|
||||
@ -15,10 +29,68 @@ import javax.annotation.Resource;
|
||||
public class PayWalletRechargePackageServiceImpl implements PayWalletRechargePackageService {
|
||||
|
||||
@Resource
|
||||
private PayWalletRechargePackageMapper rechargePackageMapper;
|
||||
private PayWalletRechargePackageMapper walletRechargePackageMapper;
|
||||
|
||||
@Override
|
||||
public PayWalletRechargePackageDO getWalletRechargePackage(Long packageId) {
|
||||
return rechargePackageMapper.selectById(packageId);
|
||||
return walletRechargePackageMapper.selectById(packageId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PayWalletRechargePackageDO validWalletRechargePackage(Long packageId) {
|
||||
PayWalletRechargePackageDO rechargePackageDO = walletRechargePackageMapper.selectById(packageId);
|
||||
if (rechargePackageDO == null) {
|
||||
throw exception(WALLET_RECHARGE_PACKAGE_NOT_FOUND);
|
||||
}
|
||||
if (CommonStatusEnum.DISABLE.getStatus().equals(rechargePackageDO.getStatus())) {
|
||||
throw exception(WALLET_RECHARGE_PACKAGE_IS_DISABLE);
|
||||
}
|
||||
return rechargePackageDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long createWalletRechargePackage(WalletRechargePackageCreateReqVO createReqVO) {
|
||||
// 插入
|
||||
PayWalletRechargePackageDO walletRechargePackage = WalletRechargePackageConvert.INSTANCE.convert(createReqVO);
|
||||
walletRechargePackageMapper.insert(walletRechargePackage);
|
||||
// 返回
|
||||
return walletRechargePackage.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateWalletRechargePackage(WalletRechargePackageUpdateReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateWalletRechargePackageExists(updateReqVO.getId());
|
||||
// 更新
|
||||
PayWalletRechargePackageDO updateObj = WalletRechargePackageConvert.INSTANCE.convert(updateReqVO);
|
||||
walletRechargePackageMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteWalletRechargePackage(Long id) {
|
||||
// 校验存在
|
||||
validateWalletRechargePackageExists(id);
|
||||
// 删除
|
||||
walletRechargePackageMapper.deleteById(id);
|
||||
}
|
||||
|
||||
private void validateWalletRechargePackageExists(Long id) {
|
||||
if (walletRechargePackageMapper.selectById(id) == null) {
|
||||
throw exception(WALLET_RECHARGE_PACKAGE_NOT_FOUND);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PayWalletRechargePackageDO> getWalletRechargePackageList(Collection<Long> ids) {
|
||||
if (CollUtil.isEmpty(ids)) {
|
||||
return ListUtil.empty();
|
||||
}
|
||||
return walletRechargePackageMapper.selectBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<PayWalletRechargePackageDO> getWalletRechargePackagePage(WalletRechargePackagePageReqVO pageReqVO) {
|
||||
return walletRechargePackageMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -52,7 +52,6 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService {
|
||||
|
||||
@Resource
|
||||
private PayWalletRechargeMapper walletRechargeMapper;
|
||||
|
||||
@Resource
|
||||
private PayWalletService payWalletService;
|
||||
@Resource
|
||||
@ -74,10 +73,7 @@ public class PayWalletRechargeServiceImpl implements PayWalletRechargeService {
|
||||
int payPrice ;
|
||||
int bonusPrice = 0 ;
|
||||
if (Objects.nonNull(reqVO.getPackageId())) {
|
||||
PayWalletRechargePackageDO rechargePackage = payWalletRechargePackageService.getWalletRechargePackage(reqVO.getPackageId());
|
||||
if (rechargePackage == null) {
|
||||
throw exception(WALLET_RECHARGE_PACKAGE_NOT_FOUND);
|
||||
}
|
||||
PayWalletRechargePackageDO rechargePackage = payWalletRechargePackageService.validWalletRechargePackage(reqVO.getPackageId());
|
||||
payPrice = rechargePackage.getPayPrice();
|
||||
bonusPrice = rechargePackage.getBonusPrice();
|
||||
} else {
|
||||
|
@ -18,10 +18,10 @@ import cn.iocoder.yudao.module.system.service.permission.PermissionService;
|
||||
import cn.iocoder.yudao.module.system.service.permission.RoleService;
|
||||
import cn.iocoder.yudao.module.system.service.social.SocialUserService;
|
||||
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -30,6 +30,7 @@ import javax.annotation.Resource;
|
||||
import javax.annotation.security.PermitAll;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.validation.Valid;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@ -101,6 +102,9 @@ public class AuthController {
|
||||
|
||||
// 1.2 获得角色列表
|
||||
Set<Long> roleIds = permissionService.getUserRoleIdListByUserId(getLoginUserId());
|
||||
if (CollUtil.isEmpty(roleIds)) {
|
||||
return success(AuthConvert.INSTANCE.convert(user, Collections.emptyList(), Collections.emptyList()));
|
||||
}
|
||||
List<RoleDO> roles = roleService.getRoleList(roleIds);
|
||||
roles.removeIf(role -> !CommonStatusEnum.ENABLE.getStatus().equals(role.getStatus())); // 移除禁用的角色
|
||||
|
||||
@ -154,4 +158,4 @@ public class AuthController {
|
||||
return success(authService.socialLogin(reqVO));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.system.controller.admin.notify;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.enums.UserTypeEnum;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.module.system.controller.admin.notify.vo.template.*;
|
||||
@ -76,8 +77,12 @@ public class NotifyTemplateController {
|
||||
@Operation(summary = "发送站内信")
|
||||
@PreAuthorize("@ss.hasPermission('system:notify-template:send-notify')")
|
||||
public CommonResult<Long> sendNotify(@Valid @RequestBody NotifyTemplateSendReqVO sendReqVO) {
|
||||
return success(notifySendService.sendSingleNotifyToAdmin(sendReqVO.getUserId(),
|
||||
sendReqVO.getTemplateCode(), sendReqVO.getTemplateParams()));
|
||||
if (UserTypeEnum.MEMBER.getValue().equals(sendReqVO.getUserType())) {
|
||||
return success(notifySendService.sendSingleNotifyToMember(sendReqVO.getUserId(),
|
||||
sendReqVO.getTemplateCode(), sendReqVO.getTemplateParams()));
|
||||
} else {
|
||||
return success(notifySendService.sendSingleNotifyToAdmin(sendReqVO.getUserId(),
|
||||
sendReqVO.getTemplateCode(), sendReqVO.getTemplateParams()));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -15,6 +15,10 @@ public class NotifyTemplateSendReqVO {
|
||||
@NotNull(message = "用户id不能为空")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "用户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "用户类型不能为空")
|
||||
private Integer userType;
|
||||
|
||||
@Schema(description = "模板编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "01")
|
||||
@NotEmpty(message = "模板编码不能为空")
|
||||
private String templateCode;
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.system.convert.auth;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.iocoder.yudao.module.system.api.sms.dto.code.SmsCodeSendReqDTO;
|
||||
import cn.iocoder.yudao.module.system.api.sms.dto.code.SmsCodeUseReqDTO;
|
||||
import cn.iocoder.yudao.module.system.api.social.dto.SocialUserBindReqDTO;
|
||||
@ -46,6 +47,9 @@ public interface AuthConvert {
|
||||
* @return 菜单树
|
||||
*/
|
||||
default List<AuthPermissionInfoRespVO.MenuVO> buildMenuTree(List<MenuDO> menuList) {
|
||||
if (CollUtil.isEmpty(menuList)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
// 移除按钮
|
||||
menuList.removeIf(menu -> menu.getType().equals(MenuTypeEnum.BUTTON.getType()));
|
||||
// 排序,保证菜单的有序性
|
||||
|
Loading…
Reference in New Issue
Block a user