fix(other): 修复代码生成字典相关问题

This commit is contained in:
xlsea
2025-06-17 11:42:08 +08:00
parent d1377baaed
commit 9aa6597d5e
3 changed files with 10 additions and 26 deletions

View File

@ -73,8 +73,9 @@ public class VelocityUtils {
velocityContext.put("permissionPrefix", getPermissionPrefix(moduleName, businessName));
velocityContext.put("dicts", getDicts(genTable));
velocityContext.put("dictList", getDictList(genTable));
velocityContext.put("columns", getColumns(genTable));
velocityContext.put("columns", genTable.getColumns());
velocityContext.put("table", genTable);
velocityContext.put("StrUtil", new StrUtil());
setMenuVelocityContext(velocityContext, genTable);
if (GenConstants.TPL_TREE.equals(tplCategory)) {
setTreeVelocityContext(velocityContext, genTable);
@ -296,23 +297,6 @@ public class VelocityUtils {
}
}
/**
* 根据列类型获取字典组
*
* @param genTable 业务表对象
* @return 返回字典组
*/
public static List<GenTableColumn> getColumns(GenTable genTable) {
List<GenTableColumn> columns = genTable.getColumns();
for (GenTableColumn column : columns) {
if (StringUtils.isNotBlank(column.getDictType())) {
column.setDictType(StringUtils.toCamelCase(column.getDictType()));
}
}
return columns;
}
/**
* 获取权限前缀
*