类 GenUtils

java.lang.Object
top.binfast.daemon.codegen.util.GenUtils

public class GenUtils extends Object
代码生成器 工具类
作者:
ruoyi
  • 字段详细资料

  • 构造器详细资料

    • GenUtils

      public GenUtils()
  • 方法详细资料

    • initTable

      public static void initTable(GenTable genTable, Long operId)
      初始化表信息
    • initColumnField

      public static void initColumnField(GenTableColumn column, GenTable table)
      初始化列属性字段
    • arraysContains

      public static boolean arraysContains(String[] arr, String targetValue)
      校验数组是否包含指定值
      参数:
      arr - 数组
      targetValue - 值
      返回:
      是否包含
    • getModuleName

      public static String getModuleName(String packageName)
      获取模块名
      参数:
      packageName - 包名
      返回:
      模块名
    • getBusinessName

      public static String getBusinessName(String tableName)
      获取业务名
      参数:
      tableName - 表名
      返回:
      业务名
    • convertClassName

      public static String convertClassName(String tableName)
      表名转换成Java类名
      参数:
      tableName - 表名称
      返回:
      类名
    • replaceFirst

      public static String replaceFirst(String replacementm, String[] searchList)
      批量替换前缀
      参数:
      replacementm - 替换值
      searchList - 替换列表
    • replaceText

      public static String replaceText(String text)
      关键字替换
      参数:
      text - 需要被替换的名字
      返回:
      替换后的名字
    • getDbType

      public static String getDbType(String columnType)
      获取数据库类型字段
      参数:
      columnType - 列类型
      返回:
      截取后的列类型
    • getColumnLength

      public static Integer getColumnLength(String columnType)
      获取字段长度
      参数:
      columnType - 列类型
      返回:
      截取后的列类型