1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
| -- Evaluation auto reply settings
| CREATE TABLE IF NOT EXISTS `t_evaluation_auto_reply` (
| `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
| `keyword` varchar(100) NOT NULL COMMENT '关键字',
| `mark` int NOT NULL COMMENT '评价类型:1=好评,2=中评,3=差评',
| `reply_content` varchar(500) NOT NULL COMMENT '回复内容',
| `sort_order` int NOT NULL DEFAULT 0 COMMENT '排序号',
| `status` char(1) NOT NULL DEFAULT '0' COMMENT '状态:0=启用,1=停用',
| `create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
| `update_time` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
| `del_flag` bit(1) NOT NULL DEFAULT b'0' COMMENT '删除标志:0=正常,1=删除',
| PRIMARY KEY (`id`),
| KEY `idx_mark_status` (`mark`, `status`),
| KEY `idx_sort_order` (`sort_order`)
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='评价智能回复规则';
|
| -- Menu permissions for management backend.
| -- If your content setting parent menu id is not found by name, replace @contentSettingMenuId manually.
| SET @contentSettingMenuId := (
| SELECT menu_id FROM sys_menu
| WHERE menu_name = '内容设置'
| ORDER BY menu_id ASC
| LIMIT 1
| );
|
| DELETE FROM sys_menu WHERE perms IN ('/smartReply', '/smartReply/add', '/smartReply/update', '/smartReply/del');
|
| INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark)
| SELECT '智能回复设置', @contentSettingMenuId, 99, 'smartReply', 'contentSetting/smartReply', 1, 0, 'C', '0', '0', '/smartReply', '#', 'admin', NOW(), '评价智能回复设置'
| WHERE @contentSettingMenuId IS NOT NULL;
|
| SET @smartReplyMenuId := LAST_INSERT_ID();
|
| INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark)
| SELECT '智能回复新增', @smartReplyMenuId, 1, '#', '', 1, 0, 'F', '0', '0', '/smartReply/add', '#', 'admin', NOW(), ''
| WHERE @smartReplyMenuId > 0;
|
| INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark)
| SELECT '智能回复修改', @smartReplyMenuId, 2, '#', '', 1, 0, 'F', '0', '0', '/smartReply/update', '#', 'admin', NOW(), ''
| WHERE @smartReplyMenuId > 0;
|
| INSERT INTO sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, remark)
| SELECT '智能回复删除', @smartReplyMenuId, 3, '#', '', 1, 0, 'F', '0', '0', '/smartReply/del', '#', 'admin', NOW(), ''
| WHERE @smartReplyMenuId > 0;
|
|