maven
10 小时以前 55c4143362c7df1ece4523597e26947d35e21bda
src/main/java/com/ruoyi/CodeGenerator.java
@@ -19,11 +19,11 @@
// 演示例子,执行 main 方法控制台输入模块表名回车自动生成对应项目目录中
public class CodeGenerator {
    public static String database_url = "jdbc:mysql://127.0.0.1:3306/product-inventory-management";
    public static String database_url = "jdbc:mysql://127.0.0.1:3306/product-inventory-management-new";
    public static String database_username = "root";
    public static String database_password= "123456";
    public static String author = "芯导软件(江苏)有限公司";
    public static String model = "collaborativeApproval"; // 模块
    public static String model = "account"; // 模块
    public static String setParent = "com.ruoyi."+ model; // 包路径
    public static String tablePrefix = ""; // 设置过滤表前缀
    public static void main(String[] args) {
@@ -63,7 +63,7 @@
                .packageConfig(builder -> {
                    builder.entity("pojo");
                    builder.parent(setParent) // 设置父包名
                            .pathInfo(Collections.singletonMap(OutputFile.xml, projectPath  +  "/src/main/resources/"+model+"/mapper")); // 设置mapperXml生成路径
                            .pathInfo(Collections.singletonMap(OutputFile.xml, projectPath  +  "/src/main/resources/mapper/"+model)); // 设置mapperXml生成路径
                })
                // 策略配置
                .strategyConfig(builder -> {
@@ -89,6 +89,8 @@
                            .mapperBuilder()
                            .enableFileOverride() // 覆盖已生成Mapper文件
                            .enableBaseResultMap() // 自动生成resultMap
                            .mapperAnnotation(org.apache.ibatis.annotations.Mapper.class)
                            // Service 策略配置
                            .serviceBuilder()
                            .formatServiceFileName("%sService") //格式化 service 接口文件名称,%s进行匹配表名,如 UserService