Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
390306f5
提交
390306f5
编写于
8月 15, 2022
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
aipvo
上级
576834e2
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
246 行增加
和
0 行删除
+246
-0
{{pascalCase ctrls@FORM}}BaseDto.java.hbs
...e appEntities}}/{{pascalCase ctrls@FORM}}BaseDto.java.hbs
+57
-0
{{pascalCase ctrls@FORM}}SysDto.java.hbs
...se appEntities}}/{{pascalCase ctrls@FORM}}SysDto.java.hbs
+57
-0
pom.xml.hbs
...src/main/resources/templ/{{projectName}}-rest/pom.xml.hbs
+67
-0
{{dicts}}Dict.java.hbs
.../{{packageName}}/api/{{apps}}/dict/{{dicts}}Dict.java.hbs
+63
-0
{{pascalCase ctrls@FORM}}Dto.java.hbs
...lCase appEntities}}/{{pascalCase ctrls@FORM}}Dto.java.hbs
+2
-0
未找到文件。
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
0 → 100644
浏览文件 @
390306f5
{{#
eq
apps
"link"
}}
package
{{
packageName
}}
.api.
{{
apps
}}
.dto.
{{
pascalCase
appEntities
}}
;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import lombok.*;
import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import
{{
packageName
}}
.api.
{{
apps
}}
.dict.*;
/**
*
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
DTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
*/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ApiModel(value = "
{{
appEntities
}}
-
{{
ctrl
.
codeName
}}
", description = "
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
DTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
")
public class
{{
pascalCase
ctrl
.
codeName
}}
Dto implements Serializable {
private static final long serialVersionUID = 1L;
{{#
each
ctrl
.
voItems
}}
/**
*
{{
logicName
}}
*/
@JsonProperty("
{{
camelCase
codeName
}}
")
{{#
timeType
}}
@JsonFormat(pattern = "
{{
format
}}
", locale = "zh", timezone = "GMT+8")
{{/
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}}
)
private
{{
javaType
}}
{{
camelCase
codeName
}}
{{#if
defaultValue
}}
=
{{
defaultValue
}}{{/if}}
;
{{/
each
}}
}
{{/
eq
}}
\ No newline at end of file
modules/ibizlab-template/ibizlab-template-apivo/src/main/resources/templ/{{projectName}}-api/src/main/java/{{packageName}}/api/{{apps}}/dto/{{pascalCase appEntities}}/{{pascalCase ctrls@FORM}}SysDto.java.hbs
0 → 100644
浏览文件 @
390306f5
{{#
eq
apps
"link"
}}
package
{{
packageName
}}
.api.
{{
apps
}}
.dto.
{{
pascalCase
appEntities
}}
;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.math.BigInteger;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import lombok.*;
import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import
{{
packageName
}}
.api.
{{
apps
}}
.dict.*;
/**
*
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
DTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
*/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ApiModel(value = "
{{
appEntities
}}
-
{{
ctrl
.
codeName
}}
", description = "
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
DTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
")
public class
{{
pascalCase
ctrl
.
codeName
}}
Dto implements Serializable {
private static final long serialVersionUID = 1L;
{{#
each
ctrl
.
voItems
}}
/**
*
{{
logicName
}}
*/
@JsonProperty("
{{
camelCase
codeName
}}
")
{{#
timeType
}}
@JsonFormat(pattern = "
{{
format
}}
", locale = "zh", timezone = "GMT+8")
{{/
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}}
)
private
{{
javaType
}}
{{
camelCase
codeName
}}
{{#if
defaultValue
}}
=
{{
defaultValue
}}{{/if}}
;
{{/
each
}}
}
{{/
eq
}}
\ No newline at end of file
modules/ibizlab-template/ibizlab-template-apivo/src/main/resources/templ/{{projectName}}-rest/pom.xml.hbs
0 → 100644
浏览文件 @
390306f5
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<parent>
<artifactId>
{{
projectName
}}
</artifactId>
<groupId>
{{
packageName
}}
</groupId>
<version>
{{
system
.
pub
.
versionString
}}
</version>
</parent>
<artifactId>
{{
projectName
}}
-rest
</artifactId>
<name>
{{
projectDesc
}}
Rest
</name>
<description>
{{
projectDesc
}}
Rest
</description>
<dependencies>
<dependency>
<groupId>
{{
packageName
}}
</groupId>
<artifactId>
{{
projectName
}}
-api
</artifactId>
</dependency>
<dependency>
<groupId>
{{
packageName
}}
</groupId>
<artifactId>
{{
projectName
}}
-core
</artifactId>
</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}}-rest/src/main/java/{{packageName}}/api/{{apps}}/dict/{{dicts}}Dict.java.hbs
0 → 100644
浏览文件 @
390306f5
{{#
eq
apps
"link"
}}
package
{{
packageName
}}
.api.
{{
apps
}}
.dict;
import com.alibaba.fastjson.annotation.JSONCreator;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
/**
* 字典:
{{
dict
.
name
}}
*/
@ApiModel(value = "
{{
dict
.
codeName
}}
", description = "字典:
{{
dict
.
name
}}
")
public enum
{{
pascalCase
dict
.
codeName
}}
Dict {
{{#
each
dict
.
sets
}}
{{#
eq
dict
.
valueType
"String"
}}
{{
name
}}
("
{{
value
}}
","
{{
label
}}
",
{{#if
parent
}}
"
{{
parent
}}
"
{{else}}
null
{{/if}}
)
{{#if
@last
}}
;
{{else}}
,
{{/if}}
{{/
eq
}}
{{#
eq
dict
.
valueType
"Integer"
}}
{{
name
}}
(
{{
value
}}
,"
{{
label
}}
",
{{#if
parent
}}{{
parent
}}{{else}}
null
{{/if}}
)
{{#if
@last
}}
;
{{else}}
,
{{/if}}
{{/
eq
}}
{{/
each
}}
private
{{
dict
.
valueType
}}
value;
@JsonValue
@JSONField
public
{{
dict
.
valueType
}}
getValue() {
return value;
}
private String label;
public String getLabel() {
return label;
}
private
{{
dict
.
valueType
}}
parent;
public
{{
dict
.
valueType
}}
getParent() {
return parent;
}
{{
pascalCase
dict
.
codeName
}}
Dict(
{{
dict
.
valueType
}}
value, String label,
{{
dict
.
valueType
}}
parent) {
this.value = value;
this.label = label;
this.parent = parent;
}
@JsonCreator
@JSONCreator
public static
{{
pascalCase
dict
.
codeName
}}
Dict valueOf(Object tag) {
if(tag==null)
return null;
for (
{{
pascalCase
dict
.
codeName
}}
Dict item : values())
if (item.getValue().equals(tag)
{{#
eq
dict
.
valueType
"Integer"
}}
||item.getValue().toString().equals(tag)
{{/
eq
}}
)
return item;
{{
pascalCase
dict
.
codeName
}}
Dict ret =null;
for (
{{
pascalCase
dict
.
codeName
}}
Dict item : values())
if (item.getLabel().equals(tag))
ret = item;
return ret;
}
}
{{/
eq
}}
\ No newline at end of file
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
→
modules/ibizlab-template/ibizlab-template-apivo/src/main/resources/templ/{{projectName}}-
rest
/src/main/java/{{packageName}}/api/{{apps}}/dto/{{pascalCase appEntities}}/{{pascalCase ctrls@FORM}}Dto.java.hbs
浏览文件 @
390306f5
...
...
@@ -30,6 +30,8 @@ import {{packageName}}.api.{{apps}}.dict.*;
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ApiModel(value = "
{{
appEntities
}}
-
{{
ctrl
.
codeName
}}
", description = "
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
DTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
")
public class
{{
pascalCase
ctrl
.
codeName
}}
Dto implements Serializable {
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录