|
@@ -3,6 +3,7 @@ package com.fdkankan.generate;
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
import com.baomidou.mybatisplus.generator.FastAutoGenerator;
|
|
|
import com.baomidou.mybatisplus.generator.config.OutputFile;
|
|
|
+import com.baomidou.mybatisplus.generator.config.rules.DateType;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Collections;
|
|
@@ -14,8 +15,14 @@ public class AutoGenerate {
|
|
|
public static void main(String[] args) {
|
|
|
String path ="H:\\project\\4dkankan-parent\\4dkankan-center-platform";
|
|
|
List<String> tables = new ArrayList<>();
|
|
|
+ String moduleName ="agent";
|
|
|
tables.add("t_agent");
|
|
|
- String moduleName ="test";
|
|
|
+ tables.add("t_agent_audit");
|
|
|
+ tables.add("t_agent_framework");
|
|
|
+ tables.add("t_camera_space");
|
|
|
+ tables.add("t_camera_version");
|
|
|
+ tables.add("t_cart");
|
|
|
+ tables.add("t_commerce_order");
|
|
|
FastAutoGenerator.create("jdbc:mysql://localhost:3306/4dkankan_center_application",
|
|
|
"root","123456")
|
|
|
.globalConfig(builder -> {
|
|
@@ -23,6 +30,7 @@ public class AutoGenerate {
|
|
|
.outputDir(path+"\\src\\main\\java") //输出路径(写到java目录)
|
|
|
//.enableSwagger() //开启swagger
|
|
|
.commentDate("yyyy-MM-dd")
|
|
|
+ .dateType(DateType.ONLY_DATE)
|
|
|
.fileOverride(); //开启覆盖之前生成的文件
|
|
|
|
|
|
})
|
|
@@ -52,7 +60,7 @@ public class AutoGenerate {
|
|
|
.enableRestStyle()
|
|
|
.mapperBuilder()
|
|
|
.superClass(BaseMapper.class)
|
|
|
- .formatMapperFileName("%sMapper")
|
|
|
+ .formatMapperFileName("I%sMapper")
|
|
|
.enableMapperAnnotation()
|
|
|
.formatXmlFileName("%sMapper");
|
|
|
})
|