Commit 6ebb92ac authored by liuyang's avatar liuyang

修改代码生成bug

parent 5183c400
......@@ -27,4 +27,7 @@ public class BizConstants {
public static final String CONFIG_KEY_DISCOUNT_6MON = "discount_6mon";
public static final String CONFIG_KEY_DISCOUNT_12MON = "discount_12mon";
public static final String CONFIG_KEY_ENTERPRICE_VIP_PRICE = "enterprice_vip_price";
public static final String SMS_TEMPLATE_CODE = "T_LG_CAPTCHA";
public static final String MOBILE_CAPTCHA_PREFIX = "CAPTCHA_";
}
......@@ -88,17 +88,17 @@ public class CodeGenerator {
public String outputFile(TableInfo tableInfo) {
// 自定义输出文件名 , 如果你 Entity 设置了前后缀、此处注意 xml 的名称会跟着发生变化!!
return projectPath + "/src/main/resources/mappers/" + pc.getModuleName()
+ "/" + tableInfo.getEntityName() + "Mapper" + StringPool.DOT_XML;
}
});
focList.add(new FileOutConfig(serviceTemplatePath) {
@Override
public String outputFile(TableInfo tableInfo) {
// 自定义输出文件名 , 如果你 Entity 设置了前后缀、此处注意 xml 的名称会跟着发生变化!!
return projectPath + "src/main/java/" + pc.getModuleName()
+ "/service/" + tableInfo.getEntityName() + "Service" + StringPool.DOT_JAVA;
+ "/" + tableInfo.getName() + "Mapper" + StringPool.DOT_XML;
}
});
// focList.add(new FileOutConfig(serviceTemplatePath) {
// @Override
// public String outputFile(TableInfo tableInfo) {
// // 自定义输出文件名 , 如果你 Entity 设置了前后缀、此处注意 xml 的名称会跟着发生变化!!
// return projectPath + "/src/main/java/" + pc.getModuleName()
// + "/service/" + tableInfo.getName() + "Service" + StringPool.DOT_JAVA;
// }
// });
/*
cfg.setFileCreate(new IFileCreate() {
@Override
......@@ -144,7 +144,7 @@ public class CodeGenerator {
strategy.setSuperEntityColumns("id","create_time","update_time");
strategy.setInclude(scanner("表名,多个英文逗号分割").split(","));
strategy.setControllerMappingHyphenStyle(true);
strategy.setSuperServiceImplClass("com.qkdata.common.base.service.impl.BaseServiceImpl");
strategy.setSuperServiceClass("com.qkdata.common.base.service.impl.BaseServiceImpl");
// strategy.setTablePrefix(pc.getModuleName() + "_");
mpg.setStrategy(strategy);
mpg.setTemplateEngine(new FreemarkerTemplateEngine());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment