Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
2e140383
提交
2e140383
编写于
8月 08, 2022
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
模板切分
上级
51dc33bc
变更
7
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
53 行增加
和
34 行删除
+53
-34
{{entities@NONE}}.java.hbs
...ckageName}}/{{modules}}/domain/{{entities@NONE}}.java.hbs
+5
-5
{{entities@NoSQL}}.java.hbs
...kageName}}/{{modules}}/domain/{{entities@NoSQL}}.java.hbs
+5
-5
{{entities@SQL}}.java.hbs
...ackageName}}/{{modules}}/domain/{{entities@SQL}}.java.hbs
+5
-5
{{entities@ServiceAPI}}.java.hbs
...ame}}/{{modules}}/domain/{{entities@ServiceAPI}}.java.hbs
+5
-5
{{entities@NONE}}.java.hbs
...Name}}/core/{{modules}}/domain/{{entities@NONE}}.java.hbs
+9
-2
{{entities@SQL}}.java.hbs
...eName}}/core/{{modules}}/domain/{{entities@SQL}}.java.hbs
+11
-6
{{entities@ServiceAPI}}.java.hbs
.../core/{{modules}}/domain/{{entities@ServiceAPI}}.java.hbs
+13
-6
未找到文件。
modules/ibizlab-template/ibizlab-template-ibizboot/src/main/resources/templ/{{projectName}}-core/src/main/java/{{packageName}}/{{modules}}/domain/{{entities@NONE}}.java.hbs
浏览文件 @
2e140383
...
@@ -33,7 +33,7 @@ import {{packageName}}.{{module}}.domain.{{codeName}};
...
@@ -33,7 +33,7 @@ import {{packageName}}.{{module}}.domain.{{codeName}};
@Setter
@Setter
@NoArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@JsonIgnoreProperties(value = "handler")
@ApiModel("
{{
entity
.
logicName
}}
")
@ApiModel(
value = "
{{
entity
.
name
}}
", description =
"
{{
entity
.
logicName
}}
")
public class
{{
entity
.
codeName
}}
extends BaseData implements Serializable
public class
{{
entity
.
codeName
}}
extends BaseData implements Serializable
{
{
...
@@ -53,7 +53,7 @@ public class {{entity.codeName}} extends BaseData implements Serializable
...
@@ -53,7 +53,7 @@ public class {{entity.codeName}} extends BaseData implements Serializable
{{#
eq
type
.
java
"Long"
}}
{{#
eq
type
.
java
"Long"
}}
@JsonSerialize(using = ToStringSerializer.class)
@JsonSerialize(using = ToStringSerializer.class)
{{/
eq
}}
{{/
eq
}}
@ApiModelProperty(value = "
{{
columnName
}}
",
name = "
{{
jsonName
}}
",
notes = "
{{
logicName
}}
")
@ApiModelProperty(value = "
{{
columnName
}}
",
notes = "
{{
logicName
}}
")
private
{{
type
.
java
}}
{{
camelCase
codeName
}}
;
private
{{
type
.
java
}}
{{
camelCase
codeName
}}
;
{{/
unless
}}
{{/
unless
}}
...
@@ -65,7 +65,7 @@ public class {{entity.codeName}} extends BaseData implements Serializable
...
@@ -65,7 +65,7 @@ public class {{entity.codeName}} extends BaseData implements Serializable
*/
*/
@JSONField(name = "
{{
lowerCase
codeName
}}
")
@JSONField(name = "
{{
lowerCase
codeName
}}
")
@JsonProperty("
{{
lowerCase
codeName
}}
")
@JsonProperty("
{{
lowerCase
codeName
}}
")
@ApiModelProperty(value = "
{{
lowerCase
codeName
}}
",
name = "
{{
lowerCase
codeName
}}
",
notes = "
{{
logicName
}}
")
@ApiModelProperty(value = "
{{
lowerCase
codeName
}}
",
notes = "
{{
logicName
}}
")
private
{{
entityCodeName
}}
{{
camelCase
codeName
}}
;
private
{{
entityCodeName
}}
{{
camelCase
codeName
}}
;
{{/
each
}}
{{/
each
}}
...
@@ -76,11 +76,11 @@ public class {{entity.codeName}} extends BaseData implements Serializable
...
@@ -76,11 +76,11 @@ public class {{entity.codeName}} extends BaseData implements Serializable
{{#if
listCode
}}
{{#if
listCode
}}
@JSONField(name = "
{{
listCode
}}
")
@JSONField(name = "
{{
listCode
}}
")
@JsonProperty("
{{
listCode
}}
")
@JsonProperty("
{{
listCode
}}
")
@ApiModelProperty(value = "
{{
lowerCase
listCode
}}
",
name = "
{{
lowerCase
codeName
}}
",
notes = "
{{
logicName
}}
")
@ApiModelProperty(value = "
{{
lowerCase
listCode
}}
",
notes = "
{{
logicName
}}
")
{{else}}
{{else}}
@JsonIgnore
@JsonIgnore
@JSONField(serialize = false)
@JSONField(serialize = false)
@ApiModelProperty(value = "
{{
lowerCase
codeName
}}
",
name = "
{{
lowerCase
codeName
}}
",
notes = "
{{
logicName
}}
")
@ApiModelProperty(value = "
{{
lowerCase
codeName
}}
",
notes = "
{{
logicName
}}
")
{{/if}}
{{/if}}
private List
<
{{
entityCodeName
}}
>
{{
camelCase
codeName
}}
;
private List
<
{{
entityCodeName
}}
>
{{
camelCase
codeName
}}
;
{{/
each
}}
{{/
each
}}
...
...
modules/ibizlab-template/ibizlab-template-ibizboot/src/main/resources/templ/{{projectName}}-core/src/main/java/{{packageName}}/{{modules}}/domain/{{entities@NoSQL}}.java.hbs
浏览文件 @
2e140383
...
@@ -33,7 +33,7 @@ import {{packageName}}.{{module}}.domain.{{codeName}};
...
@@ -33,7 +33,7 @@ import {{packageName}}.{{module}}.domain.{{codeName}};
@Setter
@Setter
@NoArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@JsonIgnoreProperties(value = "handler")
@ApiModel("
{{
entity
.
logicName
}}
")
@ApiModel(
value = "
{{
entity
.
name
}}
", description =
"
{{
entity
.
logicName
}}
")
public class
{{
entity
.
codeName
}}
extends BaseData implements Serializable
public class
{{
entity
.
codeName
}}
extends BaseData implements Serializable
{
{
...
@@ -53,7 +53,7 @@ public class {{entity.codeName}} extends BaseData implements Serializable
...
@@ -53,7 +53,7 @@ public class {{entity.codeName}} extends BaseData implements Serializable
{{#
eq
type
.
java
"Long"
}}
{{#
eq
type
.
java
"Long"
}}
@JsonSerialize(using = ToStringSerializer.class)
@JsonSerialize(using = ToStringSerializer.class)
{{/
eq
}}
{{/
eq
}}
@ApiModelProperty(value = "
{{
columnName
}}
",
name = "
{{
jsonName
}}
",
notes = "
{{
logicName
}}
")
@ApiModelProperty(value = "
{{
columnName
}}
",
notes = "
{{
logicName
}}
")
private
{{
type
.
java
}}
{{
camelCase
codeName
}}
;
private
{{
type
.
java
}}
{{
camelCase
codeName
}}
;
{{/
unless
}}
{{/
unless
}}
...
@@ -65,7 +65,7 @@ public class {{entity.codeName}} extends BaseData implements Serializable
...
@@ -65,7 +65,7 @@ public class {{entity.codeName}} extends BaseData implements Serializable
*/
*/
@JSONField(name = "
{{
lowerCase
codeName
}}
")
@JSONField(name = "
{{
lowerCase
codeName
}}
")
@JsonProperty("
{{
lowerCase
codeName
}}
")
@JsonProperty("
{{
lowerCase
codeName
}}
")
@ApiModelProperty(value = "
{{
lowerCase
codeName
}}
",
name = "
{{
lowerCase
codeName
}}
",
notes = "
{{
logicName
}}
")
@ApiModelProperty(value = "
{{
lowerCase
codeName
}}
",
notes = "
{{
logicName
}}
")
private
{{
entityCodeName
}}
{{
camelCase
codeName
}}
;
private
{{
entityCodeName
}}
{{
camelCase
codeName
}}
;
{{/
each
}}
{{/
each
}}
...
@@ -76,11 +76,11 @@ public class {{entity.codeName}} extends BaseData implements Serializable
...
@@ -76,11 +76,11 @@ public class {{entity.codeName}} extends BaseData implements Serializable
{{#if
listCode
}}
{{#if
listCode
}}
@JSONField(name = "
{{
listCode
}}
")
@JSONField(name = "
{{
listCode
}}
")
@JsonProperty("
{{
listCode
}}
")
@JsonProperty("
{{
listCode
}}
")
@ApiModelProperty(value = "
{{
lowerCase
listCode
}}
",
name = "
{{
lowerCase
codeName
}}
",
notes = "
{{
logicName
}}
")
@ApiModelProperty(value = "
{{
lowerCase
listCode
}}
",
notes = "
{{
logicName
}}
")
{{else}}
{{else}}
@JsonIgnore
@JsonIgnore
@JSONField(serialize = false)
@JSONField(serialize = false)
@ApiModelProperty(value = "
{{
lowerCase
codeName
}}
",
name = "
{{
lowerCase
codeName
}}
",
notes = "
{{
logicName
}}
")
@ApiModelProperty(value = "
{{
lowerCase
codeName
}}
",
notes = "
{{
logicName
}}
")
{{/if}}
{{/if}}
private List
<
{{
entityCodeName
}}
>
{{
camelCase
codeName
}}
;
private List
<
{{
entityCodeName
}}
>
{{
camelCase
codeName
}}
;
{{/
each
}}
{{/
each
}}
...
...
modules/ibizlab-template/ibizlab-template-ibizboot/src/main/resources/templ/{{projectName}}-core/src/main/java/{{packageName}}/{{modules}}/domain/{{entities@SQL}}.java.hbs
浏览文件 @
2e140383
...
@@ -37,7 +37,7 @@ import {{packageName}}.{{module}}.domain.{{codeName}};
...
@@ -37,7 +37,7 @@ import {{packageName}}.{{module}}.domain.{{codeName}};
@NoArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@JsonIgnoreProperties(value = "handler")
@TableName(value = "
{{
entity
.
tableName
}}
", resultMap = "
{{
entity
.
codeName
}}
ResultMap")
@TableName(value = "
{{
entity
.
tableName
}}
", resultMap = "
{{
entity
.
codeName
}}
ResultMap")
@ApiModel("
{{
entity
.
logicName
}}
")
@ApiModel(
value = "
{{
entity
.
name
}}
", description =
"
{{
entity
.
logicName
}}
")
public class
{{
entity
.
codeName
}}
extends BaseData implements Serializable
public class
{{
entity
.
codeName
}}
extends BaseData implements Serializable
{
{
...
@@ -67,7 +67,7 @@ public class {{entity.codeName}} extends BaseData implements Serializable
...
@@ -67,7 +67,7 @@ public class {{entity.codeName}} extends BaseData implements Serializable
{{#
eq
type
.
java
"Long"
}}
{{#
eq
type
.
java
"Long"
}}
@JsonSerialize(using = ToStringSerializer.class)
@JsonSerialize(using = ToStringSerializer.class)
{{/
eq
}}
{{/
eq
}}
@ApiModelProperty(value = "
{{
columnName
}}
",
name = "
{{
jsonName
}}
",
notes = "
{{
logicName
}}
")
@ApiModelProperty(value = "
{{
columnName
}}
",
notes = "
{{
logicName
}}
")
private
{{
type
.
java
}}
{{
camelCase
codeName
}}
;
private
{{
type
.
java
}}
{{
camelCase
codeName
}}
;
{{/
unless
}}
{{/
unless
}}
...
@@ -80,7 +80,7 @@ public class {{entity.codeName}} extends BaseData implements Serializable
...
@@ -80,7 +80,7 @@ public class {{entity.codeName}} extends BaseData implements Serializable
@JsonIgnore
@JsonIgnore
@JSONField(serialize = false)
@JSONField(serialize = false)
@TableField(exist = false)
@TableField(exist = false)
@ApiModelProperty(value = "
{{
lowerCase
codeName
}}
",
name = "
{{
lowerCase
codeName
}}
",
notes = "
{{
logicName
}}
")
@ApiModelProperty(value = "
{{
lowerCase
codeName
}}
",
notes = "
{{
logicName
}}
")
private
{{
entityCodeName
}}
{{
camelCase
codeName
}}
;
private
{{
entityCodeName
}}
{{
camelCase
codeName
}}
;
{{/
each
}}
{{/
each
}}
...
@@ -97,10 +97,10 @@ public class {{entity.codeName}} extends BaseData implements Serializable
...
@@ -97,10 +97,10 @@ public class {{entity.codeName}} extends BaseData implements Serializable
{{/if}}
{{/if}}
{{#if
columnName
}}
{{#if
columnName
}}
@TableField(value = "
{{
columnName
}}
" , typeHandler =
{{
packageName
}}
.
{{
module
}}
.domain.handlers.
{{
entityCodeName
}}
TypeHandler.class)
@TableField(value = "
{{
columnName
}}
" , typeHandler =
{{
packageName
}}
.
{{
module
}}
.domain.handlers.
{{
entityCodeName
}}
TypeHandler.class)
@ApiModelProperty(value = "
{{
columnName
}}
",
name = "
{{
lowerCase
codeName
}}
",
notes = "
{{
logicName
}}
")
@ApiModelProperty(value = "
{{
columnName
}}
",
notes = "
{{
logicName
}}
")
{{else}}
{{else}}
@TableField(exist = false)
@TableField(exist = false)
@ApiModelProperty(value = "
{{
lowerCase
codeName
}}
",
name = "
{{
lowerCase
codeName
}}
",
notes = "
{{
logicName
}}
")
@ApiModelProperty(value = "
{{
lowerCase
codeName
}}
",
notes = "
{{
logicName
}}
")
{{/if}}
{{/if}}
protected List
<
{{
entityCodeName
}}
>
{{
camelCase
codeName
}}
;
protected List
<
{{
entityCodeName
}}
>
{{
camelCase
codeName
}}
;
{{/
each
}}
{{/
each
}}
...
...
modules/ibizlab-template/ibizlab-template-ibizboot/src/main/resources/templ/{{projectName}}-core/src/main/java/{{packageName}}/{{modules}}/domain/{{entities@ServiceAPI}}.java.hbs
浏览文件 @
2e140383
...
@@ -33,7 +33,7 @@ import {{packageName}}.{{module}}.domain.{{codeName}};
...
@@ -33,7 +33,7 @@ import {{packageName}}.{{module}}.domain.{{codeName}};
@Setter
@Setter
@NoArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@JsonIgnoreProperties(value = "handler")
@ApiModel("
{{
entity
.
logicName
}}
")
@ApiModel(
value = "
{{
entity
.
name
}}
", description =
"
{{
entity
.
logicName
}}
")
public class
{{
entity
.
codeName
}}
extends BaseData implements Serializable
public class
{{
entity
.
codeName
}}
extends BaseData implements Serializable
{
{
...
@@ -53,7 +53,7 @@ public class {{entity.codeName}} extends BaseData implements Serializable
...
@@ -53,7 +53,7 @@ public class {{entity.codeName}} extends BaseData implements Serializable
{{#
eq
type
.
java
"Long"
}}
{{#
eq
type
.
java
"Long"
}}
@JsonSerialize(using = ToStringSerializer.class)
@JsonSerialize(using = ToStringSerializer.class)
{{/
eq
}}
{{/
eq
}}
@ApiModelProperty(value = "
{{
columnName
}}
",
name = "
{{
jsonName
}}
",
notes = "
{{
logicName
}}
")
@ApiModelProperty(value = "
{{
columnName
}}
",
notes = "
{{
logicName
}}
")
private
{{
type
.
java
}}
{{
camelCase
codeName
}}
;
private
{{
type
.
java
}}
{{
camelCase
codeName
}}
;
{{/
unless
}}
{{/
unless
}}
...
@@ -65,7 +65,7 @@ public class {{entity.codeName}} extends BaseData implements Serializable
...
@@ -65,7 +65,7 @@ public class {{entity.codeName}} extends BaseData implements Serializable
*/
*/
@JSONField(name = "
{{
lowerCase
codeName
}}
")
@JSONField(name = "
{{
lowerCase
codeName
}}
")
@JsonProperty("
{{
lowerCase
codeName
}}
")
@JsonProperty("
{{
lowerCase
codeName
}}
")
@ApiModelProperty(value = "
{{
lowerCase
codeName
}}
",
name = "
{{
lowerCase
codeName
}}
",
notes = "
{{
logicName
}}
")
@ApiModelProperty(value = "
{{
lowerCase
codeName
}}
",
notes = "
{{
logicName
}}
")
private
{{
entityCodeName
}}
{{
camelCase
codeName
}}
;
private
{{
entityCodeName
}}
{{
camelCase
codeName
}}
;
{{/
each
}}
{{/
each
}}
...
@@ -76,11 +76,11 @@ public class {{entity.codeName}} extends BaseData implements Serializable
...
@@ -76,11 +76,11 @@ public class {{entity.codeName}} extends BaseData implements Serializable
{{#if
listCode
}}
{{#if
listCode
}}
@JSONField(name = "
{{
listCode
}}
")
@JSONField(name = "
{{
listCode
}}
")
@JsonProperty("
{{
listCode
}}
")
@JsonProperty("
{{
listCode
}}
")
@ApiModelProperty(value = "
{{
lowerCase
listCode
}}
",
name = "
{{
lowerCase
codeName
}}
",
notes = "
{{
logicName
}}
")
@ApiModelProperty(value = "
{{
lowerCase
listCode
}}
",
notes = "
{{
logicName
}}
")
{{else}}
{{else}}
@JsonIgnore
@JsonIgnore
@JSONField(serialize = false)
@JSONField(serialize = false)
@ApiModelProperty(value = "
{{
lowerCase
codeName
}}
",
name = "
{{
lowerCase
codeName
}}
",
notes = "
{{
logicName
}}
")
@ApiModelProperty(value = "
{{
lowerCase
codeName
}}
",
notes = "
{{
logicName
}}
")
{{/if}}
{{/if}}
private List
<
{{
entityCodeName
}}
>
{{
camelCase
codeName
}}
;
private List
<
{{
entityCodeName
}}
>
{{
camelCase
codeName
}}
;
{{/
each
}}
{{/
each
}}
...
...
modules/ibizlab-template/ibizlab-template-ibizfast/src/main/resources/templ/{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/domain/{{entities@NONE}}.java.hbs
浏览文件 @
2e140383
...
@@ -28,6 +28,7 @@ import java.io.Serializable;
...
@@ -28,6 +28,7 @@ import java.io.Serializable;
import lombok.*;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Transient;
import org.springframework.data.annotation.Transient;
import org.springframework.data.annotation.Id;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
...
@@ -39,7 +40,7 @@ import {{packageName}}.core.{{module}}.domain.{{codeName}};
...
@@ -39,7 +40,7 @@ import {{packageName}}.core.{{module}}.domain.{{codeName}};
@Setter
@Setter
@NoArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@JsonIgnoreProperties(value = "handler")
@ApiModel("
{{
entity
.
logicName
}}
")
@ApiModel(
value = "
{{
entity
.
name
}}
", description =
"
{{
entity
.
logicName
}}
")
public class
{{
entity
.
codeName
}}
extends EntityBase implements Serializable
public class
{{
entity
.
codeName
}}
extends EntityBase implements Serializable
{
{
...
@@ -48,6 +49,9 @@ public class {{entity.codeName}} extends EntityBase implements Serializable
...
@@ -48,6 +49,9 @@ public class {{entity.codeName}} extends EntityBase implements Serializable
/**
/**
*
{{
logicName
}}
*
{{
logicName
}}
*/
*/
{{#if
keyDEField
}}
@Id
{{/if}}
{{#
enableAudit
}}
{{#
enableAudit
}}
@Audit
@Audit
{{/
enableAudit
}}
{{/
enableAudit
}}
...
@@ -60,7 +64,7 @@ public class {{entity.codeName}} extends EntityBase implements Serializable
...
@@ -60,7 +64,7 @@ public class {{entity.codeName}} extends EntityBase implements Serializable
{{#
eq
type
.
java
"Long"
}}
{{#
eq
type
.
java
"Long"
}}
@JsonSerialize(using = ToStringSerializer.class)
@JsonSerialize(using = ToStringSerializer.class)
{{/
eq
}}
{{/
eq
}}
@ApiModelProperty("
{{
logicName
}}
")
@ApiModelProperty(
value = "
{{
columnName
}}
", notes =
"
{{
logicName
}}
")
private
{{
type
.
java
}}
{{
camelCase
codeName
}}
;
private
{{
type
.
java
}}
{{
camelCase
codeName
}}
;
{{/
unless
}}
{{/
unless
}}
...
@@ -72,6 +76,7 @@ public class {{entity.codeName}} extends EntityBase implements Serializable
...
@@ -72,6 +76,7 @@ public class {{entity.codeName}} extends EntityBase implements Serializable
*/
*/
@JSONField(name = "
{{
lowerCase
codeName
}}
")
@JSONField(name = "
{{
lowerCase
codeName
}}
")
@JsonProperty("
{{
lowerCase
codeName
}}
")
@JsonProperty("
{{
lowerCase
codeName
}}
")
@ApiModelProperty(value = "
{{
lowerCase
codeName
}}
", notes = "
{{
logicName
}}
")
private
{{
entityCodeName
}}
{{
camelCase
codeName
}}
;
private
{{
entityCodeName
}}
{{
camelCase
codeName
}}
;
{{/
each
}}
{{/
each
}}
...
@@ -82,9 +87,11 @@ public class {{entity.codeName}} extends EntityBase implements Serializable
...
@@ -82,9 +87,11 @@ public class {{entity.codeName}} extends EntityBase implements Serializable
{{#if
listCode
}}
{{#if
listCode
}}
@JSONField(name = "
{{
listCode
}}
")
@JSONField(name = "
{{
listCode
}}
")
@JsonProperty("
{{
listCode
}}
")
@JsonProperty("
{{
listCode
}}
")
@ApiModelProperty(value = "
{{
lowerCase
listCode
}}
", notes = "
{{
logicName
}}
")
{{else}}
{{else}}
@JsonIgnore
@JsonIgnore
@JSONField(serialize = false)
@JSONField(serialize = false)
@ApiModelProperty(value = "
{{
lowerCase
codeName
}}
", notes = "
{{
logicName
}}
")
{{/if}}
{{/if}}
private List
<
{{
entityCodeName
}}
>
{{
camelCase
codeName
}}
;
private List
<
{{
entityCodeName
}}
>
{{
camelCase
codeName
}}
;
{{/
each
}}
{{/
each
}}
...
...
modules/ibizlab-template/ibizlab-template-ibizfast/src/main/resources/templ/{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/domain/{{entities@SQL}}.java.hbs
浏览文件 @
2e140383
...
@@ -29,6 +29,7 @@ import java.io.Serializable;
...
@@ -29,6 +29,7 @@ import java.io.Serializable;
import lombok.*;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Transient;
import org.springframework.data.annotation.Transient;
import org.springframework.data.annotation.Id;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
...
@@ -43,8 +44,8 @@ import {{packageName}}.core.{{module}}.domain.{{codeName}};
...
@@ -43,8 +44,8 @@ import {{packageName}}.core.{{module}}.domain.{{codeName}};
@NoArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@JsonIgnoreProperties(value = "handler")
@TableName(value = "
{{
entity
.
tableName
}}
", resultMap = "
{{
entity
.
codeName
}}
ResultMap")
@TableName(value = "
{{
entity
.
tableName
}}
", resultMap = "
{{
entity
.
codeName
}}
ResultMap")
@ApiModel("
{{
entity
.
logicName
}}
")
@ApiModel(
value = "
{{
entity
.
name
}}
", description =
"
{{
entity
.
logicName
}}
")
public class
{{
entity
.
codeName
}}
extends
EntityMP
implements Serializable
public class
{{
entity
.
codeName
}}
extends
BaseData
implements Serializable
{
{
{{#
each
entity
.
fields
}}
{{#
each
entity
.
fields
}}
...
@@ -53,6 +54,7 @@ public class {{entity.codeName}} extends EntityMP implements Serializable
...
@@ -53,6 +54,7 @@ public class {{entity.codeName}} extends EntityMP implements Serializable
*
{{
logicName
}}
*
{{
logicName
}}
*/
*/
{{#if
keyDEField
}}
{{#if
keyDEField
}}
@Id
{{#if
phisicalDEField
}}
{{#if
phisicalDEField
}}
@TableId(value = "
{{
columnName
}}
"
{{#
type
.
number
}}
, type = IdType.ASSIGN_ID
{{/
type
.
number
}}{{#
type
.
string
}}
, type = IdType.ASSIGN_UUID
{{/
type
.
string
}}
)
@TableId(value = "
{{
columnName
}}
"
{{#
type
.
number
}}
, type = IdType.ASSIGN_ID
{{/
type
.
number
}}{{#
type
.
string
}}
, type = IdType.ASSIGN_UUID
{{/
type
.
string
}}
)
{{else}}
{{else}}
...
@@ -61,7 +63,7 @@ public class {{entity.codeName}} extends EntityMP implements Serializable
...
@@ -61,7 +63,7 @@ public class {{entity.codeName}} extends EntityMP implements Serializable
{{else}}
{{else}}
@TableField(value = "
{{
columnName
}}
"
{{#
insertOnly
}}
, fill = FieldFill.INSERT
{{/
insertOnly
}}{{^
phisicalDEField
}}
, exist = false
{{/
phisicalDEField
}}
)
@TableField(value = "
{{
columnName
}}
"
{{#
insertOnly
}}
, fill = FieldFill.INSERT
{{/
insertOnly
}}{{^
phisicalDEField
}}
, exist = false
{{/
phisicalDEField
}}
)
{{#
logicValidField
}}
{{#
logicValidField
}}
@TableLogic
{{#
validLogicValue
}}
(value = "
{{
validLogicValue
}}
"
{{#
invalidLogicValue
}}
, delval = "
{{
invalidLogicValue
}}
"
{{/
invalidLogicValue
}}
)
{{/
validLogicValue
}}
@TableLogic
{{#
entity
.
validLogicValue
}}
(value = "
{{
entity
.
validLogicValue
}}
"
{{#
entity
.
invalidLogicValue
}}
, delval = "
{{
entity
.
invalidLogicValue
}}
"
{{/
entity
.
invalidLogicValue
}}
)
{{/
entity
.
validLogicValue
}}
{{/
logicValidField
}}
{{/
logicValidField
}}
{{/if}}
{{/if}}
{{#
enableAudit
}}
{{#
enableAudit
}}
...
@@ -76,7 +78,7 @@ public class {{entity.codeName}} extends EntityMP implements Serializable
...
@@ -76,7 +78,7 @@ public class {{entity.codeName}} extends EntityMP implements Serializable
{{#
eq
type
.
java
"Long"
}}
{{#
eq
type
.
java
"Long"
}}
@JsonSerialize(using = ToStringSerializer.class)
@JsonSerialize(using = ToStringSerializer.class)
{{/
eq
}}
{{/
eq
}}
@ApiModelProperty("
{{
logicName
}}
")
@ApiModelProperty(
value = "
{{
columnName
}}
", notes =
"
{{
logicName
}}
")
private
{{
type
.
java
}}
{{
camelCase
codeName
}}
;
private
{{
type
.
java
}}
{{
camelCase
codeName
}}
;
{{/
unless
}}
{{/
unless
}}
...
@@ -89,6 +91,7 @@ public class {{entity.codeName}} extends EntityMP implements Serializable
...
@@ -89,6 +91,7 @@ public class {{entity.codeName}} extends EntityMP implements Serializable
@JsonIgnore
@JsonIgnore
@JSONField(serialize = false)
@JSONField(serialize = false)
@TableField(exist = false)
@TableField(exist = false)
@ApiModelProperty(value = "
{{
lowerCase
codeName
}}
", notes = "
{{
logicName
}}
")
private
{{
entityCodeName
}}
{{
camelCase
codeName
}}
;
private
{{
entityCodeName
}}
{{
camelCase
codeName
}}
;
{{/
each
}}
{{/
each
}}
...
@@ -105,8 +108,10 @@ public class {{entity.codeName}} extends EntityMP implements Serializable
...
@@ -105,8 +108,10 @@ public class {{entity.codeName}} extends EntityMP implements Serializable
{{/if}}
{{/if}}
{{#if
columnName
}}
{{#if
columnName
}}
@TableField(value = "
{{
columnName
}}
" , typeHandler =
{{
packageName
}}
.core.
{{
module
}}
.domain.handlers.
{{
entityCodeName
}}
TypeHandler.class)
@TableField(value = "
{{
columnName
}}
" , typeHandler =
{{
packageName
}}
.core.
{{
module
}}
.domain.handlers.
{{
entityCodeName
}}
TypeHandler.class)
@ApiModelProperty(value = "
{{
columnName
}}
", notes = "
{{
logicName
}}
")
{{else}}
{{else}}
@TableField(exist = false)
@TableField(exist = false)
@ApiModelProperty(value = "
{{
lowerCase
codeName
}}
", notes = "
{{
logicName
}}
")
{{/if}}
{{/if}}
protected List
<
{{
entityCodeName
}}
>
{{
camelCase
codeName
}}
;
protected List
<
{{
entityCodeName
}}
>
{{
camelCase
codeName
}}
;
{{/
each
}}
{{/
each
}}
...
@@ -120,7 +125,7 @@ public class {{entity.codeName}} extends EntityMP implements Serializable
...
@@ -120,7 +125,7 @@ public class {{entity.codeName}} extends EntityMP implements Serializable
*/
*/
public void set
{{
pascalCase
codeName
}}
(
{{
type
.
java
}}
{{
camelCase
codeName
}}
) {
public void set
{{
pascalCase
codeName
}}
(
{{
type
.
java
}}
{{
camelCase
codeName
}}
) {
this.
{{
camelCase
codeName
}}
=
{{
camelCase
codeName
}}
;
this.
{{
camelCase
codeName
}}
=
{{
camelCase
codeName
}}
;
this.modify("
{{
lowerCase
n
ame
}}
",
{{
camelCase
codeName
}}
);
this.modify("
{{
jsonN
ame
}}
",
{{
camelCase
codeName
}}
);
}
}
{{/
unless
}}
{{/
unless
}}
{{/
unless
}}
{{/
unless
}}
...
@@ -135,7 +140,7 @@ public class {{entity.codeName}} extends EntityMP implements Serializable
...
@@ -135,7 +140,7 @@ public class {{entity.codeName}} extends EntityMP implements Serializable
*/
*/
public void set
{{
pascalCase
codeName
}}
(List
<
{{
entityCodeName
}}
>
{{
camelCase
codeName
}}
) {
public void set
{{
pascalCase
codeName
}}
(List
<
{{
entityCodeName
}}
>
{{
camelCase
codeName
}}
) {
this.
{{
camelCase
codeName
}}
=
{{
camelCase
codeName
}}
;
this.
{{
camelCase
codeName
}}
=
{{
camelCase
codeName
}}
;
this.modify("
{{
columnNam
e
}}
", (
{{
camelCase
codeName
}}
!=null)?
{{
camelCase
codeName
}}
:(new ArrayList()));
this.modify("
{{
listCod
e
}}
", (
{{
camelCase
codeName
}}
!=null)?
{{
camelCase
codeName
}}
:(new ArrayList()));
}
}
{{/
columnName
}}
{{/
columnName
}}
...
...
modules/ibizlab-template/ibizlab-template-ibizfast/src/main/resources/templ/{{projectName}}-core/src/main/java/{{packageName}}/core/{{modules}}/domain/{{entities@ServiceAPI}}.java.hbs
浏览文件 @
2e140383
...
@@ -28,6 +28,7 @@ import java.io.Serializable;
...
@@ -28,6 +28,7 @@ import java.io.Serializable;
import lombok.*;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Transient;
import org.springframework.data.annotation.Transient;
import org.springframework.data.annotation.Id;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
...
@@ -39,8 +40,8 @@ import {{packageName}}.core.{{module}}.domain.{{codeName}};
...
@@ -39,8 +40,8 @@ import {{packageName}}.core.{{module}}.domain.{{codeName}};
@Setter
@Setter
@NoArgsConstructor
@NoArgsConstructor
@JsonIgnoreProperties(value = "handler")
@JsonIgnoreProperties(value = "handler")
@ApiModel("
{{
entity
.
logicName
}}
")
@ApiModel(
value = "
{{
entity
.
name
}}
", description =
"
{{
entity
.
logicName
}}
")
public class
{{
entity
.
codeName
}}
extends
EntityClient
implements Serializable
public class
{{
entity
.
codeName
}}
extends
BaseData
implements Serializable
{
{
{{#
each
entity
.
fields
}}
{{#
each
entity
.
fields
}}
...
@@ -48,6 +49,9 @@ public class {{entity.codeName}} extends EntityClient implements Serializable
...
@@ -48,6 +49,9 @@ public class {{entity.codeName}} extends EntityClient implements Serializable
/**
/**
*
{{
logicName
}}
*
{{
logicName
}}
*/
*/
{{#if
keyDEField
}}
@Id
{{/if}}
{{#
enableAudit
}}
{{#
enableAudit
}}
@Audit
@Audit
{{/
enableAudit
}}
{{/
enableAudit
}}
...
@@ -60,7 +64,7 @@ public class {{entity.codeName}} extends EntityClient implements Serializable
...
@@ -60,7 +64,7 @@ public class {{entity.codeName}} extends EntityClient implements Serializable
{{#
eq
type
.
java
"Long"
}}
{{#
eq
type
.
java
"Long"
}}
@JsonSerialize(using = ToStringSerializer.class)
@JsonSerialize(using = ToStringSerializer.class)
{{/
eq
}}
{{/
eq
}}
@ApiModelProperty("
{{
logicName
}}
")
@ApiModelProperty(
value = "
{{
columnName
}}
", notes =
"
{{
logicName
}}
")
private
{{
type
.
java
}}
{{
camelCase
codeName
}}
;
private
{{
type
.
java
}}
{{
camelCase
codeName
}}
;
{{/
unless
}}
{{/
unless
}}
...
@@ -72,6 +76,7 @@ public class {{entity.codeName}} extends EntityClient implements Serializable
...
@@ -72,6 +76,7 @@ public class {{entity.codeName}} extends EntityClient implements Serializable
*/
*/
@JSONField(name = "
{{
lowerCase
codeName
}}
")
@JSONField(name = "
{{
lowerCase
codeName
}}
")
@JsonProperty("
{{
lowerCase
codeName
}}
")
@JsonProperty("
{{
lowerCase
codeName
}}
")
@ApiModelProperty(value = "
{{
lowerCase
codeName
}}
", notes = "
{{
logicName
}}
")
private
{{
entityCodeName
}}
{{
camelCase
codeName
}}
;
private
{{
entityCodeName
}}
{{
camelCase
codeName
}}
;
{{/
each
}}
{{/
each
}}
...
@@ -82,10 +87,12 @@ public class {{entity.codeName}} extends EntityClient implements Serializable
...
@@ -82,10 +87,12 @@ public class {{entity.codeName}} extends EntityClient implements Serializable
{{#if
listCode
}}
{{#if
listCode
}}
@JSONField(name = "
{{
listCode
}}
")
@JSONField(name = "
{{
listCode
}}
")
@JsonProperty("
{{
listCode
}}
")
@JsonProperty("
{{
listCode
}}
")
{{else}}
@ApiModelProperty(value = "
{{
lowerCase
listCode
}}
", notes = "
{{
logicName
}}
")
{{else}}
@JsonIgnore
@JsonIgnore
@JSONField(serialize = false)
@JSONField(serialize = false)
{{/if}}
@ApiModelProperty(value = "
{{
lowerCase
codeName
}}
", notes = "
{{
logicName
}}
")
{{/if}}
private List
<
{{
entityCodeName
}}
>
{{
camelCase
codeName
}}
;
private List
<
{{
entityCodeName
}}
>
{{
camelCase
codeName
}}
;
{{/
each
}}
{{/
each
}}
...
@@ -98,7 +105,7 @@ public class {{entity.codeName}} extends EntityClient implements Serializable
...
@@ -98,7 +105,7 @@ public class {{entity.codeName}} extends EntityClient implements Serializable
*/
*/
public void set
{{
pascalCase
codeName
}}
(
{{
type
.
java
}}
{{
camelCase
codeName
}}
) {
public void set
{{
pascalCase
codeName
}}
(
{{
type
.
java
}}
{{
camelCase
codeName
}}
) {
this.
{{
camelCase
codeName
}}
=
{{
camelCase
codeName
}}
;
this.
{{
camelCase
codeName
}}
=
{{
camelCase
codeName
}}
;
this.modify("
{{
lowerCase
code
Name
}}
",
{{
camelCase
codeName
}}
);
this.modify("
{{
json
Name
}}
",
{{
camelCase
codeName
}}
);
}
}
{{/
unless
}}
{{/
unless
}}
{{/
unless
}}
{{/
unless
}}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录