Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibizlab-generator
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibizlab-generator
提交
1d06780b
提交
1d06780b
编写于
8月 29, 2022
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
列重复bug
上级
325c7698
变更
8
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
62 行增加
和
16 行删除
+62
-16
VoFieldModel.java
.../src/main/java/cn/ibizlab/codegen/model/VoFieldModel.java
+12
-0
{{dicts}}Dict.java.hbs
.../{{packageName}}/api/{{apps}}/dict/{{dicts}}Dict.java.hbs
+2
-0
{{pascalCase ctrls@FORM}}AddDto.java.hbs
...se appEntities}}/{{pascalCase ctrls@FORM}}AddDto.java.hbs
+3
-0
{{pascalCase ctrls@FORM}}BaseDto.java.hbs
...e appEntities}}/{{pascalCase ctrls@FORM}}BaseDto.java.hbs
+23
-0
{{pascalCase ctrls@FORM}}Dto.java.hbs
...lCase appEntities}}/{{pascalCase ctrls@FORM}}Dto.java.hbs
+3
-0
{{pascalCase ctrls@FORM}}UpdateDto.java.hbs
...appEntities}}/{{pascalCase ctrls@FORM}}UpdateDto.java.hbs
+3
-0
{{entities@SQL}}Mapper.xml.hbs
...r/{{modules}}/{{entities}}/{{entities@SQL}}Mapper.xml.hbs
+8
-8
{{entities@SQL}}Mapper.xml.hbs
...r/{{modules}}/{{entities}}/{{entities@SQL}}Mapper.xml.hbs
+8
-8
未找到文件。
modules/ibizlab-generator-core/src/main/java/cn/ibizlab/codegen/model/VoFieldModel.java
浏览文件 @
1d06780b
...
...
@@ -94,6 +94,14 @@ public class VoFieldModel extends BaseModel {
private
String
javaType
;
private
boolean
singleFile
=
false
;
private
boolean
fileList
=
false
;
private
boolean
singleDict
=
false
;
private
boolean
dictList
=
false
;
public
String
getJavaType
()
{
if
(
javaType
==
null
)
...
...
@@ -105,6 +113,7 @@ public class VoFieldModel extends BaseModel {
javaType
=
javaType
+
".LIST"
;
formatShape
=
"STRING"
;
serializeUsing
=
"com.alibaba.fastjson.serializer.ToStringSerializer.class"
;
dictList
=
true
;
}
else
{
javaType
=
javaType
+
".ENUM"
;
...
...
@@ -112,16 +121,19 @@ public class VoFieldModel extends BaseModel {
formatShape
=
"NUMBER"
;
else
formatShape
=
"STRING"
;
singleDict
=
true
;
}
}
else
if
(
this
.
getPSEditor
()!=
null
&&(
this
.
getPSDEFormItem
()
instanceof
IPSFileUploader
||
"FILEUPLOADER"
.
equals
(
this
.
getPSEditor
().
getEditorType
())))
{
javaType
=
"List<FileDto>"
;
fileList
=
true
;
}
else
if
(
this
.
getPSEditor
()!=
null
&&(
"hfh"
.
equals
(
this
.
getPSEditor
().
getEditorStyle
())||
"zp"
.
equals
(
this
.
getPSEditor
().
getEditorStyle
())))
{
javaType
=
"FileDto"
;
serializeUsing
=
"com.alibaba.fastjson.serializer.ToStringSerializer.class"
;
singleFile
=
true
;
}
}
return
javaType
;
...
...
modules/ibizlab-template/ibizlab-template-apivo/src/main/resources/templ/{{projectName}}-api/src/main/java/{{packageName}}/api/{{apps}}/dict/{{dicts}}Dict.java.hbs
浏览文件 @
1d06780b
...
...
@@ -101,6 +101,8 @@ public class {{pascalCase dict.codeName}}Dict {
@JsonCreator
@JSONCreator
public static LIST form(Object tags) {
if(tags==null)
return null;
LIST list=new LIST();
Arrays.asList(tags.toString().split(";|,")).forEach(tag->{
ENUM item=ENUM.from(tag);
...
...
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
浏览文件 @
1d06780b
...
...
@@ -13,7 +13,9 @@ 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.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
...
...
@@ -30,6 +32,7 @@ import {{packageName}}.api.{{apps}}.dict.*;
*
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
AddDTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel(value = "
{{
ctrl
.
apiModelName
}}
AddDto", description = "
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
-
{{
pascalCase
ctrl
.
codeName
}}
AddDto-
{{
replace
ctrl
.
logicName
"表单"
""
}}
")
public class
{{
pascalCase
ctrl
.
codeName
}}
AddDto extends
{{
pascalCase
ctrl
.
codeName
}}
BaseDto {
...
...
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
浏览文件 @
1d06780b
...
...
@@ -13,7 +13,9 @@ 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.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
...
...
@@ -31,6 +33,7 @@ import {{packageName}}.api.{{apps}}.dict.*;
*
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
BaseDTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel(value = "
{{
ctrl
.
apiModelName
}}
BaseDto", description = "
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
-
{{
pascalCase
ctrl
.
codeName
}}
BaseDto-
{{
replace
ctrl
.
logicName
"表单"
""
}}
")
public class
{{
pascalCase
ctrl
.
codeName
}}
BaseDto implements Serializable {
...
...
@@ -55,6 +58,26 @@ public class {{pascalCase ctrl.codeName}}BaseDto implements Serializable {
{{/
eq
}}
@ApiModelProperty(value = "
{{
logicName
}}{{#if
userTag
}}
,
{{
userTag
}}{{/if}}{{#if
dict
}}
,
{{#
unless
singleSelect
}}
多选
{{/
unless
}}
【字典:
{{
dict
.
name
}}
】
{{/if}}{{#if
timeType
}}
,格式:
{{
format
}}{{/if}}
", position =
{{
position
}}{{#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
dictList
}}
public void set
{{
pascalCase
codeName
}}
(String
{{
camelCase
codeName
}}
) {
this.
{{
camelCase
codeName
}}
=
{{
javaType
}}
.form(
{{
camelCase
codeName
}}
);
}
{{/if}}
{{#if
singleFile
}}
public void set
{{
pascalCase
codeName
}}
(String
{{
camelCase
codeName
}}
) {
if(
{{
camelCase
codeName
}}
==null)
return;
FileDto fileDto = new FileDto(
{{
camelCase
codeName
}}
,null,null);
this.
{{
camelCase
codeName
}}
= fileDto;
}
{{/if}}
{{#if
fileList
}}
public void set
{{
pascalCase
codeName
}}
(String
{{
camelCase
codeName
}}
) {
if(
{{
camelCase
codeName
}}
==null)
return;
this.
{{
camelCase
codeName
}}
= JSON.parseArray(
{{
camelCase
codeName
}}
,FileDto.class);
}
{{/if}}
{{/
unless
}}
{{/
each
}}
...
...
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
浏览文件 @
1d06780b
...
...
@@ -13,7 +13,9 @@ 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.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
...
...
@@ -30,6 +32,7 @@ import {{packageName}}.api.{{apps}}.dict.*;
*
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
DTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel(value = "
{{
ctrl
.
apiModelName
}}
Dto", description = "
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
-
{{
pascalCase
ctrl
.
codeName
}}
Dto-
{{
replace
ctrl
.
logicName
"表单"
""
}}
")
public class
{{
pascalCase
ctrl
.
codeName
}}
Dto extends
{{
pascalCase
ctrl
.
codeName
}}
BaseDto {
...
...
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
浏览文件 @
1d06780b
...
...
@@ -13,7 +13,9 @@ 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.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.annotation.JSONField;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
...
...
@@ -30,6 +32,7 @@ import {{packageName}}.api.{{apps}}.dict.*;
*
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
UpdateDTO对象[
{{
ctrl
.
codeName
}}
]
{{
replace
ctrl
.
logicName
"表单"
""
}}
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
@ApiModel(value = "
{{
ctrl
.
apiModelName
}}
UpdateDto", description = "
{{
ctrl
.
appEntity
.
entity
.
logicName
}}
-
{{
pascalCase
ctrl
.
codeName
}}
UpdateDto-
{{
replace
ctrl
.
logicName
"表单"
""
}}
")
public class
{{
pascalCase
ctrl
.
codeName
}}
UpdateDto extends
{{
pascalCase
ctrl
.
codeName
}}
BaseDto {
...
...
modules/ibizlab-template/ibizlab-template-ibizboot/src/main/resources/templ/{{projectName}}-core/src/main/resources/mapper/{{modules}}/{{entities}}/{{entities@SQL}}Mapper.xml.hbs
浏览文件 @
1d06780b
...
...
@@ -44,9 +44,9 @@
where
{{#if
entity
.
logicValid
}}
{{#if
entity
.
logicValidField
.
type
.
number
}}
{{
entity
.
logicValidField
.
columnName
}}
=
{{
entity
.
validLogicValue
}}
t1.
{{
entity
.
logicValidField
.
columnName
}}
=
{{
entity
.
validLogicValue
}}
{{else}}
{{
entity
.
logicValidField
.
columnName
}}
= '
{{
entity
.
validLogicValue
}}
'
t1.
{{
entity
.
logicValidField
.
columnName
}}
= '
{{
entity
.
validLogicValue
}}
'
{{/if}}
and
{{/if}}
...
...
@@ -67,14 +67,14 @@
where
{{#if
entity
.
logicValid
}}
{{#if
entity
.
logicValidField
.
type
.
number
}}
{{
entity
.
logicValidField
.
columnName
}}
=
{{
entity
.
validLogicValue
}}
t1.
{{
entity
.
logicValidField
.
columnName
}}
=
{{
entity
.
validLogicValue
}}
{{else}}
{{
entity
.
logicValidField
.
columnName
}}
= '
{{
entity
.
validLogicValue
}}
'
t1.
{{
entity
.
logicValidField
.
columnName
}}
= '
{{
entity
.
validLogicValue
}}
'
{{/if}}
and
{{/if}}
{{/if}}
(
{{#
each
entity
.
keyFields
as
|
field
|
}}{{#
unless
@first
}}
and
{{/
unless
}}{{
field
.
columnName
}}
= #{
{{
camelCase
field
.
codeName
}}
}
{{/
each
}}
)
(
{{#
each
entity
.
keyFields
as
|
field
|
}}{{#
unless
@first
}}
and
{{/
unless
}}
t1.
{{
field
.
columnName
}}
= #{
{{
camelCase
field
.
codeName
}}
}
{{/
each
}}
)
</select>
<select
id=
"selectEntities"
parameterType=
"java.util.List"
resultMap=
"
{{
entity
.
codeName
}}
ResultMap"
>
...
...
@@ -90,14 +90,14 @@
where
{{#if
entity
.
logicValid
}}
{{#if
entity
.
logicValidField
.
type
.
number
}}
{{
entity
.
logicValidField
.
columnName
}}
=
{{
entity
.
validLogicValue
}}
t1.
{{
entity
.
logicValidField
.
columnName
}}
=
{{
entity
.
validLogicValue
}}
{{else}}
{{
entity
.
logicValidField
.
columnName
}}
= '
{{
entity
.
validLogicValue
}}
'
t1.
{{
entity
.
logicValidField
.
columnName
}}
= '
{{
entity
.
validLogicValue
}}
'
{{/if}}
and
{{/if}}
{{/if}}
(
{{#
each
entity
.
keyFields
as
|
field
|
}}{{#
unless
@first
}}
,
{{/
unless
}}{{
field
.
columnName
}}{{/
each
}}
)
(
{{#
each
entity
.
keyFields
as
|
field
|
}}{{#
unless
@first
}}
,
{{/
unless
}}
t1.
{{
field
.
columnName
}}{{/
each
}}
)
in (
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
{{#
each
entity
.
keyFields
as
|
field
|
}}{{#
unless
@first
}}
,
{{/
unless
}}
#{ item.
{{
camelCase
field
.
codeName
}}
}
{{/
each
}}
)
</foreach>
)
</select>
...
...
modules/ibizlab-template/ibizlab-template-ibizedge/src/main/resources/templ/{{projectName}}-core/src/main/resources/mapper/{{modules}}/{{entities}}/{{entities@SQL}}Mapper.xml.hbs
浏览文件 @
1d06780b
...
...
@@ -44,9 +44,9 @@
where
{{#if
entity
.
logicValid
}}
{{#if
entity
.
logicValidField
.
type
.
number
}}
{{
entity
.
logicValidField
.
columnName
}}
=
{{
entity
.
validLogicValue
}}
t1.
{{
entity
.
logicValidField
.
columnName
}}
=
{{
entity
.
validLogicValue
}}
{{else}}
{{
entity
.
logicValidField
.
columnName
}}
= '
{{
entity
.
validLogicValue
}}
'
t1.
{{
entity
.
logicValidField
.
columnName
}}
= '
{{
entity
.
validLogicValue
}}
'
{{/if}}
and
{{/if}}
...
...
@@ -67,14 +67,14 @@
where
{{#if
entity
.
logicValid
}}
{{#if
entity
.
logicValidField
.
type
.
number
}}
{{
entity
.
logicValidField
.
columnName
}}
=
{{
entity
.
validLogicValue
}}
t1.
{{
entity
.
logicValidField
.
columnName
}}
=
{{
entity
.
validLogicValue
}}
{{else}}
{{
entity
.
logicValidField
.
columnName
}}
= '
{{
entity
.
validLogicValue
}}
'
t1.
{{
entity
.
logicValidField
.
columnName
}}
= '
{{
entity
.
validLogicValue
}}
'
{{/if}}
and
{{/if}}
{{/if}}
(
{{#
each
entity
.
keyFields
as
|
field
|
}}{{#
unless
@first
}}
and
{{/
unless
}}{{
field
.
columnName
}}
= #{
{{
camelCase
field
.
codeName
}}
}
{{/
each
}}
)
(
{{#
each
entity
.
keyFields
as
|
field
|
}}{{#
unless
@first
}}
and
{{/
unless
}}
t1.
{{
field
.
columnName
}}
= #{
{{
camelCase
field
.
codeName
}}
}
{{/
each
}}
)
</select>
<select
id=
"selectEntities"
parameterType=
"java.util.List"
resultMap=
"
{{
entity
.
codeName
}}
ResultMap"
>
...
...
@@ -90,14 +90,14 @@
where
{{#if
entity
.
logicValid
}}
{{#if
entity
.
logicValidField
.
type
.
number
}}
{{
entity
.
logicValidField
.
columnName
}}
=
{{
entity
.
validLogicValue
}}
t1.
{{
entity
.
logicValidField
.
columnName
}}
=
{{
entity
.
validLogicValue
}}
{{else}}
{{
entity
.
logicValidField
.
columnName
}}
= '
{{
entity
.
validLogicValue
}}
'
t1.
{{
entity
.
logicValidField
.
columnName
}}
= '
{{
entity
.
validLogicValue
}}
'
{{/if}}
and
{{/if}}
{{/if}}
(
{{#
each
entity
.
keyFields
as
|
field
|
}}{{#
unless
@first
}}
,
{{/
unless
}}{{
field
.
columnName
}}{{/
each
}}
)
(
{{#
each
entity
.
keyFields
as
|
field
|
}}{{#
unless
@first
}}
,
{{/
unless
}}
t1.
{{
field
.
columnName
}}{{/
each
}}
)
in (
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(
{{#
each
entity
.
keyFields
as
|
field
|
}}{{#
unless
@first
}}
,
{{/
unless
}}
#{ item.
{{
camelCase
field
.
codeName
}}
}
{{/
each
}}
)
</foreach>
)
</select>
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录