修复代码生成关联表前缀问题
This commit is contained in:
parent
97202201a2
commit
62a3606169
|
|
@ -264,7 +264,7 @@ public class GenerateServiceImpl implements IGenerateService {
|
|||
model.setGenType(genParam.getGenType());
|
||||
model.setGenPath(genParam.getGenPath());
|
||||
model.setSubTableFk(genParam.getSubTableFk());
|
||||
model.setSubTableName(genParam.getSubTableName().replace(GlobalConfig.tablePrefix, ""));
|
||||
model.setSubTableName(genParam.getSubTableName());
|
||||
genTableMapper.updateById(model);
|
||||
|
||||
for (Map<String, String> item : genParam.getColumn()) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.mdd.generator.util;
|
||||
|
||||
import com.mdd.common.config.GlobalConfig;
|
||||
import com.mdd.common.util.StringUtils;
|
||||
import com.mdd.generator.config.GenConfig;
|
||||
import com.mdd.generator.constant.GenConstants;
|
||||
|
|
@ -67,6 +68,9 @@ public class VelocityUtil {
|
|||
}
|
||||
}
|
||||
|
||||
// 替换前缀
|
||||
table.setSubTableName(table.getSubTableName().replace(GlobalConfig.tablePrefix, ""));
|
||||
|
||||
// 设置模板变量
|
||||
VelocityContext velocityContext = new VelocityContext();
|
||||
velocityContext.put("genTpl", table.getGenTpl());
|
||||
|
|
|
|||
Loading…
Reference in New Issue