yupeng
2025-02-08 7a7bf42d925f05758683ac053eb2a0f6f0c54834
generator/src/test/java/com/xizang/CodeGeneratorTests.java
@@ -5,11 +5,13 @@
import com.baomidou.mybatisplus.generator.InjectionConfig;
import com.baomidou.mybatisplus.generator.config.*;
import com.baomidou.mybatisplus.generator.config.po.LikeTable;
import com.baomidou.mybatisplus.generator.config.po.TableFill;
import com.baomidou.mybatisplus.generator.config.po.TableInfo;
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
import org.junit.Test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
@@ -35,7 +37,7 @@
        // 全局配置
        GlobalConfig gc = new GlobalConfig();
        String projectPath = "F:\\workSpace\\xizang\\generator";
        String projectPath = "D:\\workspaces\\Project\\company\\changyun\\xizang\\xizang\\generator";
        gc.setOutputDir(projectPath + "/src/main/java")
                .setAuthor("xiaochen")
                .setMapperName("%sMapper")
@@ -144,7 +146,7 @@
//         strategy.setTablePrefix(pc.getModuleName() + "");
//        strategy.setLikeTable(new LikeTable("room"));
        //strategy.setLikeTable(new LikeTable("member"));
        strategy.setLikeTable(new LikeTable("t_"));// 生成表名
        strategy.setLikeTable(new LikeTable("order"));// 生成表名
//        strategy.setLikeTable(new LikeTable("t_hotel"));// 生成表名
//        strategy.setLikeTable(new LikeTable("t_scan_message"));// 生成表名
//        strategy.setNotLikeTable(new LikeTable("hotel_info"));// 不生成表名