mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
fix(other): 修复代码生成字典相关问题
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取权限前缀
|
||||
*
|
||||
|
Reference in New Issue
Block a user