Browse Source

tj

master
fzzj 8 months ago
parent
commit
1cc642a469

+ 24
- 12
RuoYi-App/pages/novel/detail.vue View File

@@ -30,9 +30,10 @@ export default {
30 30
   components: { AdBanner },
31 31
   data() {
32 32
     return {
33
-      novelId: null,
33
+      novel: {},
34 34
       chapters: [],
35 35
       currentChapter: 0,
36
+      // 确保数组初始化
36 37
       midAds: [],
37 38
       chapterAds: [],
38 39
       showMidAd: false
@@ -45,12 +46,22 @@ export default {
45 46
   },
46 47
   methods: {
47 48
     async loadNovelData() {
49
+      // 加载小说详情
50
+      const novelRes = await this.$http.get(`/novel/detail/${this.novelId}`);
51
+      if (novelRes.data) {
52
+        this.novel = novelRes.data;
53
+      }
54
+      
48 55
       // 加载章节列表
49
-      const chapterRes = await this.$http.get(`/php-api/novel/chapters?id=${this.novelId}`);
50
-      this.chapters = chapterRes.data;
56
+      const chapterRes = await this.$http.get(`/chapter/list/${this.novelId}`);
57
+      if (chapterRes.rows && Array.isArray(chapterRes.rows)) {
58
+        this.chapters = chapterRes.rows;
59
+      }
51 60
       
52 61
       // 加载当前章节内容
53
-      await this.loadChapterContent(0);
62
+      if (this.chapters.length > 0) {
63
+        await this.loadChapterContent(0);
64
+      }
54 65
       
55 66
       // 加载章节广告
56 67
       const adRes = await this.$http.get('/java-api/ad/position?code=CHAPTER_FOOTER');
@@ -61,16 +72,17 @@ export default {
61 72
       if (index < 0 || index >= this.chapters.length) return;
62 73
       
63 74
       const chapterId = this.chapters[index].id;
64
-      const res = await this.$http.get(`/php-api/novel/chapter?id=${chapterId}`);
75
+      const res = await this.$http.get(`/chapter/content/${chapterId}`);
65 76
       
66 77
       // 更新章节内容
67
-      this.$set(this.chapters, index, {
68
-        ...this.chapters[index],
69
-        content: res.data.content
70
-      });
71
-      
72
-      this.currentChapter = index;
73
-    },
78
+      if (res.data) {
79
+        this.$set(this.chapters, index, {
80
+          ...this.chapters[index],
81
+          content: res.data.content
82
+        });
83
+        this.currentChapter = index;
84
+      }}
85
+,
74 86
     
75 87
     // 定时显示中间广告
76 88
     scheduleMidAd() {

+ 31
- 9
RuoYi-App/pages/novel/list.vue View File

@@ -70,6 +70,7 @@ export default {
70 70
 	components: { AdBanner },
71 71
   data() {
72 72
     return {
73
+          // 确保所有数组初始化为空数组
73 74
       novelList: [], // 存储小说目录数据
74 75
 	        topAds: [],
75 76
 	        bottomAds: [],
@@ -114,8 +115,30 @@ export default {
114 115
         async loadCategories() {
115 116
           try {
116 117
             // 从Java后台获取分类
117
-            const res = await this.$http.get('/novel/category/list');
118
-            this.categories = [{ id: 0, name: '全部' }, ...res.data];
118
+        const res = await this.$http.get('/category/tree');
119
+        // 确保数据结构正确
120
+        if (res.data && Array.isArray(res.data)) {
121
+          // 添加"全部"选项
122
+          this.categories = [{ id: 0, name: '全部' }];
123
+          
124
+          // 递归处理分类树
125
+          const processCategories = (cats) => {
126
+            cats.forEach(cat => {
127
+              this.categories.push({
128
+                id: cat.id,
129
+                name: cat.title,
130
+                children: cat.children
131
+              });
132
+              if (cat.children && cat.children.length) {
133
+                processCategories(cat.children);
134
+              }
135
+            });
136
+          };
137
+          
138
+          processCategories(res.data);
139
+        } else {
140
+          console.warn('分类数据格式不正确');
141
+        }
119 142
           } catch (e) {
120 143
             console.error('加载分类失败', e);
121 144
           }
@@ -141,15 +164,14 @@ export default {
141 164
           : '/novel/list';
142 165
           
143 166
         const res = await this.$http.get(url);
144
-        this.novels = res.data;
145
-        
146
-        // 更新当前分类名称
147
-        if (categoryId === 0) {
148
-          this.currentCategoryName = '全部';
167
+        // 确保数据结构正确
168
+        if (res.rows && Array.isArray(res.rows)) {
169
+          this.novels = res.rows;
149 170
         } else {
150
-          const category = this.categories.find(c => c.id === categoryId);
151
-          this.currentCategoryName = category ? category.name : '';
171
+          console.warn('小说列表数据格式不正确');
172
+          this.novels = [];
152 173
         }
174
+
153 175
       } catch (e) {
154 176
         uni.showToast({ title: '加载小说失败', icon: 'none' });
155 177
       }

+ 31
- 32
RuoYi-App/pages/novel/reader.vue View File

@@ -73,6 +73,7 @@ export default {
73 73
       chapterDetail: {},
74 74
       chapterContent: '',
75 75
       chapters: [],
76
+      // 确保所有字段初始化
76 77
       totalChapters: 0,
77 78
       progress: 0,
78 79
       scrollTop: 0,
@@ -85,54 +86,52 @@ export default {
85 86
     }
86 87
   },
87 88
   async onLoad(options) {
88
-    this.novelId = options.novelId
89
-    this.chapterId = options.chapterId || 1
89
+    this.novelId = options.novelId;
90
+    this.chapterId = options.chapterId || 1;
90 91
     
91
-    await this.loadNovelData()
92
-    await this.loadChapter()
92
+    await this.loadNovelData();
93
+    await this.loadChapter();
93 94
   },
94 95
   methods: {
95 96
     async loadNovelData() {
96
-      // 获取小说基本信息
97
-      const novel = await novelService.getNovelDetail(this.novelId)
98
-      this.novelTitle = novel.title
97
+      const res = await this.$http.get(`/novel/detail/${this.novelId}`);
98
+      if (res.data) {
99
+        this.novelTitle = res.data.title;
100
+      }
99 101
       
100 102
       // 获取章节列表
101
-      this.chapters = await novelService.getChapters(this.novelId)
102
-      this.totalChapters = this.chapters.length
103
+      const chapterRes = await this.$http.get(`/chapter/list/${this.novelId}`);
104
+      if (chapterRes.rows && Array.isArray(chapterRes.rows)) {
105
+        this.chapters = chapterRes.rows;
106
+        this.totalChapters = this.chapters.length;
107
+      }
103 108
     },
104 109
     
105 110
     async loadChapter() {
106
-      uni.showLoading({ title: '加载中...' })
111
+      uni.showLoading({ title: '加载中...' });
107 112
       
108 113
       try {
109
-        const chapter = await novelService.getChapterContent(this.novelId, this.chapterId)
110
-        this.chapterDetail = chapter
111
-        
112
-        // 处理章节内容
113
-        this.chapterContent = this.formatContent(chapter.content)
114
-        
115
-        // 计算阅读进度
116
-        this.progress = Math.round((this.chapterId / this.totalChapters) * 100)
117
-        
118
-        // 保存阅读进度
119
-        this.saveReadingProgress()
120
-        
121
-      } catch (error) {
122
-        uni.showToast({
123
-          title: '加载章节失败',
124
-          icon: 'none'
125
-        })
114
+        const res = await this.$http.get(`/chapter/content/${this.chapterId}`);
115
+        if (res.data) {
116
+          this.chapterDetail = res.data;
117
+          this.chapterContent = this.formatContent(res.data.content);
118
+          this.progress = Math.round((this.chapterDetail.chapterOrder / this.totalChapters) * 100);
119
+        }
126 120
       } finally {
127
-        uni.hideLoading()
121
+        uni.hideLoading();
128 122
       }
129 123
     },
130 124
     
131 125
     formatContent(content) {
132
-      // 将文本内容转换为带格式的HTML
133
-      const paragraphs = content.split('\n\n')
134
-      return paragraphs.map(p => `<p>${p}</p>`).join('')
135
-    },
126
+      // 处理特殊格式
127
+      return content
128
+        .replace(/<br>/g, '\n')
129
+        .replace(/&nbsp;/g, ' ')
130
+        .replace(/<p>/g, '\n\n')
131
+        .replace(/<\/p>/g, '')
132
+        .replace(/<[^>]+>/g, '');
133
+    }
134
+
136 135
     
137 136
     saveReadingProgress() {
138 137
       // 保存到本地

BIN
RuoYi-Vue/doc/若依环境使用手册.docx View File


+ 48
- 0
RuoYi-Vue/ruoyi-system/src/main/java/com/ruoyi/novel/controller/CategoryController.java View File

@@ -0,0 +1,48 @@
1
+package com.ruoyi.novel.controller;
2
+
3
+import com.ruoyi.common.core.controller.BaseController;
4
+import com.ruoyi.common.core.domain.AjaxResult;
5
+import com.ruoyi.novel.domain.NovelCategory;
6
+import com.ruoyi.novel.service.NovelCategoryService;
7
+import org.springframework.beans.factory.annotation.Qualifier;
8
+import org.springframework.web.bind.annotation.GetMapping;
9
+import org.springframework.web.bind.annotation.RequestMapping;
10
+import org.springframework.web.bind.annotation.RestController;
11
+
12
+import java.util.List;
13
+import java.util.Map;
14
+import java.util.stream.Collectors;
15
+
16
+@RestController
17
+@RequestMapping("/category")
18
+public class CategoryController extends BaseController {
19
+//    @Autowired
20
+//    private NovelCategoryService categoryService;
21
+    private final NovelCategoryService categoryService;
22
+
23
+    public CategoryController(@Qualifier("categoryService") NovelCategoryService categoryService) {
24
+        this.categoryService = categoryService;
25
+    }
26
+    @GetMapping("/tree")
27
+    public AjaxResult tree() {
28
+        List<NovelCategory> categories = categoryService.getCategoryTree();
29
+        return AjaxResult.success(categories);
30
+    }
31
+    // 获取分类树
32
+//    @GetMapping("/tree")
33
+//    public AjaxResult tree() {
34
+//        List<NovelCategory> categories = categoryService.list();
35
+//        Map<Integer, List<NovelCategory>> categoryMap = categories.stream()
36
+//                .collect(Collectors.groupingBy(NovelCategory::getPid));
37
+//
38
+//        // 构建树形结构
39
+//        List<NovelCategory> rootCategories = categoryMap.get(0);
40
+//        if (rootCategories != null) {
41
+//            rootCategories.forEach(cat ->
42
+//                    cat.setChildren(categoryMap.get(cat.getId()))
43
+//            );
44
+//        }
45
+//
46
+//        return AjaxResult.success(rootCategories);
47
+//    }
48
+}

+ 54
- 3
RuoYi-Vue/ruoyi-system/src/main/java/com/ruoyi/novel/controller/ChapterController.java View File

@@ -1,12 +1,18 @@
1 1
 package com.ruoyi.novel.controller;
2 2
 
3
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4
+import com.github.pagehelper.PageInfo;
5
+import com.ruoyi.common.constant.HttpStatus;
3 6
 import com.ruoyi.common.core.domain.AjaxResult;
7
+import com.ruoyi.common.core.page.TableDataInfo;
4 8
 import com.ruoyi.novel.domain.ChapterDTO;
9
+import com.ruoyi.novel.domain.ChapterUpdateInfo;
5 10
 import com.ruoyi.novel.domain.NovelChapter;
6 11
 import com.ruoyi.novel.service.ChapterService;
7 12
 import org.springframework.beans.factory.annotation.Autowired;
8 13
 import org.springframework.web.bind.annotation.*;
9 14
 
15
+import java.util.Base64;
10 16
 import java.util.List;
11 17
 
12 18
 // ChapterController.java
@@ -16,10 +22,55 @@ public class ChapterController {
16 22
 
17 23
     @Autowired
18 24
     private ChapterService chapterService;
25
+//    @GetMapping("/list/{novelId}")
26
+//    public AjaxResult listChapters(@PathVariable Long novelId) {
27
+//        List<NovelChapter> chapters = chapterService.selectChapterListByNovelId(novelId);
28
+//        return AjaxResult.success(chapters);
29
+//    }
30
+
31
+    // 获取章节列表
19 32
     @GetMapping("/list/{novelId}")
20
-    public AjaxResult listChapters(@PathVariable Long novelId) {
21
-        List<NovelChapter> chapters = chapterService.selectChapterListByNovelId(novelId);
22
-        return AjaxResult.success(chapters);
33
+    public TableDataInfo list(@PathVariable Long novelId) {
34
+        LambdaQueryWrapper<NovelChapter> wrapper = new LambdaQueryWrapper<>();
35
+        wrapper.eq(NovelChapter::getNovelId, novelId)
36
+                .orderByAsc(NovelChapter::getChapterOrder);
37
+        List<NovelChapter> list = chapterService.list(wrapper);
38
+
39
+        // 解析updated字段
40
+        list.forEach(chapter -> {
41
+            ChapterUpdateInfo updateInfo = chapter.getUpdateInfo();
42
+            chapter.setUpdateInfo(updateInfo);
43
+        });
44
+
45
+        return getDataTable(list);
46
+    }
47
+
48
+    private TableDataInfo getDataTable(List<NovelChapter> list) {
49
+        TableDataInfo rspData = new TableDataInfo();
50
+        rspData.setCode(HttpStatus.SUCCESS);
51
+        rspData.setRows(list);
52
+        rspData.setTotal(new PageInfo(list).getTotal());
53
+        return rspData;
54
+    }
55
+    // 获取章节内容
56
+    @GetMapping("/content/{id}")
57
+    public AjaxResult content(@PathVariable Long id) {
58
+        NovelChapter chapter = chapterService.getChapterById(id);
59
+        if (chapter == null) {
60
+            return AjaxResult.error("章节不存在");
61
+        }
62
+
63
+        // 解析内容(如果是base64)
64
+        if (chapter.getContent() != null && chapter.getContent().startsWith("base64")) {
65
+            String base64Content = chapter.getContent().substring(6);
66
+            String decodedContent = new String(Base64.getDecoder().decode(base64Content));
67
+            chapter.setContent(decodedContent);
68
+        }
69
+
70
+        // 更新阅读量
71
+        //chapterService.updateReadCount(id);
72
+
73
+        return AjaxResult.success(chapter);
23 74
     }
24 75
     @GetMapping("/{novelId}")
25 76
     public AjaxResult getChapters(@PathVariable Long novelId) {

+ 37
- 4
RuoYi-Vue/ruoyi-system/src/main/java/com/ruoyi/novel/controller/NovelController.java View File

@@ -10,6 +10,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
10 10
 import com.ruoyi.common.core.page.TableSupport;
11 11
 import com.ruoyi.novel.domain.AuthorApplicationDTO;
12 12
 import com.ruoyi.novel.domain.Novel;
13
+import com.ruoyi.novel.domain.NovelCategory;
13 14
 import com.ruoyi.novel.mapper.NovelMapper;
14 15
 import com.ruoyi.novel.service.IAuthService;
15 16
 import com.ruoyi.novel.service.NovelSearchService;
@@ -71,10 +72,42 @@ public class NovelController extends BaseController {
71 72
 //    }
72 73
     // 按分类获取小说
73 74
 // 按分类获取小说
74
-@GetMapping("/list")
75
-public TableDataInfo getNovelsByCategory(@RequestParam(required = false) Long categoryId) {
76
-    return (TableDataInfo) novelService.getNovelsByCategory(categoryId);
77
-}
75
+//@GetMapping("/list")
76
+//public TableDataInfo getNovelsByCategory(@RequestParam(required = false) Long categoryId) {
77
+//    return (TableDataInfo) novelService.getNovelsByCategory(categoryId);
78
+//}
79
+    // 获取小说列表
80
+    @GetMapping("/list")
81
+    public TableDataInfo list(Novel novel) {
82
+        startPage();
83
+        List<Novel> list = novelService.selectNovelList(novel);
84
+        // 关联分类名称
85
+        list.forEach(n -> {
86
+            NovelCategory category = (NovelCategory) novelService.getNovelsByCategory(n.getCategoryId());
87
+            if (category != null) {
88
+                n.setCategoryName(category.getTitle());
89
+            }
90
+        });
91
+        return getDataTable(list);
92
+    }
93
+
94
+    // 获取小说详情
95
+    @GetMapping("/detail/{id}")
96
+    public AjaxResult detail(@PathVariable Long id) {
97
+        Novel novel = novelService.selectNovelById(id);
98
+        if (novel == null) {
99
+            return AjaxResult.error("小说不存在");
100
+        }
101
+
102
+        // 获取分类信息
103
+        NovelCategory category = (NovelCategory) novelService.getNovelsByCategory(novel.getCategoryId());
104
+        if (category != null) {
105
+            novel.setCategoryName(category.getTitle());
106
+        }
107
+
108
+        return AjaxResult.success(novel);
109
+    }
110
+
78 111
 
79 112
 // 获取小说章节列表
80 113
 @GetMapping("/{novelId}/chapters")

+ 11
- 0
RuoYi-Vue/ruoyi-system/src/main/java/com/ruoyi/novel/mapper/NovelCategoryMapper.java View File

@@ -0,0 +1,11 @@
1
+package com.ruoyi.novel.mapper;
2
+
3
+import com.ruoyi.novel.domain.NovelCategory;
4
+import java.util.List;
5
+import org.apache.ibatis.annotations.Mapper;
6
+
7
+@Mapper // 确保添加 Mapper 注解
8
+public interface NovelCategoryMapper {
9
+    List<NovelCategory> selectCategoryList();
10
+    NovelCategory selectById(Integer categoryId);
11
+}

+ 2
- 0
RuoYi-Vue/ruoyi-system/src/main/java/com/ruoyi/novel/mapper/NovelChapterMapper.java View File

@@ -25,4 +25,6 @@ public interface NovelChapterMapper {
25 25
     int deleteBatchIds(List<Long> asList);
26 26
 
27 27
     Integer selectMaxChapterOrderByNovelId(Long novelId);
28
+
29
+    void updateReadCount(Long id);
28 30
 }

+ 7
- 0
RuoYi-Vue/ruoyi-system/src/main/java/com/ruoyi/novel/service/ChapterService.java View File

@@ -1,5 +1,6 @@
1 1
 package com.ruoyi.novel.service;
2 2
 
3
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
3 4
 import com.ruoyi.novel.domain.NovelChapter;
4 5
 
5 6
 import java.util.List;
@@ -12,4 +13,10 @@ public interface ChapterService {
12 13
     int deleteChapters(Long[] ids);
13 14
 
14 15
     Integer findLatestChapterOrder(Long novelId);
16
+
17
+    List<NovelChapter> list(LambdaQueryWrapper<NovelChapter> wrapper);
18
+
19
+    void updateReadCount(Long chapterId);
20
+
21
+    void updateById(NovelChapter phpChapter);
15 22
 }

+ 13
- 0
RuoYi-Vue/ruoyi-system/src/main/java/com/ruoyi/novel/service/NovelCategoryService.java View File

@@ -0,0 +1,13 @@
1
+package com.ruoyi.novel.service;
2
+
3
+import com.ruoyi.novel.domain.NovelCategory;
4
+import org.springframework.stereotype.Service;
5
+
6
+import java.util.List;
7
+@Service
8
+public interface NovelCategoryService {
9
+    List<NovelCategory> list();
10
+    List<NovelCategory> selectCategoryList();
11
+    NovelCategory getCategoryById(Integer categoryId);
12
+    List<NovelCategory> getCategoryTree();
13
+}

+ 58
- 0
RuoYi-Vue/ruoyi-system/src/main/java/com/ruoyi/novel/service/NovelSyncService.java View File

@@ -0,0 +1,58 @@
1
+package com.ruoyi.novel.service;
2
+
3
+import com.ruoyi.novel.domain.Novel;
4
+import com.ruoyi.novel.domain.NovelChapter;
5
+import org.springframework.beans.factory.annotation.Autowired;
6
+import org.springframework.scheduling.annotation.Scheduled;
7
+import org.springframework.stereotype.Service;
8
+
9
+import java.util.Collections;
10
+import java.util.List;
11
+
12
+// NovelSyncService.java
13
+@Service
14
+public class NovelSyncService {
15
+    @Autowired
16
+    private NovelService novelService;
17
+    @Autowired
18
+    private ChapterService chapterService;
19
+
20
+    @Scheduled(cron = "0 0 2 * * ?") // 每天凌晨2点执行
21
+    public void syncData() {
22
+        // 1. 获取PHP端最新数据
23
+        List<Novel> phpNovels = getPhpNovels();
24
+        List<NovelChapter> phpChapters = getPhpChapters();
25
+
26
+        // 2. 同步小说数据
27
+        phpNovels.forEach(phpNovel -> {
28
+            Novel localNovel = novelService.selectNovelById(phpNovel.getId());
29
+            if (localNovel == null) {
30
+                novelService.insertNovel(phpNovel);
31
+            } else if (phpNovel.getUpdateTime().after(localNovel.getUpdateTime())) {
32
+                novelService.updateNovel(phpNovel);
33
+            }
34
+        });
35
+
36
+        // 3. 同步章节数据
37
+        phpChapters.forEach(phpChapter -> {
38
+            NovelChapter localChapter = chapterService.getChapterById(phpChapter.getId());
39
+            if (localChapter == null) {
40
+                chapterService.saveChapter(phpChapter,phpChapter.getContent());
41
+            } else if (phpChapter.getUpdateTime().after(localChapter.getUpdateTime())) {
42
+                chapterService.updateById(phpChapter);
43
+            }
44
+        });
45
+    }
46
+
47
+    private List<Novel> getPhpNovels() {
48
+        // 调用PHP API获取小说数据
49
+        // 实际实现中替换为真实的PHP API调用
50
+        return Collections.emptyList();
51
+    }
52
+
53
+    private List<NovelChapter> getPhpChapters() {
54
+        // 调用PHP API获取章节数据
55
+        // 实际实现中替换为真实的PHP API调用
56
+        return Collections.emptyList();
57
+    }
58
+}

+ 18
- 0
RuoYi-Vue/ruoyi-system/src/main/java/com/ruoyi/novel/service/impl/ChapterServiceImpl.java View File

@@ -1,5 +1,6 @@
1 1
 package com.ruoyi.novel.service.impl;
2 2
 
3
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
3 4
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
4 5
 import com.ruoyi.novel.domain.NovelChapter;
5 6
 import com.ruoyi.novel.domain.NovelContent;
@@ -84,4 +85,21 @@ public class ChapterServiceImpl implements ChapterService {
84 85
         // 调用Mapper查询数据库
85 86
         return chapterMapper.selectMaxChapterOrderByNovelId(novelId);
86 87
     }
88
+
89
+    @Override
90
+    public List<NovelChapter> list(LambdaQueryWrapper<NovelChapter> wrapper) {
91
+        return null;
92
+    }
93
+
94
+    @Override
95
+    public void updateReadCount(Long id) {
96
+        NovelChapter novelChapter = new NovelChapter();
97
+        novelChapter.setId(id);
98
+        chapterMapper.updateChapter(novelChapter);
99
+    }
100
+
101
+    @Override
102
+    public void updateById(NovelChapter phpChapter) {
103
+        chapterMapper.updateById(phpChapter);
104
+    }
87 105
 }

+ 48
- 0
RuoYi-Vue/ruoyi-system/src/main/java/com/ruoyi/novel/service/impl/NovelCategoryServiceImpl.java View File

@@ -0,0 +1,48 @@
1
+package com.ruoyi.novel.service.impl;
2
+
3
+import com.ruoyi.novel.domain.NovelCategory;
4
+import com.ruoyi.novel.mapper.NovelCategoryMapper;
5
+import com.ruoyi.novel.service.NovelCategoryService;
6
+import com.ruoyi.novel.service.NovelSearchService;
7
+import org.springframework.beans.factory.annotation.Autowired;
8
+import org.springframework.stereotype.Service;
9
+
10
+import java.util.List;
11
+import java.util.Map;
12
+import java.util.stream.Collectors;
13
+@Service
14
+public class NovelCategoryServiceImpl implements NovelCategoryService {
15
+    @Override
16
+    public List<NovelCategory> list() {
17
+        return null;
18
+    }
19
+
20
+    @Autowired
21
+    private NovelCategoryMapper novelCategoryMapper;
22
+
23
+    @Override
24
+    public List<NovelCategory> selectCategoryList() {
25
+        return novelCategoryMapper.selectCategoryList();
26
+    }
27
+
28
+    @Override
29
+    public NovelCategory getCategoryById(Integer categoryId) {
30
+        return novelCategoryMapper.selectById(categoryId);
31
+    }
32
+
33
+    @Override
34
+    public List<NovelCategory> getCategoryTree() {
35
+        List<NovelCategory> categories = novelCategoryMapper.selectCategoryList();
36
+        Map<Integer, List<NovelCategory>> categoryMap = categories.stream()
37
+                .collect(Collectors.groupingBy(NovelCategory::getPid));
38
+
39
+        // 构建树形结构
40
+        List<NovelCategory> rootCategories = categoryMap.get(0);
41
+        if (rootCategories != null) {
42
+            rootCategories.forEach(cat ->
43
+                    cat.setChildren(categoryMap.get(cat.getId()))
44
+            );
45
+        }
46
+        return rootCategories;
47
+    }
48
+}

+ 25
- 0
RuoYi-Vue/ruoyi-system/src/main/resources/mapper/novel/NovelChapterMapper.xml View File

@@ -0,0 +1,25 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.ruoyi.novel.mapper.NovelCategoryMapper">
4
+
5
+    <resultMap id="NovelCategoryResult" type="NovelCategory">
6
+        <id property="id" column="id" />
7
+        <result property="title" column="title" />
8
+        <result property="pid" column="pid" />
9
+        <result property="sort" column="sort" />
10
+        <!-- 其他字段映射 -->
11
+    </resultMap>
12
+
13
+    <select id="selectCategoryList" resultMap="NovelCategoryResult">
14
+        SELECT id, title, pid, sort
15
+        FROM novel_category
16
+        WHERE status = 1
17
+        ORDER BY sort ASC
18
+    </select>
19
+
20
+    <select id="selectById" resultMap="NovelCategoryResult">
21
+        SELECT id, title, pid, sort
22
+        FROM novel_category
23
+        WHERE id = #{categoryId}
24
+    </select>
25
+</mapper>

+ 174
- 0
RuoYi-Vue/sql/quartz.sql View File

@@ -0,0 +1,174 @@
1
+DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS;
2
+DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS;
3
+DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE;
4
+DROP TABLE IF EXISTS QRTZ_LOCKS;
5
+DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS;
6
+DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS;
7
+DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS;
8
+DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS;
9
+DROP TABLE IF EXISTS QRTZ_TRIGGERS;
10
+DROP TABLE IF EXISTS QRTZ_JOB_DETAILS;
11
+DROP TABLE IF EXISTS QRTZ_CALENDARS;
12
+
13
+-- ----------------------------
14
+-- 1、存储每一个已配置的 jobDetail 的详细信息
15
+-- ----------------------------
16
+create table QRTZ_JOB_DETAILS (
17
+    sched_name           varchar(120)    not null            comment '调度名称',
18
+    job_name             varchar(200)    not null            comment '任务名称',
19
+    job_group            varchar(200)    not null            comment '任务组名',
20
+    description          varchar(250)    null                comment '相关介绍',
21
+    job_class_name       varchar(250)    not null            comment '执行任务类名称',
22
+    is_durable           varchar(1)      not null            comment '是否持久化',
23
+    is_nonconcurrent     varchar(1)      not null            comment '是否并发',
24
+    is_update_data       varchar(1)      not null            comment '是否更新数据',
25
+    requests_recovery    varchar(1)      not null            comment '是否接受恢复执行',
26
+    job_data             blob            null                comment '存放持久化job对象',
27
+    primary key (sched_name, job_name, job_group)
28
+) engine=innodb comment = '任务详细信息表';
29
+
30
+-- ----------------------------
31
+-- 2、 存储已配置的 Trigger 的信息
32
+-- ----------------------------
33
+create table QRTZ_TRIGGERS (
34
+    sched_name           varchar(120)    not null            comment '调度名称',
35
+    trigger_name         varchar(200)    not null            comment '触发器的名字',
36
+    trigger_group        varchar(200)    not null            comment '触发器所属组的名字',
37
+    job_name             varchar(200)    not null            comment 'qrtz_job_details表job_name的外键',
38
+    job_group            varchar(200)    not null            comment 'qrtz_job_details表job_group的外键',
39
+    description          varchar(250)    null                comment '相关介绍',
40
+    next_fire_time       bigint(13)      null                comment '上一次触发时间(毫秒)',
41
+    prev_fire_time       bigint(13)      null                comment '下一次触发时间(默认为-1表示不触发)',
42
+    priority             integer         null                comment '优先级',
43
+    trigger_state        varchar(16)     not null            comment '触发器状态',
44
+    trigger_type         varchar(8)      not null            comment '触发器的类型',
45
+    start_time           bigint(13)      not null            comment '开始时间',
46
+    end_time             bigint(13)      null                comment '结束时间',
47
+    calendar_name        varchar(200)    null                comment '日程表名称',
48
+    misfire_instr        smallint(2)     null                comment '补偿执行的策略',
49
+    job_data             blob            null                comment '存放持久化job对象',
50
+    primary key (sched_name, trigger_name, trigger_group),
51
+    foreign key (sched_name, job_name, job_group) references QRTZ_JOB_DETAILS(sched_name, job_name, job_group)
52
+) engine=innodb comment = '触发器详细信息表';
53
+
54
+-- ----------------------------
55
+-- 3、 存储简单的 Trigger,包括重复次数,间隔,以及已触发的次数
56
+-- ----------------------------
57
+create table QRTZ_SIMPLE_TRIGGERS (
58
+    sched_name           varchar(120)    not null            comment '调度名称',
59
+    trigger_name         varchar(200)    not null            comment 'qrtz_triggers表trigger_name的外键',
60
+    trigger_group        varchar(200)    not null            comment 'qrtz_triggers表trigger_group的外键',
61
+    repeat_count         bigint(7)       not null            comment '重复的次数统计',
62
+    repeat_interval      bigint(12)      not null            comment '重复的间隔时间',
63
+    times_triggered      bigint(10)      not null            comment '已经触发的次数',
64
+    primary key (sched_name, trigger_name, trigger_group),
65
+    foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
66
+) engine=innodb comment = '简单触发器的信息表';
67
+
68
+-- ----------------------------
69
+-- 4、 存储 Cron Trigger,包括 Cron 表达式和时区信息
70
+-- ---------------------------- 
71
+create table QRTZ_CRON_TRIGGERS (
72
+    sched_name           varchar(120)    not null            comment '调度名称',
73
+    trigger_name         varchar(200)    not null            comment 'qrtz_triggers表trigger_name的外键',
74
+    trigger_group        varchar(200)    not null            comment 'qrtz_triggers表trigger_group的外键',
75
+    cron_expression      varchar(200)    not null            comment 'cron表达式',
76
+    time_zone_id         varchar(80)                         comment '时区',
77
+    primary key (sched_name, trigger_name, trigger_group),
78
+    foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
79
+) engine=innodb comment = 'Cron类型的触发器表';
80
+
81
+-- ----------------------------
82
+-- 5、 Trigger 作为 Blob 类型存储(用于 Quartz 用户用 JDBC 创建他们自己定制的 Trigger 类型,JobStore 并不知道如何存储实例的时候)
83
+-- ---------------------------- 
84
+create table QRTZ_BLOB_TRIGGERS (
85
+    sched_name           varchar(120)    not null            comment '调度名称',
86
+    trigger_name         varchar(200)    not null            comment 'qrtz_triggers表trigger_name的外键',
87
+    trigger_group        varchar(200)    not null            comment 'qrtz_triggers表trigger_group的外键',
88
+    blob_data            blob            null                comment '存放持久化Trigger对象',
89
+    primary key (sched_name, trigger_name, trigger_group),
90
+    foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
91
+) engine=innodb comment = 'Blob类型的触发器表';
92
+
93
+-- ----------------------------
94
+-- 6、 以 Blob 类型存储存放日历信息, quartz可配置一个日历来指定一个时间范围
95
+-- ---------------------------- 
96
+create table QRTZ_CALENDARS (
97
+    sched_name           varchar(120)    not null            comment '调度名称',
98
+    calendar_name        varchar(200)    not null            comment '日历名称',
99
+    calendar             blob            not null            comment '存放持久化calendar对象',
100
+    primary key (sched_name, calendar_name)
101
+) engine=innodb comment = '日历信息表';
102
+
103
+-- ----------------------------
104
+-- 7、 存储已暂停的 Trigger 组的信息
105
+-- ---------------------------- 
106
+create table QRTZ_PAUSED_TRIGGER_GRPS (
107
+    sched_name           varchar(120)    not null            comment '调度名称',
108
+    trigger_group        varchar(200)    not null            comment 'qrtz_triggers表trigger_group的外键',
109
+    primary key (sched_name, trigger_group)
110
+) engine=innodb comment = '暂停的触发器表';
111
+
112
+-- ----------------------------
113
+-- 8、 存储与已触发的 Trigger 相关的状态信息,以及相联 Job 的执行信息
114
+-- ---------------------------- 
115
+create table QRTZ_FIRED_TRIGGERS (
116
+    sched_name           varchar(120)    not null            comment '调度名称',
117
+    entry_id             varchar(95)     not null            comment '调度器实例id',
118
+    trigger_name         varchar(200)    not null            comment 'qrtz_triggers表trigger_name的外键',
119
+    trigger_group        varchar(200)    not null            comment 'qrtz_triggers表trigger_group的外键',
120
+    instance_name        varchar(200)    not null            comment '调度器实例名',
121
+    fired_time           bigint(13)      not null            comment '触发的时间',
122
+    sched_time           bigint(13)      not null            comment '定时器制定的时间',
123
+    priority             integer         not null            comment '优先级',
124
+    state                varchar(16)     not null            comment '状态',
125
+    job_name             varchar(200)    null                comment '任务名称',
126
+    job_group            varchar(200)    null                comment '任务组名',
127
+    is_nonconcurrent     varchar(1)      null                comment '是否并发',
128
+    requests_recovery    varchar(1)      null                comment '是否接受恢复执行',
129
+    primary key (sched_name, entry_id)
130
+) engine=innodb comment = '已触发的触发器表';
131
+
132
+-- ----------------------------
133
+-- 9、 存储少量的有关 Scheduler 的状态信息,假如是用于集群中,可以看到其他的 Scheduler 实例
134
+-- ---------------------------- 
135
+create table QRTZ_SCHEDULER_STATE (
136
+    sched_name           varchar(120)    not null            comment '调度名称',
137
+    instance_name        varchar(200)    not null            comment '实例名称',
138
+    last_checkin_time    bigint(13)      not null            comment '上次检查时间',
139
+    checkin_interval     bigint(13)      not null            comment '检查间隔时间',
140
+    primary key (sched_name, instance_name)
141
+) engine=innodb comment = '调度器状态表';
142
+
143
+-- ----------------------------
144
+-- 10、 存储程序的悲观锁的信息(假如使用了悲观锁)
145
+-- ---------------------------- 
146
+create table QRTZ_LOCKS (
147
+    sched_name           varchar(120)    not null            comment '调度名称',
148
+    lock_name            varchar(40)     not null            comment '悲观锁名称',
149
+    primary key (sched_name, lock_name)
150
+) engine=innodb comment = '存储的悲观锁信息表';
151
+
152
+-- ----------------------------
153
+-- 11、 Quartz集群实现同步机制的行锁表
154
+-- ---------------------------- 
155
+create table QRTZ_SIMPROP_TRIGGERS (
156
+    sched_name           varchar(120)    not null            comment '调度名称',
157
+    trigger_name         varchar(200)    not null            comment 'qrtz_triggers表trigger_name的外键',
158
+    trigger_group        varchar(200)    not null            comment 'qrtz_triggers表trigger_group的外键',
159
+    str_prop_1           varchar(512)    null                comment 'String类型的trigger的第一个参数',
160
+    str_prop_2           varchar(512)    null                comment 'String类型的trigger的第二个参数',
161
+    str_prop_3           varchar(512)    null                comment 'String类型的trigger的第三个参数',
162
+    int_prop_1           int             null                comment 'int类型的trigger的第一个参数',
163
+    int_prop_2           int             null                comment 'int类型的trigger的第二个参数',
164
+    long_prop_1          bigint          null                comment 'long类型的trigger的第一个参数',
165
+    long_prop_2          bigint          null                comment 'long类型的trigger的第二个参数',
166
+    dec_prop_1           numeric(13,4)   null                comment 'decimal类型的trigger的第一个参数',
167
+    dec_prop_2           numeric(13,4)   null                comment 'decimal类型的trigger的第二个参数',
168
+    bool_prop_1          varchar(1)      null                comment 'Boolean类型的trigger的第一个参数',
169
+    bool_prop_2          varchar(1)      null                comment 'Boolean类型的trigger的第二个参数',
170
+    primary key (sched_name, trigger_name, trigger_group),
171
+    foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group)
172
+) engine=innodb comment = '同步机制的行锁表';
173
+
174
+commit;

+ 704
- 0
RuoYi-Vue/sql/ry_20250522.sql View File

@@ -0,0 +1,704 @@
1
+-- ----------------------------
2
+-- 1、部门表
3
+-- ----------------------------
4
+drop table if exists sys_dept;
5
+create table sys_dept (
6
+  dept_id           bigint(20)      not null auto_increment    comment '部门id',
7
+  parent_id         bigint(20)      default 0                  comment '父部门id',
8
+  ancestors         varchar(50)     default ''                 comment '祖级列表',
9
+  dept_name         varchar(30)     default ''                 comment '部门名称',
10
+  order_num         int(4)          default 0                  comment '显示顺序',
11
+  leader            varchar(20)     default null               comment '负责人',
12
+  phone             varchar(11)     default null               comment '联系电话',
13
+  email             varchar(50)     default null               comment '邮箱',
14
+  status            char(1)         default '0'                comment '部门状态(0正常 1停用)',
15
+  del_flag          char(1)         default '0'                comment '删除标志(0代表存在 2代表删除)',
16
+  create_by         varchar(64)     default ''                 comment '创建者',
17
+  create_time 	    datetime                                   comment '创建时间',
18
+  update_by         varchar(64)     default ''                 comment '更新者',
19
+  update_time       datetime                                   comment '更新时间',
20
+  primary key (dept_id)
21
+) engine=innodb auto_increment=200 comment = '部门表';
22
+
23
+-- ----------------------------
24
+-- 初始化-部门表数据
25
+-- ----------------------------
26
+insert into sys_dept values(100,  0,   '0',          '若依科技',   0, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
27
+insert into sys_dept values(101,  100, '0,100',      '深圳总公司', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
28
+insert into sys_dept values(102,  100, '0,100',      '长沙分公司', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
29
+insert into sys_dept values(103,  101, '0,100,101',  '研发部门',   1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
30
+insert into sys_dept values(104,  101, '0,100,101',  '市场部门',   2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
31
+insert into sys_dept values(105,  101, '0,100,101',  '测试部门',   3, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
32
+insert into sys_dept values(106,  101, '0,100,101',  '财务部门',   4, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
33
+insert into sys_dept values(107,  101, '0,100,101',  '运维部门',   5, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
34
+insert into sys_dept values(108,  102, '0,100,102',  '市场部门',   1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
35
+insert into sys_dept values(109,  102, '0,100,102',  '财务部门',   2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null);
36
+
37
+
38
+-- ----------------------------
39
+-- 2、用户信息表
40
+-- ----------------------------
41
+drop table if exists sys_user;
42
+create table sys_user (
43
+  user_id           bigint(20)      not null auto_increment    comment '用户ID',
44
+  dept_id           bigint(20)      default null               comment '部门ID',
45
+  user_name         varchar(30)     not null                   comment '用户账号',
46
+  nick_name         varchar(30)     not null                   comment '用户昵称',
47
+  user_type         varchar(2)      default '00'               comment '用户类型(00系统用户)',
48
+  email             varchar(50)     default ''                 comment '用户邮箱',
49
+  phonenumber       varchar(11)     default ''                 comment '手机号码',
50
+  sex               char(1)         default '0'                comment '用户性别(0男 1女 2未知)',
51
+  avatar            varchar(100)    default ''                 comment '头像地址',
52
+  password          varchar(100)    default ''                 comment '密码',
53
+  status            char(1)         default '0'                comment '账号状态(0正常 1停用)',
54
+  del_flag          char(1)         default '0'                comment '删除标志(0代表存在 2代表删除)',
55
+  login_ip          varchar(128)    default ''                 comment '最后登录IP',
56
+  login_date        datetime                                   comment '最后登录时间',
57
+  pwd_update_date   datetime                                   comment '密码最后更新时间',
58
+  create_by         varchar(64)     default ''                 comment '创建者',
59
+  create_time       datetime                                   comment '创建时间',
60
+  update_by         varchar(64)     default ''                 comment '更新者',
61
+  update_time       datetime                                   comment '更新时间',
62
+  remark            varchar(500)    default null               comment '备注',
63
+  primary key (user_id)
64
+) engine=innodb auto_increment=100 comment = '用户信息表';
65
+
66
+-- ----------------------------
67
+-- 初始化-用户信息表数据
68
+-- ----------------------------
69
+insert into sys_user values(1,  103, 'admin', '若依', '00', 'ry@163.com', '15888888888', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), sysdate(), 'admin', sysdate(), '', null, '管理员');
70
+insert into sys_user values(2,  105, 'ry',    '若依', '00', 'ry@qq.com',  '15666666666', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), sysdate(), 'admin', sysdate(), '', null, '测试员');
71
+
72
+
73
+-- ----------------------------
74
+-- 3、岗位信息表
75
+-- ----------------------------
76
+drop table if exists sys_post;
77
+create table sys_post
78
+(
79
+  post_id       bigint(20)      not null auto_increment    comment '岗位ID',
80
+  post_code     varchar(64)     not null                   comment '岗位编码',
81
+  post_name     varchar(50)     not null                   comment '岗位名称',
82
+  post_sort     int(4)          not null                   comment '显示顺序',
83
+  status        char(1)         not null                   comment '状态(0正常 1停用)',
84
+  create_by     varchar(64)     default ''                 comment '创建者',
85
+  create_time   datetime                                   comment '创建时间',
86
+  update_by     varchar(64)     default ''			       comment '更新者',
87
+  update_time   datetime                                   comment '更新时间',
88
+  remark        varchar(500)    default null               comment '备注',
89
+  primary key (post_id)
90
+) engine=innodb comment = '岗位信息表';
91
+
92
+-- ----------------------------
93
+-- 初始化-岗位信息表数据
94
+-- ----------------------------
95
+insert into sys_post values(1, 'ceo',  '董事长',    1, '0', 'admin', sysdate(), '', null, '');
96
+insert into sys_post values(2, 'se',   '项目经理',  2, '0', 'admin', sysdate(), '', null, '');
97
+insert into sys_post values(3, 'hr',   '人力资源',  3, '0', 'admin', sysdate(), '', null, '');
98
+insert into sys_post values(4, 'user', '普通员工',  4, '0', 'admin', sysdate(), '', null, '');
99
+
100
+
101
+-- ----------------------------
102
+-- 4、角色信息表
103
+-- ----------------------------
104
+drop table if exists sys_role;
105
+create table sys_role (
106
+  role_id              bigint(20)      not null auto_increment    comment '角色ID',
107
+  role_name            varchar(30)     not null                   comment '角色名称',
108
+  role_key             varchar(100)    not null                   comment '角色权限字符串',
109
+  role_sort            int(4)          not null                   comment '显示顺序',
110
+  data_scope           char(1)         default '1'                comment '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)',
111
+  menu_check_strictly  tinyint(1)      default 1                  comment '菜单树选择项是否关联显示',
112
+  dept_check_strictly  tinyint(1)      default 1                  comment '部门树选择项是否关联显示',
113
+  status               char(1)         not null                   comment '角色状态(0正常 1停用)',
114
+  del_flag             char(1)         default '0'                comment '删除标志(0代表存在 2代表删除)',
115
+  create_by            varchar(64)     default ''                 comment '创建者',
116
+  create_time          datetime                                   comment '创建时间',
117
+  update_by            varchar(64)     default ''                 comment '更新者',
118
+  update_time          datetime                                   comment '更新时间',
119
+  remark               varchar(500)    default null               comment '备注',
120
+  primary key (role_id)
121
+) engine=innodb auto_increment=100 comment = '角色信息表';
122
+
123
+-- ----------------------------
124
+-- 初始化-角色信息表数据
125
+-- ----------------------------
126
+insert into sys_role values('1', '超级管理员',  'admin',  1, 1, 1, 1, '0', '0', 'admin', sysdate(), '', null, '超级管理员');
127
+insert into sys_role values('2', '普通角色',    'common', 2, 2, 1, 1, '0', '0', 'admin', sysdate(), '', null, '普通角色');
128
+
129
+
130
+-- ----------------------------
131
+-- 5、菜单权限表
132
+-- ----------------------------
133
+drop table if exists sys_menu;
134
+create table sys_menu (
135
+  menu_id           bigint(20)      not null auto_increment    comment '菜单ID',
136
+  menu_name         varchar(50)     not null                   comment '菜单名称',
137
+  parent_id         bigint(20)      default 0                  comment '父菜单ID',
138
+  order_num         int(4)          default 0                  comment '显示顺序',
139
+  path              varchar(200)    default ''                 comment '路由地址',
140
+  component         varchar(255)    default null               comment '组件路径',
141
+  query             varchar(255)    default null               comment '路由参数',
142
+  route_name        varchar(50)     default ''                 comment '路由名称',
143
+  is_frame          int(1)          default 1                  comment '是否为外链(0是 1否)',
144
+  is_cache          int(1)          default 0                  comment '是否缓存(0缓存 1不缓存)',
145
+  menu_type         char(1)         default ''                 comment '菜单类型(M目录 C菜单 F按钮)',
146
+  visible           char(1)         default 0                  comment '菜单状态(0显示 1隐藏)',
147
+  status            char(1)         default 0                  comment '菜单状态(0正常 1停用)',
148
+  perms             varchar(100)    default null               comment '权限标识',
149
+  icon              varchar(100)    default '#'                comment '菜单图标',
150
+  create_by         varchar(64)     default ''                 comment '创建者',
151
+  create_time       datetime                                   comment '创建时间',
152
+  update_by         varchar(64)     default ''                 comment '更新者',
153
+  update_time       datetime                                   comment '更新时间',
154
+  remark            varchar(500)    default ''                 comment '备注',
155
+  primary key (menu_id)
156
+) engine=innodb auto_increment=2000 comment = '菜单权限表';
157
+
158
+-- ----------------------------
159
+-- 初始化-菜单信息表数据
160
+-- ----------------------------
161
+-- 一级菜单
162
+insert into sys_menu values('1', '系统管理', '0', '1', 'system',           null, '', '', 1, 0, 'M', '0', '0', '', 'system',   'admin', sysdate(), '', null, '系统管理目录');
163
+insert into sys_menu values('2', '系统监控', '0', '2', 'monitor',          null, '', '', 1, 0, 'M', '0', '0', '', 'monitor',  'admin', sysdate(), '', null, '系统监控目录');
164
+insert into sys_menu values('3', '系统工具', '0', '3', 'tool',             null, '', '', 1, 0, 'M', '0', '0', '', 'tool',     'admin', sysdate(), '', null, '系统工具目录');
165
+insert into sys_menu values('4', '若依官网', '0', '4', 'http://ruoyi.vip', null, '', '', 0, 0, 'M', '0', '0', '', 'guide',    'admin', sysdate(), '', null, '若依官网地址');
166
+-- 二级菜单
167
+insert into sys_menu values('100',  '用户管理', '1',   '1', 'user',       'system/user/index',        '', '', 1, 0, 'C', '0', '0', 'system:user:list',        'user',          'admin', sysdate(), '', null, '用户管理菜单');
168
+insert into sys_menu values('101',  '角色管理', '1',   '2', 'role',       'system/role/index',        '', '', 1, 0, 'C', '0', '0', 'system:role:list',        'peoples',       'admin', sysdate(), '', null, '角色管理菜单');
169
+insert into sys_menu values('102',  '菜单管理', '1',   '3', 'menu',       'system/menu/index',        '', '', 1, 0, 'C', '0', '0', 'system:menu:list',        'tree-table',    'admin', sysdate(), '', null, '菜单管理菜单');
170
+insert into sys_menu values('103',  '部门管理', '1',   '4', 'dept',       'system/dept/index',        '', '', 1, 0, 'C', '0', '0', 'system:dept:list',        'tree',          'admin', sysdate(), '', null, '部门管理菜单');
171
+insert into sys_menu values('104',  '岗位管理', '1',   '5', 'post',       'system/post/index',        '', '', 1, 0, 'C', '0', '0', 'system:post:list',        'post',          'admin', sysdate(), '', null, '岗位管理菜单');
172
+insert into sys_menu values('105',  '字典管理', '1',   '6', 'dict',       'system/dict/index',        '', '', 1, 0, 'C', '0', '0', 'system:dict:list',        'dict',          'admin', sysdate(), '', null, '字典管理菜单');
173
+insert into sys_menu values('106',  '参数设置', '1',   '7', 'config',     'system/config/index',      '', '', 1, 0, 'C', '0', '0', 'system:config:list',      'edit',          'admin', sysdate(), '', null, '参数设置菜单');
174
+insert into sys_menu values('107',  '通知公告', '1',   '8', 'notice',     'system/notice/index',      '', '', 1, 0, 'C', '0', '0', 'system:notice:list',      'message',       'admin', sysdate(), '', null, '通知公告菜单');
175
+insert into sys_menu values('108',  '日志管理', '1',   '9', 'log',        '',                         '', '', 1, 0, 'M', '0', '0', '',                        'log',           'admin', sysdate(), '', null, '日志管理菜单');
176
+insert into sys_menu values('109',  '在线用户', '2',   '1', 'online',     'monitor/online/index',     '', '', 1, 0, 'C', '0', '0', 'monitor:online:list',     'online',        'admin', sysdate(), '', null, '在线用户菜单');
177
+insert into sys_menu values('110',  '定时任务', '2',   '2', 'job',        'monitor/job/index',        '', '', 1, 0, 'C', '0', '0', 'monitor:job:list',        'job',           'admin', sysdate(), '', null, '定时任务菜单');
178
+insert into sys_menu values('111',  '数据监控', '2',   '3', 'druid',      'monitor/druid/index',      '', '', 1, 0, 'C', '0', '0', 'monitor:druid:list',      'druid',         'admin', sysdate(), '', null, '数据监控菜单');
179
+insert into sys_menu values('112',  '服务监控', '2',   '4', 'server',     'monitor/server/index',     '', '', 1, 0, 'C', '0', '0', 'monitor:server:list',     'server',        'admin', sysdate(), '', null, '服务监控菜单');
180
+insert into sys_menu values('113',  '缓存监控', '2',   '5', 'cache',      'monitor/cache/index',      '', '', 1, 0, 'C', '0', '0', 'monitor:cache:list',      'redis',         'admin', sysdate(), '', null, '缓存监控菜单');
181
+insert into sys_menu values('114',  '缓存列表', '2',   '6', 'cacheList',  'monitor/cache/list',       '', '', 1, 0, 'C', '0', '0', 'monitor:cache:list',      'redis-list',    'admin', sysdate(), '', null, '缓存列表菜单');
182
+insert into sys_menu values('115',  '表单构建', '3',   '1', 'build',      'tool/build/index',         '', '', 1, 0, 'C', '0', '0', 'tool:build:list',         'build',         'admin', sysdate(), '', null, '表单构建菜单');
183
+insert into sys_menu values('116',  '代码生成', '3',   '2', 'gen',        'tool/gen/index',           '', '', 1, 0, 'C', '0', '0', 'tool:gen:list',           'code',          'admin', sysdate(), '', null, '代码生成菜单');
184
+insert into sys_menu values('117',  '系统接口', '3',   '3', 'swagger',    'tool/swagger/index',       '', '', 1, 0, 'C', '0', '0', 'tool:swagger:list',       'swagger',       'admin', sysdate(), '', null, '系统接口菜单');
185
+-- 三级菜单
186
+insert into sys_menu values('500',  '操作日志', '108', '1', 'operlog',    'monitor/operlog/index',    '', '', 1, 0, 'C', '0', '0', 'monitor:operlog:list',    'form',          'admin', sysdate(), '', null, '操作日志菜单');
187
+insert into sys_menu values('501',  '登录日志', '108', '2', 'logininfor', 'monitor/logininfor/index', '', '', 1, 0, 'C', '0', '0', 'monitor:logininfor:list', 'logininfor',    'admin', sysdate(), '', null, '登录日志菜单');
188
+-- 用户管理按钮
189
+insert into sys_menu values('1000', '用户查询', '100', '1',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:query',          '#', 'admin', sysdate(), '', null, '');
190
+insert into sys_menu values('1001', '用户新增', '100', '2',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:add',            '#', 'admin', sysdate(), '', null, '');
191
+insert into sys_menu values('1002', '用户修改', '100', '3',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:edit',           '#', 'admin', sysdate(), '', null, '');
192
+insert into sys_menu values('1003', '用户删除', '100', '4',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:remove',         '#', 'admin', sysdate(), '', null, '');
193
+insert into sys_menu values('1004', '用户导出', '100', '5',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:export',         '#', 'admin', sysdate(), '', null, '');
194
+insert into sys_menu values('1005', '用户导入', '100', '6',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:import',         '#', 'admin', sysdate(), '', null, '');
195
+insert into sys_menu values('1006', '重置密码', '100', '7',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:user:resetPwd',       '#', 'admin', sysdate(), '', null, '');
196
+-- 角色管理按钮
197
+insert into sys_menu values('1007', '角色查询', '101', '1',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:query',          '#', 'admin', sysdate(), '', null, '');
198
+insert into sys_menu values('1008', '角色新增', '101', '2',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:add',            '#', 'admin', sysdate(), '', null, '');
199
+insert into sys_menu values('1009', '角色修改', '101', '3',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:edit',           '#', 'admin', sysdate(), '', null, '');
200
+insert into sys_menu values('1010', '角色删除', '101', '4',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:remove',         '#', 'admin', sysdate(), '', null, '');
201
+insert into sys_menu values('1011', '角色导出', '101', '5',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:role:export',         '#', 'admin', sysdate(), '', null, '');
202
+-- 菜单管理按钮
203
+insert into sys_menu values('1012', '菜单查询', '102', '1',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:query',          '#', 'admin', sysdate(), '', null, '');
204
+insert into sys_menu values('1013', '菜单新增', '102', '2',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:add',            '#', 'admin', sysdate(), '', null, '');
205
+insert into sys_menu values('1014', '菜单修改', '102', '3',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:edit',           '#', 'admin', sysdate(), '', null, '');
206
+insert into sys_menu values('1015', '菜单删除', '102', '4',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:remove',         '#', 'admin', sysdate(), '', null, '');
207
+-- 部门管理按钮
208
+insert into sys_menu values('1016', '部门查询', '103', '1',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:query',          '#', 'admin', sysdate(), '', null, '');
209
+insert into sys_menu values('1017', '部门新增', '103', '2',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:add',            '#', 'admin', sysdate(), '', null, '');
210
+insert into sys_menu values('1018', '部门修改', '103', '3',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:edit',           '#', 'admin', sysdate(), '', null, '');
211
+insert into sys_menu values('1019', '部门删除', '103', '4',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:remove',         '#', 'admin', sysdate(), '', null, '');
212
+-- 岗位管理按钮
213
+insert into sys_menu values('1020', '岗位查询', '104', '1',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:query',          '#', 'admin', sysdate(), '', null, '');
214
+insert into sys_menu values('1021', '岗位新增', '104', '2',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:add',            '#', 'admin', sysdate(), '', null, '');
215
+insert into sys_menu values('1022', '岗位修改', '104', '3',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:edit',           '#', 'admin', sysdate(), '', null, '');
216
+insert into sys_menu values('1023', '岗位删除', '104', '4',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:remove',         '#', 'admin', sysdate(), '', null, '');
217
+insert into sys_menu values('1024', '岗位导出', '104', '5',  '', '', '', '', 1, 0, 'F', '0', '0', 'system:post:export',         '#', 'admin', sysdate(), '', null, '');
218
+-- 字典管理按钮
219
+insert into sys_menu values('1025', '字典查询', '105', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:query',          '#', 'admin', sysdate(), '', null, '');
220
+insert into sys_menu values('1026', '字典新增', '105', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:add',            '#', 'admin', sysdate(), '', null, '');
221
+insert into sys_menu values('1027', '字典修改', '105', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:edit',           '#', 'admin', sysdate(), '', null, '');
222
+insert into sys_menu values('1028', '字典删除', '105', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:remove',         '#', 'admin', sysdate(), '', null, '');
223
+insert into sys_menu values('1029', '字典导出', '105', '5', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:dict:export',         '#', 'admin', sysdate(), '', null, '');
224
+-- 参数设置按钮
225
+insert into sys_menu values('1030', '参数查询', '106', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:query',        '#', 'admin', sysdate(), '', null, '');
226
+insert into sys_menu values('1031', '参数新增', '106', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:add',          '#', 'admin', sysdate(), '', null, '');
227
+insert into sys_menu values('1032', '参数修改', '106', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:edit',         '#', 'admin', sysdate(), '', null, '');
228
+insert into sys_menu values('1033', '参数删除', '106', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:remove',       '#', 'admin', sysdate(), '', null, '');
229
+insert into sys_menu values('1034', '参数导出', '106', '5', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:config:export',       '#', 'admin', sysdate(), '', null, '');
230
+-- 通知公告按钮
231
+insert into sys_menu values('1035', '公告查询', '107', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:notice:query',        '#', 'admin', sysdate(), '', null, '');
232
+insert into sys_menu values('1036', '公告新增', '107', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:notice:add',          '#', 'admin', sysdate(), '', null, '');
233
+insert into sys_menu values('1037', '公告修改', '107', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:notice:edit',         '#', 'admin', sysdate(), '', null, '');
234
+insert into sys_menu values('1038', '公告删除', '107', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'system:notice:remove',       '#', 'admin', sysdate(), '', null, '');
235
+-- 操作日志按钮
236
+insert into sys_menu values('1039', '操作查询', '500', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:query',      '#', 'admin', sysdate(), '', null, '');
237
+insert into sys_menu values('1040', '操作删除', '500', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:remove',     '#', 'admin', sysdate(), '', null, '');
238
+insert into sys_menu values('1041', '日志导出', '500', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:operlog:export',     '#', 'admin', sysdate(), '', null, '');
239
+-- 登录日志按钮
240
+insert into sys_menu values('1042', '登录查询', '501', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:query',   '#', 'admin', sysdate(), '', null, '');
241
+insert into sys_menu values('1043', '登录删除', '501', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:remove',  '#', 'admin', sysdate(), '', null, '');
242
+insert into sys_menu values('1044', '日志导出', '501', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:export',  '#', 'admin', sysdate(), '', null, '');
243
+insert into sys_menu values('1045', '账户解锁', '501', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:logininfor:unlock',  '#', 'admin', sysdate(), '', null, '');
244
+-- 在线用户按钮
245
+insert into sys_menu values('1046', '在线查询', '109', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:online:query',       '#', 'admin', sysdate(), '', null, '');
246
+insert into sys_menu values('1047', '批量强退', '109', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:online:batchLogout', '#', 'admin', sysdate(), '', null, '');
247
+insert into sys_menu values('1048', '单条强退', '109', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:online:forceLogout', '#', 'admin', sysdate(), '', null, '');
248
+-- 定时任务按钮
249
+insert into sys_menu values('1049', '任务查询', '110', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:query',          '#', 'admin', sysdate(), '', null, '');
250
+insert into sys_menu values('1050', '任务新增', '110', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:add',            '#', 'admin', sysdate(), '', null, '');
251
+insert into sys_menu values('1051', '任务修改', '110', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:edit',           '#', 'admin', sysdate(), '', null, '');
252
+insert into sys_menu values('1052', '任务删除', '110', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:remove',         '#', 'admin', sysdate(), '', null, '');
253
+insert into sys_menu values('1053', '状态修改', '110', '5', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:changeStatus',   '#', 'admin', sysdate(), '', null, '');
254
+insert into sys_menu values('1054', '任务导出', '110', '6', '#', '', '', '', 1, 0, 'F', '0', '0', 'monitor:job:export',         '#', 'admin', sysdate(), '', null, '');
255
+-- 代码生成按钮
256
+insert into sys_menu values('1055', '生成查询', '116', '1', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:query',             '#', 'admin', sysdate(), '', null, '');
257
+insert into sys_menu values('1056', '生成修改', '116', '2', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:edit',              '#', 'admin', sysdate(), '', null, '');
258
+insert into sys_menu values('1057', '生成删除', '116', '3', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:remove',            '#', 'admin', sysdate(), '', null, '');
259
+insert into sys_menu values('1058', '导入代码', '116', '4', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:import',            '#', 'admin', sysdate(), '', null, '');
260
+insert into sys_menu values('1059', '预览代码', '116', '5', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:preview',           '#', 'admin', sysdate(), '', null, '');
261
+insert into sys_menu values('1060', '生成代码', '116', '6', '#', '', '', '', 1, 0, 'F', '0', '0', 'tool:gen:code',              '#', 'admin', sysdate(), '', null, '');
262
+
263
+
264
+-- ----------------------------
265
+-- 6、用户和角色关联表  用户N-1角色
266
+-- ----------------------------
267
+drop table if exists sys_user_role;
268
+create table sys_user_role (
269
+  user_id   bigint(20) not null comment '用户ID',
270
+  role_id   bigint(20) not null comment '角色ID',
271
+  primary key(user_id, role_id)
272
+) engine=innodb comment = '用户和角色关联表';
273
+
274
+-- ----------------------------
275
+-- 初始化-用户和角色关联表数据
276
+-- ----------------------------
277
+insert into sys_user_role values ('1', '1');
278
+insert into sys_user_role values ('2', '2');
279
+
280
+
281
+-- ----------------------------
282
+-- 7、角色和菜单关联表  角色1-N菜单
283
+-- ----------------------------
284
+drop table if exists sys_role_menu;
285
+create table sys_role_menu (
286
+  role_id   bigint(20) not null comment '角色ID',
287
+  menu_id   bigint(20) not null comment '菜单ID',
288
+  primary key(role_id, menu_id)
289
+) engine=innodb comment = '角色和菜单关联表';
290
+
291
+-- ----------------------------
292
+-- 初始化-角色和菜单关联表数据
293
+-- ----------------------------
294
+insert into sys_role_menu values ('2', '1');
295
+insert into sys_role_menu values ('2', '2');
296
+insert into sys_role_menu values ('2', '3');
297
+insert into sys_role_menu values ('2', '4');
298
+insert into sys_role_menu values ('2', '100');
299
+insert into sys_role_menu values ('2', '101');
300
+insert into sys_role_menu values ('2', '102');
301
+insert into sys_role_menu values ('2', '103');
302
+insert into sys_role_menu values ('2', '104');
303
+insert into sys_role_menu values ('2', '105');
304
+insert into sys_role_menu values ('2', '106');
305
+insert into sys_role_menu values ('2', '107');
306
+insert into sys_role_menu values ('2', '108');
307
+insert into sys_role_menu values ('2', '109');
308
+insert into sys_role_menu values ('2', '110');
309
+insert into sys_role_menu values ('2', '111');
310
+insert into sys_role_menu values ('2', '112');
311
+insert into sys_role_menu values ('2', '113');
312
+insert into sys_role_menu values ('2', '114');
313
+insert into sys_role_menu values ('2', '115');
314
+insert into sys_role_menu values ('2', '116');
315
+insert into sys_role_menu values ('2', '117');
316
+insert into sys_role_menu values ('2', '500');
317
+insert into sys_role_menu values ('2', '501');
318
+insert into sys_role_menu values ('2', '1000');
319
+insert into sys_role_menu values ('2', '1001');
320
+insert into sys_role_menu values ('2', '1002');
321
+insert into sys_role_menu values ('2', '1003');
322
+insert into sys_role_menu values ('2', '1004');
323
+insert into sys_role_menu values ('2', '1005');
324
+insert into sys_role_menu values ('2', '1006');
325
+insert into sys_role_menu values ('2', '1007');
326
+insert into sys_role_menu values ('2', '1008');
327
+insert into sys_role_menu values ('2', '1009');
328
+insert into sys_role_menu values ('2', '1010');
329
+insert into sys_role_menu values ('2', '1011');
330
+insert into sys_role_menu values ('2', '1012');
331
+insert into sys_role_menu values ('2', '1013');
332
+insert into sys_role_menu values ('2', '1014');
333
+insert into sys_role_menu values ('2', '1015');
334
+insert into sys_role_menu values ('2', '1016');
335
+insert into sys_role_menu values ('2', '1017');
336
+insert into sys_role_menu values ('2', '1018');
337
+insert into sys_role_menu values ('2', '1019');
338
+insert into sys_role_menu values ('2', '1020');
339
+insert into sys_role_menu values ('2', '1021');
340
+insert into sys_role_menu values ('2', '1022');
341
+insert into sys_role_menu values ('2', '1023');
342
+insert into sys_role_menu values ('2', '1024');
343
+insert into sys_role_menu values ('2', '1025');
344
+insert into sys_role_menu values ('2', '1026');
345
+insert into sys_role_menu values ('2', '1027');
346
+insert into sys_role_menu values ('2', '1028');
347
+insert into sys_role_menu values ('2', '1029');
348
+insert into sys_role_menu values ('2', '1030');
349
+insert into sys_role_menu values ('2', '1031');
350
+insert into sys_role_menu values ('2', '1032');
351
+insert into sys_role_menu values ('2', '1033');
352
+insert into sys_role_menu values ('2', '1034');
353
+insert into sys_role_menu values ('2', '1035');
354
+insert into sys_role_menu values ('2', '1036');
355
+insert into sys_role_menu values ('2', '1037');
356
+insert into sys_role_menu values ('2', '1038');
357
+insert into sys_role_menu values ('2', '1039');
358
+insert into sys_role_menu values ('2', '1040');
359
+insert into sys_role_menu values ('2', '1041');
360
+insert into sys_role_menu values ('2', '1042');
361
+insert into sys_role_menu values ('2', '1043');
362
+insert into sys_role_menu values ('2', '1044');
363
+insert into sys_role_menu values ('2', '1045');
364
+insert into sys_role_menu values ('2', '1046');
365
+insert into sys_role_menu values ('2', '1047');
366
+insert into sys_role_menu values ('2', '1048');
367
+insert into sys_role_menu values ('2', '1049');
368
+insert into sys_role_menu values ('2', '1050');
369
+insert into sys_role_menu values ('2', '1051');
370
+insert into sys_role_menu values ('2', '1052');
371
+insert into sys_role_menu values ('2', '1053');
372
+insert into sys_role_menu values ('2', '1054');
373
+insert into sys_role_menu values ('2', '1055');
374
+insert into sys_role_menu values ('2', '1056');
375
+insert into sys_role_menu values ('2', '1057');
376
+insert into sys_role_menu values ('2', '1058');
377
+insert into sys_role_menu values ('2', '1059');
378
+insert into sys_role_menu values ('2', '1060');
379
+
380
+-- ----------------------------
381
+-- 8、角色和部门关联表  角色1-N部门
382
+-- ----------------------------
383
+drop table if exists sys_role_dept;
384
+create table sys_role_dept (
385
+  role_id   bigint(20) not null comment '角色ID',
386
+  dept_id   bigint(20) not null comment '部门ID',
387
+  primary key(role_id, dept_id)
388
+) engine=innodb comment = '角色和部门关联表';
389
+
390
+-- ----------------------------
391
+-- 初始化-角色和部门关联表数据
392
+-- ----------------------------
393
+insert into sys_role_dept values ('2', '100');
394
+insert into sys_role_dept values ('2', '101');
395
+insert into sys_role_dept values ('2', '105');
396
+
397
+
398
+-- ----------------------------
399
+-- 9、用户与岗位关联表  用户1-N岗位
400
+-- ----------------------------
401
+drop table if exists sys_user_post;
402
+create table sys_user_post
403
+(
404
+  user_id   bigint(20) not null comment '用户ID',
405
+  post_id   bigint(20) not null comment '岗位ID',
406
+  primary key (user_id, post_id)
407
+) engine=innodb comment = '用户与岗位关联表';
408
+
409
+-- ----------------------------
410
+-- 初始化-用户与岗位关联表数据
411
+-- ----------------------------
412
+insert into sys_user_post values ('1', '1');
413
+insert into sys_user_post values ('2', '2');
414
+
415
+
416
+-- ----------------------------
417
+-- 10、操作日志记录
418
+-- ----------------------------
419
+drop table if exists sys_oper_log;
420
+create table sys_oper_log (
421
+  oper_id           bigint(20)      not null auto_increment    comment '日志主键',
422
+  title             varchar(50)     default ''                 comment '模块标题',
423
+  business_type     int(2)          default 0                  comment '业务类型(0其它 1新增 2修改 3删除)',
424
+  method            varchar(200)    default ''                 comment '方法名称',
425
+  request_method    varchar(10)     default ''                 comment '请求方式',
426
+  operator_type     int(1)          default 0                  comment '操作类别(0其它 1后台用户 2手机端用户)',
427
+  oper_name         varchar(50)     default ''                 comment '操作人员',
428
+  dept_name         varchar(50)     default ''                 comment '部门名称',
429
+  oper_url          varchar(255)    default ''                 comment '请求URL',
430
+  oper_ip           varchar(128)    default ''                 comment '主机地址',
431
+  oper_location     varchar(255)    default ''                 comment '操作地点',
432
+  oper_param        varchar(2000)   default ''                 comment '请求参数',
433
+  json_result       varchar(2000)   default ''                 comment '返回参数',
434
+  status            int(1)          default 0                  comment '操作状态(0正常 1异常)',
435
+  error_msg         varchar(2000)   default ''                 comment '错误消息',
436
+  oper_time         datetime                                   comment '操作时间',
437
+  cost_time         bigint(20)      default 0                  comment '消耗时间',
438
+  primary key (oper_id),
439
+  key idx_sys_oper_log_bt (business_type),
440
+  key idx_sys_oper_log_s  (status),
441
+  key idx_sys_oper_log_ot (oper_time)
442
+) engine=innodb auto_increment=100 comment = '操作日志记录';
443
+
444
+
445
+-- ----------------------------
446
+-- 11、字典类型表
447
+-- ----------------------------
448
+drop table if exists sys_dict_type;
449
+create table sys_dict_type
450
+(
451
+  dict_id          bigint(20)      not null auto_increment    comment '字典主键',
452
+  dict_name        varchar(100)    default ''                 comment '字典名称',
453
+  dict_type        varchar(100)    default ''                 comment '字典类型',
454
+  status           char(1)         default '0'                comment '状态(0正常 1停用)',
455
+  create_by        varchar(64)     default ''                 comment '创建者',
456
+  create_time      datetime                                   comment '创建时间',
457
+  update_by        varchar(64)     default ''                 comment '更新者',
458
+  update_time      datetime                                   comment '更新时间',
459
+  remark           varchar(500)    default null               comment '备注',
460
+  primary key (dict_id),
461
+  unique (dict_type)
462
+) engine=innodb auto_increment=100 comment = '字典类型表';
463
+
464
+insert into sys_dict_type values(1,  '用户性别', 'sys_user_sex',        '0', 'admin', sysdate(), '', null, '用户性别列表');
465
+insert into sys_dict_type values(2,  '菜单状态', 'sys_show_hide',       '0', 'admin', sysdate(), '', null, '菜单状态列表');
466
+insert into sys_dict_type values(3,  '系统开关', 'sys_normal_disable',  '0', 'admin', sysdate(), '', null, '系统开关列表');
467
+insert into sys_dict_type values(4,  '任务状态', 'sys_job_status',      '0', 'admin', sysdate(), '', null, '任务状态列表');
468
+insert into sys_dict_type values(5,  '任务分组', 'sys_job_group',       '0', 'admin', sysdate(), '', null, '任务分组列表');
469
+insert into sys_dict_type values(6,  '系统是否', 'sys_yes_no',          '0', 'admin', sysdate(), '', null, '系统是否列表');
470
+insert into sys_dict_type values(7,  '通知类型', 'sys_notice_type',     '0', 'admin', sysdate(), '', null, '通知类型列表');
471
+insert into sys_dict_type values(8,  '通知状态', 'sys_notice_status',   '0', 'admin', sysdate(), '', null, '通知状态列表');
472
+insert into sys_dict_type values(9,  '操作类型', 'sys_oper_type',       '0', 'admin', sysdate(), '', null, '操作类型列表');
473
+insert into sys_dict_type values(10, '系统状态', 'sys_common_status',   '0', 'admin', sysdate(), '', null, '登录状态列表');
474
+
475
+
476
+-- ----------------------------
477
+-- 12、字典数据表
478
+-- ----------------------------
479
+drop table if exists sys_dict_data;
480
+create table sys_dict_data
481
+(
482
+  dict_code        bigint(20)      not null auto_increment    comment '字典编码',
483
+  dict_sort        int(4)          default 0                  comment '字典排序',
484
+  dict_label       varchar(100)    default ''                 comment '字典标签',
485
+  dict_value       varchar(100)    default ''                 comment '字典键值',
486
+  dict_type        varchar(100)    default ''                 comment '字典类型',
487
+  css_class        varchar(100)    default null               comment '样式属性(其他样式扩展)',
488
+  list_class       varchar(100)    default null               comment '表格回显样式',
489
+  is_default       char(1)         default 'N'                comment '是否默认(Y是 N否)',
490
+  status           char(1)         default '0'                comment '状态(0正常 1停用)',
491
+  create_by        varchar(64)     default ''                 comment '创建者',
492
+  create_time      datetime                                   comment '创建时间',
493
+  update_by        varchar(64)     default ''                 comment '更新者',
494
+  update_time      datetime                                   comment '更新时间',
495
+  remark           varchar(500)    default null               comment '备注',
496
+  primary key (dict_code)
497
+) engine=innodb auto_increment=100 comment = '字典数据表';
498
+
499
+insert into sys_dict_data values(1,  1,  '男',       '0',       'sys_user_sex',        '',   '',        'Y', '0', 'admin', sysdate(), '', null, '性别男');
500
+insert into sys_dict_data values(2,  2,  '女',       '1',       'sys_user_sex',        '',   '',        'N', '0', 'admin', sysdate(), '', null, '性别女');
501
+insert into sys_dict_data values(3,  3,  '未知',     '2',       'sys_user_sex',        '',   '',        'N', '0', 'admin', sysdate(), '', null, '性别未知');
502
+insert into sys_dict_data values(4,  1,  '显示',     '0',       'sys_show_hide',       '',   'primary', 'Y', '0', 'admin', sysdate(), '', null, '显示菜单');
503
+insert into sys_dict_data values(5,  2,  '隐藏',     '1',       'sys_show_hide',       '',   'danger',  'N', '0', 'admin', sysdate(), '', null, '隐藏菜单');
504
+insert into sys_dict_data values(6,  1,  '正常',     '0',       'sys_normal_disable',  '',   'primary', 'Y', '0', 'admin', sysdate(), '', null, '正常状态');
505
+insert into sys_dict_data values(7,  2,  '停用',     '1',       'sys_normal_disable',  '',   'danger',  'N', '0', 'admin', sysdate(), '', null, '停用状态');
506
+insert into sys_dict_data values(8,  1,  '正常',     '0',       'sys_job_status',      '',   'primary', 'Y', '0', 'admin', sysdate(), '', null, '正常状态');
507
+insert into sys_dict_data values(9,  2,  '暂停',     '1',       'sys_job_status',      '',   'danger',  'N', '0', 'admin', sysdate(), '', null, '停用状态');
508
+insert into sys_dict_data values(10, 1,  '默认',     'DEFAULT', 'sys_job_group',       '',   '',        'Y', '0', 'admin', sysdate(), '', null, '默认分组');
509
+insert into sys_dict_data values(11, 2,  '系统',     'SYSTEM',  'sys_job_group',       '',   '',        'N', '0', 'admin', sysdate(), '', null, '系统分组');
510
+insert into sys_dict_data values(12, 1,  '是',       'Y',       'sys_yes_no',          '',   'primary', 'Y', '0', 'admin', sysdate(), '', null, '系统默认是');
511
+insert into sys_dict_data values(13, 2,  '否',       'N',       'sys_yes_no',          '',   'danger',  'N', '0', 'admin', sysdate(), '', null, '系统默认否');
512
+insert into sys_dict_data values(14, 1,  '通知',     '1',       'sys_notice_type',     '',   'warning', 'Y', '0', 'admin', sysdate(), '', null, '通知');
513
+insert into sys_dict_data values(15, 2,  '公告',     '2',       'sys_notice_type',     '',   'success', 'N', '0', 'admin', sysdate(), '', null, '公告');
514
+insert into sys_dict_data values(16, 1,  '正常',     '0',       'sys_notice_status',   '',   'primary', 'Y', '0', 'admin', sysdate(), '', null, '正常状态');
515
+insert into sys_dict_data values(17, 2,  '关闭',     '1',       'sys_notice_status',   '',   'danger',  'N', '0', 'admin', sysdate(), '', null, '关闭状态');
516
+insert into sys_dict_data values(18, 99, '其他',     '0',       'sys_oper_type',       '',   'info',    'N', '0', 'admin', sysdate(), '', null, '其他操作');
517
+insert into sys_dict_data values(19, 1,  '新增',     '1',       'sys_oper_type',       '',   'info',    'N', '0', 'admin', sysdate(), '', null, '新增操作');
518
+insert into sys_dict_data values(20, 2,  '修改',     '2',       'sys_oper_type',       '',   'info',    'N', '0', 'admin', sysdate(), '', null, '修改操作');
519
+insert into sys_dict_data values(21, 3,  '删除',     '3',       'sys_oper_type',       '',   'danger',  'N', '0', 'admin', sysdate(), '', null, '删除操作');
520
+insert into sys_dict_data values(22, 4,  '授权',     '4',       'sys_oper_type',       '',   'primary', 'N', '0', 'admin', sysdate(), '', null, '授权操作');
521
+insert into sys_dict_data values(23, 5,  '导出',     '5',       'sys_oper_type',       '',   'warning', 'N', '0', 'admin', sysdate(), '', null, '导出操作');
522
+insert into sys_dict_data values(24, 6,  '导入',     '6',       'sys_oper_type',       '',   'warning', 'N', '0', 'admin', sysdate(), '', null, '导入操作');
523
+insert into sys_dict_data values(25, 7,  '强退',     '7',       'sys_oper_type',       '',   'danger',  'N', '0', 'admin', sysdate(), '', null, '强退操作');
524
+insert into sys_dict_data values(26, 8,  '生成代码', '8',       'sys_oper_type',       '',   'warning', 'N', '0', 'admin', sysdate(), '', null, '生成操作');
525
+insert into sys_dict_data values(27, 9,  '清空数据', '9',       'sys_oper_type',       '',   'danger',  'N', '0', 'admin', sysdate(), '', null, '清空操作');
526
+insert into sys_dict_data values(28, 1,  '成功',     '0',       'sys_common_status',   '',   'primary', 'N', '0', 'admin', sysdate(), '', null, '正常状态');
527
+insert into sys_dict_data values(29, 2,  '失败',     '1',       'sys_common_status',   '',   'danger',  'N', '0', 'admin', sysdate(), '', null, '停用状态');
528
+
529
+
530
+-- ----------------------------
531
+-- 13、参数配置表
532
+-- ----------------------------
533
+drop table if exists sys_config;
534
+create table sys_config (
535
+  config_id         int(5)          not null auto_increment    comment '参数主键',
536
+  config_name       varchar(100)    default ''                 comment '参数名称',
537
+  config_key        varchar(100)    default ''                 comment '参数键名',
538
+  config_value      varchar(500)    default ''                 comment '参数键值',
539
+  config_type       char(1)         default 'N'                comment '系统内置(Y是 N否)',
540
+  create_by         varchar(64)     default ''                 comment '创建者',
541
+  create_time       datetime                                   comment '创建时间',
542
+  update_by         varchar(64)     default ''                 comment '更新者',
543
+  update_time       datetime                                   comment '更新时间',
544
+  remark            varchar(500)    default null               comment '备注',
545
+  primary key (config_id)
546
+) engine=innodb auto_increment=100 comment = '参数配置表';
547
+
548
+insert into sys_config values(1, '主框架页-默认皮肤样式名称',     'sys.index.skinName',               'skin-blue',     'Y', 'admin', sysdate(), '', null, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow' );
549
+insert into sys_config values(2, '用户管理-账号初始密码',         'sys.user.initPassword',            '123456',        'Y', 'admin', sysdate(), '', null, '初始化密码 123456' );
550
+insert into sys_config values(3, '主框架页-侧边栏主题',           'sys.index.sideTheme',              'theme-dark',    'Y', 'admin', sysdate(), '', null, '深色主题theme-dark,浅色主题theme-light' );
551
+insert into sys_config values(4, '账号自助-验证码开关',           'sys.account.captchaEnabled',       'true',          'Y', 'admin', sysdate(), '', null, '是否开启验证码功能(true开启,false关闭)');
552
+insert into sys_config values(5, '账号自助-是否开启用户注册功能', 'sys.account.registerUser',         'false',         'Y', 'admin', sysdate(), '', null, '是否开启注册用户功能(true开启,false关闭)');
553
+insert into sys_config values(6, '用户登录-黑名单列表',           'sys.login.blackIPList',            '',              'Y', 'admin', sysdate(), '', null, '设置登录IP黑名单限制,多个匹配项以;分隔,支持匹配(*通配、网段)');
554
+insert into sys_config values(7, '用户管理-初始密码修改策略',     'sys.account.initPasswordModify',   '1',             'Y', 'admin', sysdate(), '', null, '0:初始密码修改策略关闭,没有任何提示,1:提醒用户,如果未修改初始密码,则在登录时就会提醒修改密码对话框');
555
+insert into sys_config values(8, '用户管理-账号密码更新周期',     'sys.account.passwordValidateDays', '0',             'Y', 'admin', sysdate(), '', null, '密码更新周期(填写数字,数据初始化值为0不限制,若修改必须为大于0小于365的正整数),如果超过这个周期登录系统时,则在登录时就会提醒修改密码对话框');
556
+
557
+
558
+-- ----------------------------
559
+-- 14、系统访问记录
560
+-- ----------------------------
561
+drop table if exists sys_logininfor;
562
+create table sys_logininfor (
563
+  info_id        bigint(20)     not null auto_increment   comment '访问ID',
564
+  user_name      varchar(50)    default ''                comment '用户账号',
565
+  ipaddr         varchar(128)   default ''                comment '登录IP地址',
566
+  login_location varchar(255)   default ''                comment '登录地点',
567
+  browser        varchar(50)    default ''                comment '浏览器类型',
568
+  os             varchar(50)    default ''                comment '操作系统',
569
+  status         char(1)        default '0'               comment '登录状态(0成功 1失败)',
570
+  msg            varchar(255)   default ''                comment '提示消息',
571
+  login_time     datetime                                 comment '访问时间',
572
+  primary key (info_id),
573
+  key idx_sys_logininfor_s  (status),
574
+  key idx_sys_logininfor_lt (login_time)
575
+) engine=innodb auto_increment=100 comment = '系统访问记录';
576
+
577
+
578
+-- ----------------------------
579
+-- 15、定时任务调度表
580
+-- ----------------------------
581
+drop table if exists sys_job;
582
+create table sys_job (
583
+  job_id              bigint(20)    not null auto_increment    comment '任务ID',
584
+  job_name            varchar(64)   default ''                 comment '任务名称',
585
+  job_group           varchar(64)   default 'DEFAULT'          comment '任务组名',
586
+  invoke_target       varchar(500)  not null                   comment '调用目标字符串',
587
+  cron_expression     varchar(255)  default ''                 comment 'cron执行表达式',
588
+  misfire_policy      varchar(20)   default '3'                comment '计划执行错误策略(1立即执行 2执行一次 3放弃执行)',
589
+  concurrent          char(1)       default '1'                comment '是否并发执行(0允许 1禁止)',
590
+  status              char(1)       default '0'                comment '状态(0正常 1暂停)',
591
+  create_by           varchar(64)   default ''                 comment '创建者',
592
+  create_time         datetime                                 comment '创建时间',
593
+  update_by           varchar(64)   default ''                 comment '更新者',
594
+  update_time         datetime                                 comment '更新时间',
595
+  remark              varchar(500)  default ''                 comment '备注信息',
596
+  primary key (job_id, job_name, job_group)
597
+) engine=innodb auto_increment=100 comment = '定时任务调度表';
598
+
599
+insert into sys_job values(1, '系统默认(无参)', 'DEFAULT', 'ryTask.ryNoParams',        '0/10 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, '');
600
+insert into sys_job values(2, '系统默认(有参)', 'DEFAULT', 'ryTask.ryParams(\'ry\')',  '0/15 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, '');
601
+insert into sys_job values(3, '系统默认(多参)', 'DEFAULT', 'ryTask.ryMultipleParams(\'ry\', true, 2000L, 316.50D, 100)',  '0/20 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, '');
602
+
603
+
604
+-- ----------------------------
605
+-- 16、定时任务调度日志表
606
+-- ----------------------------
607
+drop table if exists sys_job_log;
608
+create table sys_job_log (
609
+  job_log_id          bigint(20)     not null auto_increment    comment '任务日志ID',
610
+  job_name            varchar(64)    not null                   comment '任务名称',
611
+  job_group           varchar(64)    not null                   comment '任务组名',
612
+  invoke_target       varchar(500)   not null                   comment '调用目标字符串',
613
+  job_message         varchar(500)                              comment '日志信息',
614
+  status              char(1)        default '0'                comment '执行状态(0正常 1失败)',
615
+  exception_info      varchar(2000)  default ''                 comment '异常信息',
616
+  create_time         datetime                                  comment '创建时间',
617
+  primary key (job_log_id)
618
+) engine=innodb comment = '定时任务调度日志表';
619
+
620
+
621
+-- ----------------------------
622
+-- 17、通知公告表
623
+-- ----------------------------
624
+drop table if exists sys_notice;
625
+create table sys_notice (
626
+  notice_id         int(4)          not null auto_increment    comment '公告ID',
627
+  notice_title      varchar(50)     not null                   comment '公告标题',
628
+  notice_type       char(1)         not null                   comment '公告类型(1通知 2公告)',
629
+  notice_content    longblob        default null               comment '公告内容',
630
+  status            char(1)         default '0'                comment '公告状态(0正常 1关闭)',
631
+  create_by         varchar(64)     default ''                 comment '创建者',
632
+  create_time       datetime                                   comment '创建时间',
633
+  update_by         varchar(64)     default ''                 comment '更新者',
634
+  update_time       datetime                                   comment '更新时间',
635
+  remark            varchar(255)    default null               comment '备注',
636
+  primary key (notice_id)
637
+) engine=innodb auto_increment=10 comment = '通知公告表';
638
+
639
+-- ----------------------------
640
+-- 初始化-公告信息表数据
641
+-- ----------------------------
642
+insert into sys_notice values('1', '温馨提醒:2018-07-01 若依新版本发布啦', '2', '新版本内容', '0', 'admin', sysdate(), '', null, '管理员');
643
+insert into sys_notice values('2', '维护通知:2018-07-01 若依系统凌晨维护', '1', '维护内容',   '0', 'admin', sysdate(), '', null, '管理员');
644
+
645
+
646
+-- ----------------------------
647
+-- 18、代码生成业务表
648
+-- ----------------------------
649
+drop table if exists gen_table;
650
+create table gen_table (
651
+  table_id          bigint(20)      not null auto_increment    comment '编号',
652
+  table_name        varchar(200)    default ''                 comment '表名称',
653
+  table_comment     varchar(500)    default ''                 comment '表描述',
654
+  sub_table_name    varchar(64)     default null               comment '关联子表的表名',
655
+  sub_table_fk_name varchar(64)     default null               comment '子表关联的外键名',
656
+  class_name        varchar(100)    default ''                 comment '实体类名称',
657
+  tpl_category      varchar(200)    default 'crud'             comment '使用的模板(crud单表操作 tree树表操作)',
658
+  tpl_web_type      varchar(30)     default ''                 comment '前端模板类型(element-ui模版 element-plus模版)',
659
+  package_name      varchar(100)                               comment '生成包路径',
660
+  module_name       varchar(30)                                comment '生成模块名',
661
+  business_name     varchar(30)                                comment '生成业务名',
662
+  function_name     varchar(50)                                comment '生成功能名',
663
+  function_author   varchar(50)                                comment '生成功能作者',
664
+  gen_type          char(1)         default '0'                comment '生成代码方式(0zip压缩包 1自定义路径)',
665
+  gen_path          varchar(200)    default '/'                comment '生成路径(不填默认项目路径)',
666
+  options           varchar(1000)                              comment '其它生成选项',
667
+  create_by         varchar(64)     default ''                 comment '创建者',
668
+  create_time 	    datetime                                   comment '创建时间',
669
+  update_by         varchar(64)     default ''                 comment '更新者',
670
+  update_time       datetime                                   comment '更新时间',
671
+  remark            varchar(500)    default null               comment '备注',
672
+  primary key (table_id)
673
+) engine=innodb auto_increment=1 comment = '代码生成业务表';
674
+
675
+
676
+-- ----------------------------
677
+-- 19、代码生成业务表字段
678
+-- ----------------------------
679
+drop table if exists gen_table_column;
680
+create table gen_table_column (
681
+  column_id         bigint(20)      not null auto_increment    comment '编号',
682
+  table_id          bigint(20)                                 comment '归属表编号',
683
+  column_name       varchar(200)                               comment '列名称',
684
+  column_comment    varchar(500)                               comment '列描述',
685
+  column_type       varchar(100)                               comment '列类型',
686
+  java_type         varchar(500)                               comment 'JAVA类型',
687
+  java_field        varchar(200)                               comment 'JAVA字段名',
688
+  is_pk             char(1)                                    comment '是否主键(1是)',
689
+  is_increment      char(1)                                    comment '是否自增(1是)',
690
+  is_required       char(1)                                    comment '是否必填(1是)',
691
+  is_insert         char(1)                                    comment '是否为插入字段(1是)',
692
+  is_edit           char(1)                                    comment '是否编辑字段(1是)',
693
+  is_list           char(1)                                    comment '是否列表字段(1是)',
694
+  is_query          char(1)                                    comment '是否查询字段(1是)',
695
+  query_type        varchar(200)    default 'EQ'               comment '查询方式(等于、不等于、大于、小于、范围)',
696
+  html_type         varchar(200)                               comment '显示类型(文本框、文本域、下拉框、复选框、单选框、日期控件)',
697
+  dict_type         varchar(200)    default ''                 comment '字典类型',
698
+  sort              int                                        comment '排序',
699
+  create_by         varchar(64)     default ''                 comment '创建者',
700
+  create_time 	    datetime                                   comment '创建时间',
701
+  update_by         varchar(64)     default ''                 comment '更新者',
702
+  update_time       datetime                                   comment '更新时间',
703
+  primary key (column_id)
704
+) engine=innodb auto_increment=1 comment = '代码生成业务表字段';

Loading…
Cancel
Save