配置权限
INSERT INTO `sys_menu` VALUES (2014, '添加活动', 2003, 1, '', NULL, NULL, 1, 0, 'F', '0', '0', 'tienchin:activity:create', '#', 'admin', '2023-09-04 23:56:19', '', NULL, '');
INSERT INTO `sys_menu` VALUES (2015, '删除活动', 2003, 2, '', NULL, NULL, 1, 0, 'F', '0', '0', 'tienchin:activity:remove', '#', 'admin', '2023-09-04 23:56:44', '', NULL, '');
INSERT INTO `sys_menu` VALUES (2016, '修改活动', 2003, 3, '', NULL, NULL, 1, 0, 'F', '0', '0', 'tienchin:activity:edit', '#', 'admin', '2023-09-04 23:57:01', '', NULL, '');
INSERT INTO `sys_menu` VALUES (2017, '查询活动', 2003, 4, '', NULL, NULL, 1, 0, 'F', '0', '0', 'tienchin:activity:list', '#', 'admin', '2023-09-04 23:57:17', '', NULL, '');
INSERT INTO `sys_menu` VALUES (2018, '导出活动', 2003, 5, '', NULL, NULL, 1, 0, 'F', '0', '0', 'tienchin:activity:export', '#', 'admin', '2023-09-04 23:58:05', '', NULL, '');
INSERT INTO `sys_menu` VALUES (2019, '导入活动', 2003, 6, '', NULL, NULL, 1, 0, 'F', '0', '0', 'tienchin:activity:import', '#', 'admin', '2023-09-04 23:58:23', '', NULL, '');
可能需要更改一下父级ID,对应到你自己的活动管理菜单ID。
配置字典
活动类型
活动状态
创建表
DROP TABLE IF EXISTS `tienchin_activity`;
CREATE TABLE `tienchin_activity` (
`activity_id` int NOT NULL AUTO_INCREMENT COMMENT '活动ID',
`activity_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '活动名称',
`channel_id` int NULL DEFAULT NULL COMMENT '渠道ID',
`activity_info` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '活动简介',
`activity_type` int NULL DEFAULT NULL COMMENT '活动类型,1.折扣券、2.代金券',
`activity_status` int NULL DEFAULT NULL COMMENT '活动状态,0.表示禁用、1.表示正常',
`discount` double NULL DEFAULT NULL COMMENT '折扣券',
`voucher` double NULL DEFAULT NULL COMMENT '代金券',
`begin_time` datetime NULL DEFAULT NULL COMMENT '活动开始时间',
`end_time` datetime NULL DEFAULT NULL COMMENT '活动结束时间',
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '活动备注',
`create_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人',
`update_by` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '修改人',
`create_time` datetime NULL DEFAULT NULL COMMENT '创建时间',
`update_time` datetime NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`del_flag` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '删除标志(0代表存在 2代表删除)',
PRIMARY KEY (`activity_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '活动管理表' ROW_FORMAT = DYNAMIC;