|
@@ -1,6 +1,7 @@
|
1
|
1
|
package com.example.demo.controller;
|
2
|
2
|
|
3
|
3
|
import com.alibaba.fastjson.JSONObject;
|
|
4
|
+import com.baomidou.mybatisplus.annotation.IdType;
|
4
|
5
|
import com.baomidou.mybatisplus.core.toolkit.StringPool;
|
5
|
6
|
import com.baomidou.mybatisplus.generator.AutoGenerator;
|
6
|
7
|
import com.baomidou.mybatisplus.generator.InjectionConfig;
|
|
@@ -106,6 +107,7 @@ public class DbController {
|
106
|
107
|
GlobalConfig gc = new GlobalConfig();
|
107
|
108
|
gc.setOutputDir(newFileName);
|
108
|
109
|
gc.setAuthor(StringUtils.isEmpty(dbConfig.getAuthor()) ? "cj" : dbConfig.getAuthor());
|
|
110
|
+ gc.setIdType(IdType.INPUT); // 非自增长主键
|
109
|
111
|
gc.setOpen(false);
|
110
|
112
|
|
111
|
113
|
// 是否开启 swagger
|