类 VelocityUtils
java.lang.Object
top.binfast.daemon.codegen.util.VelocityUtils
模板处理工具类
- 作者:
- ruoyi
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static voidaddDicts(Set<String> dicts, List<GenTableColumn> columns) 添加字典列表static String根据列类型获取字典组static intgetExpandColumn(GenTable genTable) 获取需要在哪一列上面显示展开按钮static StringgetFileName(String template, GenTable genTable) 获取文件名getImportList(GenTable genTable) 根据列类型获取导入包static StringgetPackagePrefix(String packageName) 获取包前缀static StringgetParentMenuId(cn.hutool.core.lang.Dict paramsObj) 获取上级菜单ID字段static StringgetPermissionPrefix(String moduleName, String businessName) 获取权限前缀getTemplateList(String tplCategory) 获取模板信息static StringgetTreecode(Map<String, Object> paramsObj) 获取树编码static StringgetTreeName(cn.hutool.core.lang.Dict paramsObj) 获取树名称static StringgetTreeParentCode(cn.hutool.core.lang.Dict paramsObj) 获取树父编码static cn.hutool.core.lang.Dictstatic org.apache.velocity.VelocityContextprepareContext(GenTable genTable) 设置模板变量信息static voidsetMenuVelocityContext(org.apache.velocity.VelocityContext context, GenTable genTable) static voidsetTreeVelocityContext(org.apache.velocity.VelocityContext context, GenTable genTable)
-
构造器详细资料
-
VelocityUtils
public VelocityUtils()
-
-
方法详细资料
-
prepareContext
设置模板变量信息- 返回:
- 模板列表
-
setMenuVelocityContext
public static void setMenuVelocityContext(org.apache.velocity.VelocityContext context, GenTable genTable) -
setTreeVelocityContext
public static void setTreeVelocityContext(org.apache.velocity.VelocityContext context, GenTable genTable) -
getTemplateList
获取模板信息- 返回:
- 模板列表
-
getFileName
获取文件名 -
getPackagePrefix
获取包前缀- 参数:
packageName- 包名称- 返回:
- 包前缀名称
-
getImportList
根据列类型获取导入包- 参数:
genTable- 业务表对象- 返回:
- 返回需要导入的包列表
-
getDicts
根据列类型获取字典组- 参数:
genTable- 业务表对象- 返回:
- 返回字典组
-
addDicts
添加字典列表- 参数:
dicts- 字典列表columns- 列集合
-
getPermissionPrefix
获取权限前缀- 参数:
moduleName- 模块名称businessName- 业务名称- 返回:
- 返回权限前缀
-
getParentMenuId
获取上级菜单ID字段- 参数:
paramsObj- 生成其他选项- 返回:
- 上级菜单ID字段
-
getTreecode
获取树编码- 参数:
paramsObj- 生成其他选项- 返回:
- 树编码
-
getTreeParentCode
获取树父编码- 参数:
paramsObj- 生成其他选项- 返回:
- 树父编码
-
getTreeName
获取树名称- 参数:
paramsObj- 生成其他选项- 返回:
- 树名称
-
getExpandColumn
获取需要在哪一列上面显示展开按钮- 参数:
genTable- 业务表对象- 返回:
- 展开按钮列序号
-
parseMap
-