Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
35132d4d
提交
35132d4d
编写于
8月 15, 2022
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
aipvo
上级
4511ad75
变更
13
显示空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
152 行增加
和
207 行删除
+152
-207
AppEntityModel.java
...rc/main/java/cn/ibizlab/codegen/model/AppEntityModel.java
+5
-0
AppModel.java
...core/src/main/java/cn/ibizlab/codegen/model/AppModel.java
+4
-3
Option.java
...r-core/src/main/java/cn/ibizlab/codegen/model/Option.java
+1
-1
VoFieldModel.java
.../src/main/java/cn/ibizlab/codegen/model/VoFieldModel.java
+7
-3
pom.xml.hbs
.../src/main/resources/templ/{{projectName}}-api/pom.xml.hbs
+0
-3
{{pascalCase ctrls@FORM}}AddDto.java.hbs
...se appEntities}}/{{pascalCase ctrls@FORM}}AddDto.java.hbs
+6
-5
{{pascalCase ctrls@FORM}}BaseDto.java.hbs
...e appEntities}}/{{pascalCase ctrls@FORM}}BaseDto.java.hbs
+6
-6
{{pascalCase ctrls@FORM}}Dto.java.hbs
...lCase appEntities}}/{{pascalCase ctrls@FORM}}Dto.java.hbs
+5
-4
{{pascalCase ctrls@FORM}}UpdateDto.java.hbs
...appEntities}}/{{pascalCase ctrls@FORM}}UpdateDto.java.hbs
+58
-0
pom.xml.hbs
...src/main/resources/templ/{{projectName}}-rest/pom.xml.hbs
+2
-0
{{dicts}}Dict.java.hbs
.../{{packageName}}/api/{{apps}}/dict/{{dicts}}Dict.java.hbs
+0
-63
{{pascalCase appEntities}}Resource.java.hbs
...{{apps}}/rest/{{pascalCase appEntities}}Resource.java.hbs
+58
-0
pom.xml.hbs
...src/main/resources/templ/{{projectName}}-boot/pom.xml.hbs
+0
-119
未找到文件。
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/AppEntityModel.java
浏览文件 @
35132d4d
...
@@ -10,6 +10,7 @@ import lombok.experimental.Accessors;
...
@@ -10,6 +10,7 @@ import lombok.experimental.Accessors;
import
net.ibizsys.model.app.dataentity.IPSAppDataEntity
;
import
net.ibizsys.model.app.dataentity.IPSAppDataEntity
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Getter
@Getter
@Setter
@Setter
...
@@ -193,4 +194,8 @@ public class AppEntityModel extends BaseModel{
...
@@ -193,4 +194,8 @@ public class AppEntityModel extends BaseModel{
*/
*/
public
List
<
JSONObject
>
appDEUIActions
=
new
ArrayList
<>();
public
List
<
JSONObject
>
appDEUIActions
=
new
ArrayList
<>();
public
Collection
<
CtrlModel
>
getForms
()
{
return
ctrlsMap
.
values
().
stream
().
filter
(
item
->
item
.
getControl
().
getControlType
().
equals
(
"FORM"
)).
collect
(
Collectors
.
toList
());
}
}
}
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/AppModel.java
浏览文件 @
35132d4d
...
@@ -17,6 +17,7 @@ import java.io.IOException;
...
@@ -17,6 +17,7 @@ import java.io.IOException;
import
java.nio.file.Files
;
import
java.nio.file.Files
;
import
java.nio.file.Paths
;
import
java.nio.file.Paths
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Getter
@Getter
@Setter
@Setter
...
@@ -100,7 +101,6 @@ public class AppModel extends BaseModel{
...
@@ -100,7 +101,6 @@ public class AppModel extends BaseModel{
}
}
public
PageModel
getPage
(
String
codeName
)
public
PageModel
getPage
(
String
codeName
)
{
{
if
(
pagesMap
!=
null
)
if
(
pagesMap
!=
null
)
...
@@ -201,9 +201,10 @@ public class AppModel extends BaseModel{
...
@@ -201,9 +201,10 @@ public class AppModel extends BaseModel{
catalog
.
setCodeItem
(
codeList
.
getPSCodeItems
());
catalog
.
setCodeItem
(
codeList
.
getPSCodeItems
());
}
}
}
}
if
(!
ObjectUtils
.
isEmpty
(
catalog
.
getOptions
()))
if
(!
ObjectUtils
.
isEmpty
(
catalog
.
getOptions
()))
{
catalog
.
setOpt
(
codeList
);
catalog
.
setOpt
(
codeList
);
dictMaps
.
put
(
catalog
.
getCodeName
(),
catalog
);
dictMaps
.
put
(
catalog
.
getCodeName
(),
catalog
);
}
});
});
}
}
}
}
...
...
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/Option.java
浏览文件 @
35132d4d
...
@@ -62,7 +62,7 @@ public class Option
...
@@ -62,7 +62,7 @@ public class Option
.
replace
(
"。"
,
""
).
replace
(
";"
,
""
)
.
replace
(
"。"
,
""
).
replace
(
";"
,
""
)
.
replace
(
";"
,
""
).
replace
(
"-"
,
""
)
.
replace
(
";"
,
""
).
replace
(
"-"
,
""
)
.
replace
(
","
,
""
).
replace
(
"\\"
,
""
)
.
replace
(
","
,
""
).
replace
(
"\\"
,
""
)
.
replace
(
"/"
,
""
).
replace
(
","
,
""
);
.
replace
(
"/"
,
""
).
replace
(
","
,
""
)
.
replace
(
"%"
,
""
)
;
return
name
;
return
name
;
}
}
...
...
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/VoFieldModel.java
浏览文件 @
35132d4d
...
@@ -110,6 +110,10 @@ public class VoFieldModel extends BaseModel {
...
@@ -110,6 +110,10 @@ public class VoFieldModel extends BaseModel {
if
(
codeListEditor
.
getPSAppCodeList
()!=
null
)
{
if
(
codeListEditor
.
getPSAppCodeList
()!=
null
)
{
dictCodeName
=
codeListEditor
.
getPSAppCodeList
().
getCodeName
();
dictCodeName
=
codeListEditor
.
getPSAppCodeList
().
getCodeName
();
dict
=
this
.
getVoModel
().
getApp
().
getDictMaps
().
get
(
dictCodeName
);
dict
=
this
.
getVoModel
().
getApp
().
getDictMaps
().
get
(
dictCodeName
);
if
(
dict
==
null
)
{
dictCodeName
=
""
;
}
if
(
"treempick"
.
equalsIgnoreCase
(
codeListEditor
.
getEditorType
())||
codeListEditor
instanceof
IPSMDropDownList
if
(
"treempick"
.
equalsIgnoreCase
(
codeListEditor
.
getEditorType
())||
codeListEditor
instanceof
IPSMDropDownList
||
codeListEditor
instanceof
IPSCheckBoxList
)
||
codeListEditor
instanceof
IPSCheckBoxList
)
singleSelect
=
false
;
singleSelect
=
false
;
...
@@ -190,7 +194,7 @@ public class VoFieldModel extends BaseModel {
...
@@ -190,7 +194,7 @@ public class VoFieldModel extends BaseModel {
if
(
ObjectUtils
.
isEmpty
(
dv
))
{
if
(
ObjectUtils
.
isEmpty
(
dv
))
{
dv
=
getUpdateDefaultValue
();
dv
=
getUpdateDefaultValue
();
}
}
return
getDefaultValue
(
dv
)
;
return
dv
;
}
}
public
String
getDefaultValue
(
String
dv
)
{
public
String
getDefaultValue
(
String
dv
)
{
if
(!
ObjectUtils
.
isEmpty
(
dv
))
{
if
(!
ObjectUtils
.
isEmpty
(
dv
))
{
...
@@ -202,7 +206,7 @@ public class VoFieldModel extends BaseModel {
...
@@ -202,7 +206,7 @@ public class VoFieldModel extends BaseModel {
.
replace
(
"。"
,
""
).
replace
(
";"
,
""
)
.
replace
(
"。"
,
""
).
replace
(
";"
,
""
)
.
replace
(
";"
,
""
).
replace
(
"-"
,
""
)
.
replace
(
";"
,
""
).
replace
(
"-"
,
""
)
.
replace
(
","
,
""
).
replace
(
"\\"
,
""
)
.
replace
(
","
,
""
).
replace
(
"\\"
,
""
)
.
replace
(
"/"
,
""
).
replace
(
","
,
""
);
.
replace
(
"/"
,
""
).
replace
(
","
,
""
)
.
replace
(
"%"
,
""
)
;
if
(!
this
.
isSingleSelect
())
if
(!
this
.
isSingleSelect
())
return
""
;
return
""
;
}
}
...
@@ -224,7 +228,7 @@ public class VoFieldModel extends BaseModel {
...
@@ -224,7 +228,7 @@ public class VoFieldModel extends BaseModel {
if
(!
this
.
isSingleSelect
()&&
this
.
getDict
().
getOptions
().
size
()>
1
)
if
(!
this
.
isSingleSelect
()&&
this
.
getDict
().
getOptions
().
size
()>
1
)
{
{
example
+=
this
.
getDict
().
getCodeList
().
getValueSeparator
()==
null
?
";"
:
this
.
getDict
().
getCodeList
().
getValueSeparator
();
example
+=
this
.
getDict
().
getCodeList
().
getValueSeparator
()==
null
?
";"
:
this
.
getDict
().
getCodeList
().
getValueSeparator
();
example
+=
this
.
getDict
().
getOptions
().
get
(
0
).
getValue
().
toString
();
example
+=
this
.
getDict
().
getOptions
().
get
(
1
).
getValue
().
toString
();
}
}
}
}
return
example
;
return
example
;
...
...
modules/ibizlab-template/ibizlab-template-apivo/src/main/resources/templ/{{projectName}}-api/pom.xml.hbs
浏览文件 @
35132d4d
...
@@ -24,13 +24,10 @@
...
@@ -24,13 +24,10 @@
<dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<artifactId>
lombok
</artifactId>
<version>
1.18.12
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
io.swagger
</groupId>
<groupId>
io.swagger
</groupId>
<artifactId>
swagger-annotations
</artifactId>
<artifactId>
swagger-annotations
</artifactId>
<version>
1.6.2
</version>
<scope>
compile
</scope>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
jakarta.validation
</groupId>
<groupId>
jakarta.validation
</groupId>
...
...
modules/ibizlab-template/ibizlab-template-apivo/src/main/resources/templ/{{projectName}}-api/src/main/java/{{packageName}}/api/{{apps}}/dto/{{pascalCase appEntities}}/{{pascalCase ctrls@FORM}}
Sys
Dto.java.hbs
→
modules/ibizlab-template/ibizlab-template-apivo/src/main/resources/templ/{{projectName}}-api/src/main/java/{{packageName}}/api/{{apps}}/dto/{{pascalCase appEntities}}/{{pascalCase ctrls@FORM}}
Add
Dto.java.hbs
浏览文件 @
35132d4d
...
@@ -25,19 +25,19 @@ import io.swagger.annotations.ApiModelProperty;
...
@@ -25,19 +25,19 @@ import io.swagger.annotations.ApiModelProperty;
import
{{
packageName
}}
.api.
{{
apps
}}
.dict.*;
import
{{
packageName
}}
.api.
{{
apps
}}
.dict.*;
/**
/**
*
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
DTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
*
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
Add
DTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
*/
*/
@Getter
@Getter
@Setter
@Setter
@NoArgsConstructor
@NoArgsConstructor
@AllArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ApiModel(value = "
{{
ctrl
.
appEntity
.
entity
.
codeName
}}
-
{{
ctrl
.
codeName
}}
-Add", description = "
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
AddDTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
")
@ApiModel(value = "
{{
appEntities
}}
-
{{
ctrl
.
codeName
}}
", description = "
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
DTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
")
public class
{{
pascalCase
ctrl
.
codeName
}}
AddDto extends
{{
pascalCase
ctrl
.
codeName
}}
BaseDto {
public class
{{
pascalCase
ctrl
.
codeName
}}
Dto implements Serializable {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
{{#
each
ctrl
.
voItems
}}
{{#
each
ctrl
.
voItems
}}
{{#if
createDefaultValue
}}
/**
/**
*
{{
logicName
}}
*
{{
logicName
}}
*/
*/
...
@@ -50,8 +50,9 @@ public class {{pascalCase ctrl.codeName}}Dto implements Serializable {
...
@@ -50,8 +50,9 @@ public class {{pascalCase ctrl.codeName}}Dto implements Serializable {
@JsonSerialize(using = ToStringSerializer.class)
@JsonSerialize(using = ToStringSerializer.class)
{{/
eq
}}
{{/
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
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}}
)
pr
ivate
{{
javaType
}}
{{
camelCase
codeName
}}
{{#if
defaultValue
}}
=
{{
d
efaultValue
}}{{/if}}
;
pr
otected
{{
javaType
}}
{{
camelCase
codeName
}}
{{#if
createDefaultValue
}}
=
{{
createD
efaultValue
}}{{/if}}
;
{{/if}}
{{/
each
}}
{{/
each
}}
}
}
{{/
eq
}}
{{/
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}}BaseDto.java.hbs
浏览文件 @
35132d4d
...
@@ -25,19 +25,18 @@ import io.swagger.annotations.ApiModelProperty;
...
@@ -25,19 +25,18 @@ import io.swagger.annotations.ApiModelProperty;
import
{{
packageName
}}
.api.
{{
apps
}}
.dict.*;
import
{{
packageName
}}
.api.
{{
apps
}}
.dict.*;
/**
/**
*
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
DTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
*
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
Base
DTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
*/
*/
@Getter
@Getter
@Setter
@Setter
@NoArgsConstructor
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "
{{
ctrl
.
appEntity
.
entity
.
codeName
}}
-
{{
ctrl
.
codeName
}}
-Base", description = "
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
BaseDTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
")
@Accessors(chain = true)
public class
{{
pascalCase
ctrl
.
codeName
}}
BaseDto implements Serializable {
@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;
private static final long serialVersionUID = 1L;
{{#
each
ctrl
.
voItems
}}
{{#
each
ctrl
.
voItems
}}
{{#
unless
hidden
}}
/**
/**
*
{{
logicName
}}
*
{{
logicName
}}
*/
*/
...
@@ -50,8 +49,9 @@ public class {{pascalCase ctrl.codeName}}Dto implements Serializable {
...
@@ -50,8 +49,9 @@ public class {{pascalCase ctrl.codeName}}Dto implements Serializable {
@JsonSerialize(using = ToStringSerializer.class)
@JsonSerialize(using = ToStringSerializer.class)
{{/
eq
}}
{{/
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
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}}
)
pr
ivate
{{
javaType
}}
{{
camelCase
codeName
}}
{{#if
defaultValue
}}
=
{{
defaultValue
}}{{/if
}}
;
pr
otected
{{
javaType
}}
{{
camelCase
codeName
}}
;
{{/
unless
}}
{{/
each
}}
{{/
each
}}
}
}
{{/
eq
}}
{{/
eq
}}
\ No newline at end of file
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
→
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
浏览文件 @
35132d4d
...
@@ -31,13 +31,13 @@ import {{packageName}}.api.{{apps}}.dict.*;
...
@@ -31,13 +31,13 @@ import {{packageName}}.api.{{apps}}.dict.*;
@Setter
@Setter
@NoArgsConstructor
@NoArgsConstructor
@AllArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ApiModel(value = "
{{
ctrl
.
appEntity
.
entity
.
codeName
}}
-
{{
ctrl
.
codeName
}}
", description = "
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
DTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
")
@ApiModel(value = "
{{
appEntities
}}
-
{{
ctrl
.
codeName
}}
", description = "
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
DTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
")
public class
{{
pascalCase
ctrl
.
codeName
}}
Dto extends
{{
pascalCase
ctrl
.
codeName
}}
BaseDto {
public class
{{
pascalCase
ctrl
.
codeName
}}
Dto implements Serializable {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
{{#
each
ctrl
.
voItems
}}
{{#
each
ctrl
.
voItems
}}
{{#if
hidden
}}
/**
/**
*
{{
logicName
}}
*
{{
logicName
}}
*/
*/
...
@@ -50,8 +50,9 @@ public class {{pascalCase ctrl.codeName}}Dto implements Serializable {
...
@@ -50,8 +50,9 @@ public class {{pascalCase ctrl.codeName}}Dto implements Serializable {
@JsonSerialize(using = ToStringSerializer.class)
@JsonSerialize(using = ToStringSerializer.class)
{{/
eq
}}
{{/
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
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}}
)
pr
ivate
{{
javaType
}}
{{
camelCase
codeName
}}
{{#if
defaultValue
}}
=
{{
defaultValue
}}{{/if
}}
;
pr
otected
{{
javaType
}}
{{
camelCase
codeName
}}
;
{{/if}}
{{/
each
}}
{{/
each
}}
}
}
{{/
eq
}}
{{/
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}}UpdateDto.java.hbs
0 → 100644
浏览文件 @
35132d4d
{{#
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
}}
UpdateDTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
*/
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@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 {
private static final long serialVersionUID = 1L;
{{#
each
ctrl
.
voItems
}}
{{#if
updateDefaultValue
}}
/**
*
{{
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}}
)
protected
{{
javaType
}}
{{
camelCase
codeName
}}
{{#if
updateDefaultValue
}}
=
{{
updateDefaultValue
}}{{/if}}
;
{{/if}}
{{/
each
}}
}
{{/
eq
}}
\ No newline at end of file
modules/ibizlab-template/ibizlab-template-apivo/src/main/resources/templ/{{projectName}}-rest/pom.xml.hbs
浏览文件 @
35132d4d
...
@@ -16,10 +16,12 @@
...
@@ -16,10 +16,12 @@
<dependency>
<dependency>
<groupId>
{{
packageName
}}
</groupId>
<groupId>
{{
packageName
}}
</groupId>
<artifactId>
{{
projectName
}}
-api
</artifactId>
<artifactId>
{{
projectName
}}
-api
</artifactId>
<version>
{{
system
.
pub
.
versionString
}}
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
{{
packageName
}}
</groupId>
<groupId>
{{
packageName
}}
</groupId>
<artifactId>
{{
projectName
}}
-core
</artifactId>
<artifactId>
{{
projectName
}}
-core
</artifactId>
<version>
{{
system
.
pub
.
versionString
}}
</version>
</dependency>
</dependency>
</dependencies>
</dependencies>
<build>
<build>
...
...
modules/ibizlab-template/ibizlab-template-apivo/src/main/resources/templ/{{projectName}}-rest/src/main/java/{{packageName}}/api/{{apps}}/dict/{{dicts}}Dict.java.hbs
已删除
100644 → 0
浏览文件 @
4511ad75
{{#
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}}-rest/src/main/java/{{packageName}}/api/{{apps}}/rest/{{pascalCase appEntities}}Resource.java.hbs
0 → 100644
浏览文件 @
35132d4d
{{#
eq
apps
"link"
}}
package
{{
packageName
}}
.api.
{{
apps
}}
.rest;
import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.math.BigInteger;
import java.util.HashMap;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cglib.beans.BeanCopier;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.http.HttpStatus;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.util.StringUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.access.prepost.PostAuthorize;
import org.springframework.validation.annotation.Validated;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiParam;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import
{{
packageName
}}
.api.
{{
apps
}}
.dto.
{{
pascalCase
appEntities
}}
.*;
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
}}
")
public class
{{
pascalCase
appEntity
.
codeName
}}
Resource {
{{#
each
appEntity
.
forms
}}
@ApiOperation(value = "新建[
{{
codeName
}}
]
{{
replace
logicName
"表单"
""
}}
", tags = {"
{{
appEntity
.
entity
.
logicName
}}
" }, notes = "新建[
{{
codeName
}}
]
{{
replace
logicName
"表单"
""
}}
")
@RequestMapping(method = RequestMethod.POST, value = "/
{{
lowerCase
codeName
}}
")
public ResponseEntity
<
{{
pascalCase
codeName
}}
Dto>
add
{{
pascalCase
codeName
}}
(@Validated @RequestBody
{{
pascalCase
codeName
}}
AddDto dto) {
return null;
}
@ApiOperation(value = "更新[
{{
codeName
}}
]
{{
replace
logicName
"表单"
""
}}
", tags = {"
{{
appEntity
.
entity
.
logicName
}}
" }, notes = "更新[
{{
codeName
}}
]
{{
replace
logicName
"表单"
""
}}
")
@RequestMapping(method = RequestMethod.PUT, value = "/
{{
lowerCase
codeName
}}
/{id}")
public ResponseEntity
<
{{
pascalCase
codeName
}}
Dto>
update
{{
pascalCase
codeName
}}
(@ApiParam("
{{
appEntity
.
entity
.
keyField
.
logicName
}}
") @PathVariable("{id}")
{{
appEntity
.
entity
.
keyField
.
type
.
java
}}
{{
camelCase
appEntity
.
entity
.
keyField
.
codeName
}}
,@Validated @RequestBody
{{
pascalCase
codeName
}}
UpdateDto dto) {
return null;
}
{{/
each
}}
}
{{/
eq
}}
\ No newline at end of file
modules/ibizlab-template/ibizlab-template-ibizedge/src/main/resources/templ/{{projectName}}-boot/pom.xml.hbs
已删除
100644 → 0
浏览文件 @
4511ad75
<?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
}}
-boot
</artifactId>
<name>
{{
projectDesc
}}
Boot
</name>
<description>
{{
projectDesc
}}
Boot
</description>
<dependencies>
<dependency>
<groupId>
{{
packageName
}}
</groupId>
<artifactId>
{{
projectName
}}
-core
</artifactId>
<version>
${project.version}
</version>
</dependency>
</dependencies>
<profiles>
<profile>
<id>
runtime
</id>
<build>
<resources>
<resource>
<directory>
${basedir}/src/main/resources
</directory>
<includes>
<include>
**/**
</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<configuration>
<finalName>
{{
projectName
}}
-boot
</finalName>
<jvmArguments>
-Dfile.encoding=UTF-8
</jvmArguments>
<mainClass>
{{
packageName
}}
.BootApplication
</mainClass>
<outputDirectory>
../
</outputDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<resources>
<resource>
<directory>
${basedir}/src/main/resources
</directory>
<includes>
<include>
**/**
</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<configuration>
<finalName>
{{
projectName
}}
-boot
</finalName>
<jvmArguments>
-Dfile.encoding=UTF-8
</jvmArguments>
<mainClass>
{{
packageName
}}
.BootApplication
</mainClass>
<outputDirectory>
../
</outputDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
cn.ibizlab
</groupId>
<artifactId>
ibizlab-generator-plugin
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<configuration>
<output>
../
</output>
<inputSpec>
${basedir}/src/main/resources/static/remotemodel
</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-ibizedge
</artifactId>
<version>
1.0-SNAPSHOT
</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录