1 Star 2 Fork 2

threefish / NutzFwCodeGenerat

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 3.09 KB
一键复制 编辑 原始数据 按行查看 历史
threefish 提交于 2019-06-06 15:05 . 支持预览修改

NutzFw Code Generat

代码生成器

模版修改

插件商店 https://plugins.jetbrains.com/plugin/11575

模版语法采用BEETL

        /** 模板占位起始符号 */
       	String placeholderStart = "#[";
       	/** 模板占位结束符号 */
       	String placeholderEnd = "]";
       	/** 控制语句起始符号 */
       	String statementStart = "<##";
       	/** 控制语句结束符号 */
       	String statementEnd = "##>";
  • 变量列表 -- 使用#[base.变量名]取用

    变量名 类型 意义
    entityName String entityName
    entityPackage String entity Package
    serviceFileName String service File Name
    servicePackage String service Package
    serviceImplFileName String serviceImpl File Name
    serviceImplPackage String serviceImpl Package
    actionFileName String action File Name
    actionPackage String action package
    funName String 当前功能名称
    templatePath String HTML模版目录
    userName String 姓名
    userMail String 用户邮箱
    primaryKey String 主键
    uuid boolean 主键是否是UUID
    richText boolean 是否有UE富文本编辑器
    attachment boolean 是否有附件上传
    multidict boolean 是否是NutzFw多选字典
    oneOneRelation boolean 存在一对一表单关联
    fields List 当前实体类的字段列表
  • 当前实体类的字段信息

    变量名 类型 意义 默认值
    name String JAVA字段名称
    primaryKey boolean 主键 false
    comment String 字段描述
    columnName String 数据库字段名
    type String JAVA字段类型
    fullType String JAVA字段类型包含引用
    date boolean 是否日期 false
    以下为NutzFw项目专用
    dict boolean 是否字典 false
    dictCode String 字典Code
    required boolean 是否必填必选字段 false
    text int 文本类型 输入框2-多行文本框3-百度UE4 false
    attachment boolean 附件类型 false
    attachmentMultiple boolean 是否是多附件类型 false
    attachmentAllIsImg boolean 附件全部是图片 false
    attachSuffix String 限制附件格式(jpg,png) xlsx,xls,png,jpg,doc,docx
    placeholder String 提示信息
    maxLength int 文本最大长度 10
    oneOne boolean 是单表关联 false
    oneOneField String 表关联字段
    oneOneClassName String 表关联类
    oneOneClassQualifiedName String 表关联类全路径
Java
1
https://gitee.com/threefish/NutzFwCodeGenerat.git
git@gitee.com:threefish/NutzFwCodeGenerat.git
threefish
NutzFwCodeGenerat
NutzFwCodeGenerat
master

搜索帮助