chenhj
2 天以前 9dcd90dc8e329900e6058ac0a3aa44a9e7e04599
ruoyi-admin/src/main/java/com/ruoyi/PlusCodeGenerator.java
@@ -28,18 +28,18 @@
public class PlusCodeGenerator {
    // 数据库配置
    private static final String DB_URL = "jdbc:postgresql://localhost:5432/ruoyi-zd";
    private static final String DB_URL = "jdbc:postgresql://192.168.1.35:5432/ruoyi-zd";
    private static final String DB_USERNAME = "postgres";
    private static final String DB_PASSWORD = "123456";
    // 项目基础配置
    private static final String BASE_PACKAGE = "com.ruoyi";
    private static final String MODULE_NAME = "basic"; // 模块名
    private static final String MODULE_NAME = "business"; // 模块名
    public static void main(String[] args) {
        String projectPath = System.getProperty("user.dir"); // 获取项目根路径
        String path = "basic-server"; // 模块名称
        String table = "coal_info"; // 表名,多个表逗号隔开
        String path = "main-business"; // 模块名称
        String table = "input_inventory_record,output_inventory_record,inventory_summary"; // 表名,多个表逗号隔开
        // 代码输出路径配置
        String outputBasePath = Paths.get(projectPath, path, "src", "main", "java").toString();
@@ -48,7 +48,7 @@
        // 代码生成核心配置
        FastAutoGenerator.create(DB_URL, DB_USERNAME, DB_PASSWORD)
                .globalConfig(builder -> {
                    builder.author("ld") // 作者信息
                    builder.author("chenhj") // 作者信息
                            .outputDir(outputBasePath) // 代码输出目录
                            .dateType(DateType.ONLY_DATE) // 日期类型
                            .commentDate("yyyy-MM-dd") // 注释日期格式
@@ -128,7 +128,7 @@
                    )); // 基类字段
                    customMap.put("idType", "AUTO"); // 主键类型
                    customMap.put("superEntityClass", "com.ruoyi.common.core.domain.MyBaseEntity"); // 基类全路径
                    customMap.put("author", "ruoyi"); // 作者信息
                    customMap.put("author", "chenhj"); // 作者信息
                    customMap.put("packageName", BASE_PACKAGE + "." + MODULE_NAME); // 包名
                    customMap.put("tableName", table); // 表名