Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
7b6ae81d
提交
7b6ae81d
编写于
8月 16, 2022
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
aipvo
上级
35132d4d
变更
7
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
23 行增加
和
61 行删除
+23
-61
pom.xml.hbs
.../src/main/resources/templ/{{projectName}}-api/pom.xml.hbs
+6
-41
{{pascalCase ctrls@FORM}}AddDto.java.hbs
...se appEntities}}/{{pascalCase ctrls@FORM}}AddDto.java.hbs
+4
-5
{{pascalCase ctrls@FORM}}BaseDto.java.hbs
...e appEntities}}/{{pascalCase ctrls@FORM}}BaseDto.java.hbs
+4
-4
{{pascalCase ctrls@FORM}}Dto.java.hbs
...lCase appEntities}}/{{pascalCase ctrls@FORM}}Dto.java.hbs
+4
-5
{{pascalCase ctrls@FORM}}UpdateDto.java.hbs
...appEntities}}/{{pascalCase ctrls@FORM}}UpdateDto.java.hbs
+4
-5
{{pascalCase appEntities}}Resource.java.hbs
...{{apps}}/rest/{{pascalCase appEntities}}Resource.java.hbs
+1
-1
{{dicts}}Dict.java.hbs
...zlab-template/ibizlab-template-doc/{{dicts}}Dict.java.hbs
+0
-0
未找到文件。
modules/ibizlab-template/ibizlab-template-apivo/src/main/resources/templ/{{projectName}}-api/pom.xml.hbs
浏览文件 @
7b6ae81d
...
...
@@ -16,68 +16,33 @@
<dependency>
<groupId>
com.fasterxml.jackson.core
</groupId>
<artifactId>
jackson-annotations
</artifactId>
<version>
2.11.3
</version>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
<version>
1.2.83
</version>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<version>
1.18.16
</version>
</dependency>
<dependency>
<groupId>
io.swagger
</groupId>
<artifactId>
swagger-annotations
</artifactId>
<version>
1.5.22
</version>
</dependency>
<dependency>
<groupId>
jakarta.validation
</groupId>
<artifactId>
jakarta.validation-api
</artifactId>
<version>
2.0.2
</version>
</dependency>
<dependency>
<groupId>
com.fasterxml.jackson.core
</groupId>
<artifactId>
jackson-databind
</artifactId>
<version>
2.11.3
</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>
${basedir}/src/main/resources
</directory>
<includes>
<include>
**/**
</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>
cn.ibizlab
</groupId>
<artifactId>
ibizlab-generator-plugin
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<configuration>
<output>
../
</output>
<inputSpec>
../../XFOnline_1_3/model
</inputSpec>
<templateDirs>
${basedir}/src/main/resources/templ
</templateDirs>
<packageName>
${project.groupId}
</packageName>
<name>
${parent.artifactId}
</name>
</configuration>
<dependencies>
<dependency>
<groupId>
cn.ibizlab
</groupId>
<artifactId>
ibizlab-template-apivo
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
modules/ibizlab-template/ibizlab-template-apivo/src/main/resources/templ/{{projectName}}-api/src/main/java/{{packageName}}/api/{{apps}}/dto/{{pascalCase appEntities}}/{{pascalCase ctrls@FORM}}AddDto.java.hbs
浏览文件 @
7b6ae81d
...
...
@@ -22,15 +22,13 @@ import lombok.*;
import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
import
{{
packageName
}}
.api.
{{
apps
}}
.dict.*;
/**
*
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
AddDTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
*/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Data
@ApiModel(value = "
{{
ctrl
.
appEntity
.
entity
.
codeName
}}
-
{{
ctrl
.
codeName
}}
-Add", description = "
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
AddDTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
")
public class
{{
pascalCase
ctrl
.
codeName
}}
AddDto extends
{{
pascalCase
ctrl
.
codeName
}}
BaseDto {
...
...
@@ -44,12 +42,13 @@ public class {{pascalCase ctrl.codeName}}AddDto extends {{pascalCase ctrl.codeNa
@JsonProperty("
{{
camelCase
codeName
}}
")
{{#
timeType
}}
@JsonFormat(pattern = "
{{
format
}}
", locale = "zh", timezone = "GMT+8")
@DateTimeFormat(pattern = "
{{
format
}}
")
{{/
timeType
}}
@JSONField(name = "
{{
jsonName
}}
"
{{#
timeType
}}
, format = "
{{
format
}}
"
{{/
timeType
}}
)
{{#
eq
javaType
"Long"
}}
@JsonSerialize(using = ToStringSerializer.class)
{{/
eq
}}
@ApiModelProperty(value = "
{{
logicName
}}
"
{{#if
timeType
}}
, notes = "格式:
{{
format
}}
"
{{/if}}{{#if
dict
}}
, notes = "字典:
{{
dict
.
name
}}
", dataType = "
{{
lowerCase
type
.
java
}}
", reference = "
{{
dictCodeName
}}
"
{{/if}}{{#if
required
}}
, required = true
{{/if}}{{#if
hidden
}}
, hidden = true
{{/if}}{{#if
example
}}
, example = "
{{
example
}}
"
{{/if}}
)
@ApiModelProperty(value = "
{{
logicName
}}
{{#if
dict
}}
,字典:
{{
dict
.
name
}}{{/if}}{{#if
timeType
}}
,格式:
{{
format
}}{{/if}}
"
{{#if
timeType
}}
, notes = "格式:
{{
format
}}
"
{{/if}}{{#if
dict
}}
, notes = "字典:
{{
dict
.
name
}}
", dataType = "
{{
lowerCase
type
.
java
}}
", reference = "
{{
dictCodeName
}}
"
{{/if}}{{#if
required
}}
, required = true
{{/if}}{{#if
hidden
}}
, hidden = true
{{/if}}{{#if
example
}}
, example = "
{{
example
}}
"
{{/if}}
)
protected
{{
javaType
}}
{{
camelCase
codeName
}}
{{#if
createDefaultValue
}}
=
{{
createDefaultValue
}}{{/if}}
;
{{/if}}
...
...
modules/ibizlab-template/ibizlab-template-apivo/src/main/resources/templ/{{projectName}}-api/src/main/java/{{packageName}}/api/{{apps}}/dto/{{pascalCase appEntities}}/{{pascalCase ctrls@FORM}}BaseDto.java.hbs
浏览文件 @
7b6ae81d
...
...
@@ -22,14 +22,13 @@ import lombok.*;
import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
import
{{
packageName
}}
.api.
{{
apps
}}
.dict.*;
/**
*
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
BaseDTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
*/
@Getter
@Setter
@NoArgsConstructor
@Data
@ApiModel(value = "
{{
ctrl
.
appEntity
.
entity
.
codeName
}}
-
{{
ctrl
.
codeName
}}
-Base", description = "
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
BaseDTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
")
public class
{{
pascalCase
ctrl
.
codeName
}}
BaseDto implements Serializable {
...
...
@@ -43,12 +42,13 @@ public class {{pascalCase ctrl.codeName}}BaseDto implements Serializable {
@JsonProperty("
{{
camelCase
codeName
}}
")
{{#
timeType
}}
@JsonFormat(pattern = "
{{
format
}}
", locale = "zh", timezone = "GMT+8")
@DateTimeFormat(pattern = "
{{
format
}}
")
{{/
timeType
}}
@JSONField(name = "
{{
jsonName
}}
"
{{#
timeType
}}
, format = "
{{
format
}}
"
{{/
timeType
}}
)
{{#
eq
javaType
"Long"
}}
@JsonSerialize(using = ToStringSerializer.class)
{{/
eq
}}
@ApiModelProperty(value = "
{{
logicName
}}
"
{{#if
timeType
}}
, notes = "格式:
{{
format
}}
"
{{/if}}{{#if
dict
}}
, notes = "字典:
{{
dict
.
name
}}
", dataType = "
{{
lowerCase
type
.
java
}}
", reference = "
{{
dictCodeName
}}
"
{{/if}}{{#if
required
}}
, required = true
{{/if}}{{#if
hidden
}}
, hidden = true
{{/if}}{{#if
example
}}
, example = "
{{
example
}}
"
{{/if}}
)
@ApiModelProperty(value = "
{{
logicName
}}
{{#if
dict
}}
,字典:
{{
dict
.
name
}}{{/if}}{{#if
timeType
}}
,格式:
{{
format
}}{{/if}}
"
{{#if
timeType
}}
, notes = "格式:
{{
format
}}
"
{{/if}}{{#if
dict
}}
, notes = "字典:
{{
dict
.
name
}}
", dataType = "
{{
lowerCase
type
.
java
}}
", reference = "
{{
dictCodeName
}}
"
{{/if}}{{#if
required
}}
, required = true
{{/if}}{{#if
hidden
}}
, hidden = true
{{/if}}{{#if
example
}}
, example = "
{{
example
}}
"
{{/if}}
)
protected
{{
javaType
}}
{{
camelCase
codeName
}}
;
{{/
unless
}}
...
...
modules/ibizlab-template/ibizlab-template-apivo/src/main/resources/templ/{{projectName}}-api/src/main/java/{{packageName}}/api/{{apps}}/dto/{{pascalCase appEntities}}/{{pascalCase ctrls@FORM}}Dto.java.hbs
浏览文件 @
7b6ae81d
...
...
@@ -22,15 +22,13 @@ import lombok.*;
import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
import
{{
packageName
}}
.api.
{{
apps
}}
.dict.*;
/**
*
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
DTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
*/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Data
@ApiModel(value = "
{{
ctrl
.
appEntity
.
entity
.
codeName
}}
-
{{
ctrl
.
codeName
}}
", description = "
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
DTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
")
public class
{{
pascalCase
ctrl
.
codeName
}}
Dto extends
{{
pascalCase
ctrl
.
codeName
}}
BaseDto {
...
...
@@ -44,12 +42,13 @@ public class {{pascalCase ctrl.codeName}}Dto extends {{pascalCase ctrl.codeName}
@JsonProperty("
{{
camelCase
codeName
}}
")
{{#
timeType
}}
@JsonFormat(pattern = "
{{
format
}}
", locale = "zh", timezone = "GMT+8")
@DateTimeFormat(pattern = "
{{
format
}}
")
{{/
timeType
}}
@JSONField(name = "
{{
jsonName
}}
"
{{#
timeType
}}
, format = "
{{
format
}}
"
{{/
timeType
}}
)
{{#
eq
javaType
"Long"
}}
@JsonSerialize(using = ToStringSerializer.class)
{{/
eq
}}
@ApiModelProperty(value = "
{{
logicName
}}
"
{{#if
timeType
}}
, notes = "格式:
{{
format
}}
"
{{/if}}{{#if
dict
}}
, notes = "字典:
{{
dict
.
name
}}
", dataType = "
{{
lowerCase
type
.
java
}}
", reference = "
{{
dictCodeName
}}
"
{{/if}}{{#if
required
}}
, required = true
{{/if}}{{#if
hidden
}}
, hidden = true
{{/if}}{{#if
example
}}
, example = "
{{
example
}}
"
{{/if}}
)
@ApiModelProperty(value = "
{{
logicName
}}
{{#if
dict
}}
,字典:
{{
dict
.
name
}}{{/if}}{{#if
timeType
}}
,格式:
{{
format
}}{{/if}}
"
{{#if
timeType
}}
, notes = "格式:
{{
format
}}
"
{{/if}}{{#if
dict
}}
, notes = "字典:
{{
dict
.
name
}}
", dataType = "
{{
lowerCase
type
.
java
}}
", reference = "
{{
dictCodeName
}}
"
{{/if}}{{#if
required
}}
, required = true
{{/if}}{{#if
hidden
}}
, hidden = true
{{/if}}{{#if
example
}}
, example = "
{{
example
}}
"
{{/if}}
)
protected
{{
javaType
}}
{{
camelCase
codeName
}}
;
{{/if}}
...
...
modules/ibizlab-template/ibizlab-template-apivo/src/main/resources/templ/{{projectName}}-api/src/main/java/{{packageName}}/api/{{apps}}/dto/{{pascalCase appEntities}}/{{pascalCase ctrls@FORM}}UpdateDto.java.hbs
浏览文件 @
7b6ae81d
...
...
@@ -22,15 +22,13 @@ import lombok.*;
import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
import
{{
packageName
}}
.api.
{{
apps
}}
.dict.*;
/**
*
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
UpdateDTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
*/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Data
@ApiModel(value = "
{{
ctrl
.
appEntity
.
entity
.
codeName
}}
-
{{
ctrl
.
codeName
}}
-Update", description = "
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
UpdateDTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
")
public class
{{
pascalCase
ctrl
.
codeName
}}
UpdateDto extends
{{
pascalCase
ctrl
.
codeName
}}
BaseDto {
...
...
@@ -44,12 +42,13 @@ public class {{pascalCase ctrl.codeName}}UpdateDto extends {{pascalCase ctrl.cod
@JsonProperty("
{{
camelCase
codeName
}}
")
{{#
timeType
}}
@JsonFormat(pattern = "
{{
format
}}
", locale = "zh", timezone = "GMT+8")
@DateTimeFormat(pattern = "
{{
format
}}
")
{{/
timeType
}}
@JSONField(name = "
{{
jsonName
}}
"
{{#
timeType
}}
, format = "
{{
format
}}
"
{{/
timeType
}}
)
{{#
eq
javaType
"Long"
}}
@JsonSerialize(using = ToStringSerializer.class)
{{/
eq
}}
@ApiModelProperty(value = "
{{
logicName
}}
"
{{#if
timeType
}}
, notes = "格式:
{{
format
}}
"
{{/if}}{{#if
dict
}}
, notes = "字典:
{{
dict
.
name
}}
", dataType = "
{{
lowerCase
type
.
java
}}
", reference = "
{{
dictCodeName
}}
"
{{/if}}{{#if
required
}}
, required = true
{{/if}}{{#if
hidden
}}
, hidden = true
{{/if}}{{#if
example
}}
, example = "
{{
example
}}
"
{{/if}}
)
@ApiModelProperty(value = "
{{
logicName
}}
{{#if
dict
}}
,字典:
{{
dict
.
name
}}{{/if}}{{#if
timeType
}}
,格式:
{{
format
}}{{/if}}
"
{{#if
timeType
}}
, notes = "格式:
{{
format
}}
"
{{/if}}{{#if
dict
}}
, notes = "字典:
{{
dict
.
name
}}
", dataType = "
{{
lowerCase
type
.
java
}}
", reference = "
{{
dictCodeName
}}
"
{{/if}}{{#if
required
}}
, required = true
{{/if}}{{#if
hidden
}}
, hidden = true
{{/if}}{{#if
example
}}
, example = "
{{
example
}}
"
{{/if}}
)
protected
{{
javaType
}}
{{
camelCase
codeName
}}
{{#if
updateDefaultValue
}}
=
{{
updateDefaultValue
}}{{/if}}
;
{{/if}}
...
...
modules/ibizlab-template/ibizlab-template-apivo/src/main/resources/templ/{{projectName}}-rest/src/main/java/{{packageName}}/api/{{apps}}/rest/{{pascalCase appEntities}}Resource.java.hbs
浏览文件 @
7b6ae81d
...
...
@@ -35,7 +35,7 @@ import {{packageName}}.api.{{apps}}.dict.*;
@Slf4j
@Api(tags = {"
{{
appEntity
.
entity
.
logicName
}}
" })
@RestController("
{{
lowerCase
appEntity
.
app
.
codeName
}}
-
{{
lowerCase
appEntity
.
entity
.
codeName
}}
")
@RequestMapping("/
{{
lowerCase
appEntity
.
app
.
codeName
}}
/
{{
pluralize
codeName
}}
")
@RequestMapping("/
{{
lowerCase
appEntity
.
app
.
codeName
}}
/
{{
pluralize
appEntity
.
entity
.
codeName
}}
")
public class
{{
pascalCase
appEntity
.
codeName
}}
Resource {
...
...
modules/ibizlab-template/ibizlab-template-
apivo/src/main/resources/templ/{{projectName}}-api/src/main/java/{{packageName}}/api/{{apps}}/dict
/{{dicts}}Dict.java.hbs
→
modules/ibizlab-template/ibizlab-template-
doc
/{{dicts}}Dict.java.hbs
浏览文件 @
7b6ae81d
文件已移动
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录