fix: update code gen
This commit is contained in:
@@ -19,13 +19,13 @@ import java.util.Collections;
|
||||
public class GenPlusUtils {
|
||||
|
||||
// 生成代码输出路径
|
||||
public static final String OUTPUT_PATH = "D://gencode/test4";
|
||||
public static final String OUTPUT_PATH = "D://gencode";
|
||||
// 模块名:system/user
|
||||
public static final String MODULE_NAME = "system";
|
||||
// 数据库URL
|
||||
public static final String URL = "jdbc:mysql://localhost:3306/wfc_system_db?useUnicode=true&useSSL=false&characterEncoding=utf8";
|
||||
public static final String URL = "jdbc:mysql://localhost:3306/wfc_user_db?useUnicode=true&useSSL=false&characterEncoding=utf8";
|
||||
// 表名
|
||||
public static final String TABLE_NAME = "sys_rate_limit";
|
||||
public static final String TABLE_NAME = "u_package";
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
@@ -34,7 +34,7 @@ public class GenPlusUtils {
|
||||
builder.author("sys") // 设置作者
|
||||
.enableSpringdoc()
|
||||
.dateType(DateType.ONLY_DATE)
|
||||
.outputDir("D://gencode"); // 指定输出目录
|
||||
.outputDir(OUTPUT_PATH); // 指定输出目录
|
||||
})
|
||||
.dataSourceConfig(builder ->
|
||||
builder.typeConvertHandler((globalConfig, typeRegistry, metaInfo) -> {
|
||||
@@ -54,10 +54,10 @@ public class GenPlusUtils {
|
||||
builder.parent("org.wfc") // 设置父包名
|
||||
.moduleName(MODULE_NAME) // 设置父包模块名
|
||||
.entity("domain")
|
||||
.pathInfo(Collections.singletonMap(OutputFile.xml, "D://gencode")) // 设置mapperXml生成路径
|
||||
.pathInfo(Collections.singletonMap(OutputFile.xml, OUTPUT_PATH)) // 设置mapperXml生成路径
|
||||
)
|
||||
.strategyConfig(builder ->
|
||||
builder.addInclude("u_cdr_detail") // 设置需要生成的表名
|
||||
builder.addInclude(TABLE_NAME) // 设置需要生成的表名
|
||||
.addTablePrefix("t_", "c_") // 设置过滤表前缀
|
||||
.controllerBuilder()
|
||||
.enableRestStyle()
|
||||
|
||||
@@ -15,8 +15,8 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
import org.wfc.common.core.web.controller.BaseController;
|
||||
import org.wfc.common.core.web.domain.AjaxResult;
|
||||
import org.wfc.common.core.web.page.TableDataInfo;
|
||||
import org.wfc.system.domain.SysRateLimit;
|
||||
import org.wfc.system.service.ISysRateLimitService;
|
||||
import ${package.Entity}.${entity};
|
||||
import ${package.Service}.${table.serviceName};
|
||||
|
||||
import java.util.List;
|
||||
#if(${superControllerClassPackage})
|
||||
|
||||
Reference in New Issue
Block a user