Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdata
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdata
提交
ac9d86f8
提交
ac9d86f8
编写于
8月 12, 2021
作者:
sq3536
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
提交
上级
b894a61d
变更
11
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
129 行增加
和
467 行删除
+129
-467
DOModel.java
...re/src/main/java/cn/ibizlab/core/data/domain/DOModel.java
+3
-1
DOSchema.java
...e/src/main/java/cn/ibizlab/core/data/domain/DOSchema.java
+0
-123
DTOModel.java
...e/src/main/java/cn/ibizlab/core/data/domain/DTOModel.java
+3
-1
DTOSchema.java
.../src/main/java/cn/ibizlab/core/data/domain/DTOSchema.java
+0
-123
PojoModel.java
...e/src/main/java/cn/ibizlab/core/data/model/PojoModel.java
+3
-1
PojoOption.java
.../src/main/java/cn/ibizlab/core/data/model/PojoOption.java
+21
-8
PojoProperty.java
...rc/main/java/cn/ibizlab/core/data/model/PojoProperty.java
+4
-0
PojoSchema.java
.../src/main/java/cn/ibizlab/core/data/model/PojoSchema.java
+11
-12
TransUtils.java
.../src/main/java/cn/ibizlab/core/data/model/TransUtils.java
+80
-0
DOModelDTO.java
...ider-api/src/main/java/cn/ibizlab/api/dto/DOModelDTO.java
+4
-2
DOSchemaDTO.java
...der-api/src/main/java/cn/ibizlab/api/dto/DOSchemaDTO.java
+0
-196
未找到文件。
ibzdata-core/src/main/java/cn/ibizlab/core/data/domain/DOModel.java
浏览文件 @
ac9d86f8
...
...
@@ -8,6 +8,8 @@ import java.math.BigInteger;
import
java.util.HashMap
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
cn.ibizlab.core.data.model.PojoSchema
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
...
...
@@ -94,7 +96,7 @@ public class DOModel extends EntityBase implements Serializable {
@JSONField
(
name
=
"schema"
)
@JsonProperty
(
"schema"
)
@ApiModelProperty
(
"定义"
)
private
String
schema
;
private
PojoSchema
schema
;
/**
* 模型
...
...
ibzdata-core/src/main/java/cn/ibizlab/core/data/domain/DOSchema.java
已删除
100644 → 0
浏览文件 @
b894a61d
package
cn
.
ibizlab
.
core
.
data
.
domain
;
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
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
cn.ibizlab.core.data.model.PojoModel
;
import
cn.ibizlab.core.data.model.PojoSchema
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.DigestUtils
;
import
cn.ibizlab.util.domain.EntityBase
;
import
cn.ibizlab.util.annotation.DEField
;
import
cn.ibizlab.util.enums.DEPredefinedFieldType
;
import
cn.ibizlab.util.enums.DEFieldDefaultValueType
;
import
cn.ibizlab.util.helper.DataObject
;
import
cn.ibizlab.util.enums.DupCheck
;
import
java.io.Serializable
;
import
lombok.*
;
import
org.springframework.data.annotation.Transient
;
import
cn.ibizlab.util.annotation.Audit
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**
* [业务实体] 对象
*/
@Builder
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ApiModel
(
"业务实体"
)
public
class
DOSchema
extends
EntityBase
implements
Serializable
{
/**
* 标识
*/
@DEField
(
isKeyField
=
true
)
@JSONField
(
name
=
"id"
)
@JsonProperty
(
"id"
)
@ApiModelProperty
(
"标识"
)
private
String
id
;
/**
* 名称
*/
@JSONField
(
name
=
"name"
)
@JsonProperty
(
"name"
)
@ApiModelProperty
(
"名称"
)
private
String
name
;
/**
* 名称
*/
@JSONField
(
name
=
"title"
)
@JsonProperty
(
"title"
)
@ApiModelProperty
(
"名称"
)
private
String
title
;
/**
* 系统
*/
@JSONField
(
name
=
"systemId"
)
@JsonProperty
(
"systemId"
)
@ApiModelProperty
(
"系统"
)
private
String
systemId
;
/**
* 包名
*/
@JSONField
(
name
=
"packageName"
)
@JsonProperty
(
"packageName"
)
@ApiModelProperty
(
"包名"
)
private
String
packageName
;
/**
* 描述
*/
@JSONField
(
name
=
"description"
)
@JsonProperty
(
"description"
)
@ApiModelProperty
(
"描述"
)
private
String
description
;
/**
* 定义
*/
@JSONField
(
name
=
"schema"
)
@JsonProperty
(
"schema"
)
@ApiModelProperty
(
"定义"
)
private
PojoSchema
schema
;
/**
* 模型
*/
@JSONField
(
name
=
"model"
)
@JsonProperty
(
"model"
)
@ApiModelProperty
(
"模型"
)
private
String
model
;
/**
* 存储
*/
@JSONField
(
name
=
"poModels"
)
@JsonProperty
(
"poModels"
)
@ApiModelProperty
(
"存储"
)
private
String
poModels
;
}
ibzdata-core/src/main/java/cn/ibizlab/core/data/domain/DTOModel.java
浏览文件 @
ac9d86f8
...
...
@@ -8,6 +8,8 @@ import java.math.BigInteger;
import
java.util.HashMap
;
import
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
cn.ibizlab.core.data.model.PojoSchema
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
...
...
@@ -94,7 +96,7 @@ public class DTOModel extends EntityBase implements Serializable {
@JSONField
(
name
=
"schema"
)
@JsonProperty
(
"schema"
)
@ApiModelProperty
(
"定义"
)
private
String
schema
;
private
PojoSchema
schema
;
/**
* 模型
...
...
ibzdata-core/src/main/java/cn/ibizlab/core/data/domain/DTOSchema.java
已删除
100644 → 0
浏览文件 @
b894a61d
package
cn
.
ibizlab
.
core
.
data
.
domain
;
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
java.math.BigDecimal
;
import
java.text.SimpleDateFormat
;
import
cn.ibizlab.core.data.model.PojoModel
;
import
cn.ibizlab.core.data.model.PojoSchema
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.DigestUtils
;
import
cn.ibizlab.util.domain.EntityBase
;
import
cn.ibizlab.util.annotation.DEField
;
import
cn.ibizlab.util.enums.DEPredefinedFieldType
;
import
cn.ibizlab.util.enums.DEFieldDefaultValueType
;
import
cn.ibizlab.util.helper.DataObject
;
import
cn.ibizlab.util.enums.DupCheck
;
import
java.io.Serializable
;
import
lombok.*
;
import
org.springframework.data.annotation.Transient
;
import
cn.ibizlab.util.annotation.Audit
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**
* [数据传输对象] 对象
*/
@Builder
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ApiModel
(
"数据传输对象"
)
public
class
DTOSchema
extends
EntityBase
implements
Serializable
{
/**
* 标识
*/
@DEField
(
isKeyField
=
true
)
@JSONField
(
name
=
"id"
)
@JsonProperty
(
"id"
)
@ApiModelProperty
(
"标识"
)
private
String
id
;
/**
* 名称
*/
@JSONField
(
name
=
"name"
)
@JsonProperty
(
"name"
)
@ApiModelProperty
(
"名称"
)
private
String
name
;
/**
* 名称
*/
@JSONField
(
name
=
"title"
)
@JsonProperty
(
"title"
)
@ApiModelProperty
(
"名称"
)
private
String
title
;
/**
* 系统
*/
@JSONField
(
name
=
"systemId"
)
@JsonProperty
(
"systemId"
)
@ApiModelProperty
(
"系统"
)
private
String
systemId
;
/**
* 包名
*/
@JSONField
(
name
=
"packageName"
)
@JsonProperty
(
"packageName"
)
@ApiModelProperty
(
"包名"
)
private
String
packageName
;
/**
* 描述
*/
@JSONField
(
name
=
"description"
)
@JsonProperty
(
"description"
)
@ApiModelProperty
(
"描述"
)
private
String
description
;
/**
* 定义
*/
@JSONField
(
name
=
"schema"
)
@JsonProperty
(
"schema"
)
@ApiModelProperty
(
"定义"
)
private
PojoSchema
schema
;
/**
* 模型
*/
@JSONField
(
name
=
"model"
)
@JsonProperty
(
"model"
)
@ApiModelProperty
(
"模型"
)
private
String
model
;
/**
* 映射
*/
@JSONField
(
name
=
"mapping"
)
@JsonProperty
(
"mapping"
)
@ApiModelProperty
(
"映射"
)
private
String
mapping
;
}
ibzdata-core/src/main/java/cn/ibizlab/core/data/model/PojoModel.java
浏览文件 @
ac9d86f8
...
...
@@ -19,6 +19,8 @@ import java.util.*;
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
PojoModel
{
@JSONField
(
ordinal
=
0
)
private
String
ref
;
@JSONField
(
ordinal
=
1
)
private
String
id
;
@JSONField
(
ordinal
=
2
)
...
...
@@ -30,7 +32,7 @@ public class PojoModel
@JSONField
(
ordinal
=
5
)
private
List
<
PojoProperty
>
propertyList
;
@JSONField
(
ordinal
=
6
)
private
Map
<
String
,
Object
>
extensions
=
new
HashMap
<>()
;
private
Map
<
String
,
Object
>
extensions
;
public
PojoModel
setPropertyList
(
List
<
PojoProperty
>
propertyList
)
{
if
(
propertyList
!=
null
)
...
...
ibzdata-core/src/main/java/cn/ibizlab/core/data/model/PojoOption.java
浏览文件 @
ac9d86f8
...
...
@@ -6,6 +6,8 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
org.springframework.util.StringUtils
;
import
java.util.Map
;
@JsonInclude
(
JsonInclude
.
Include
.
NON_EMPTY
)
@JsonIgnoreProperties
(
ignoreUnknown
=
true
)
public
class
PojoOption
extends
DataObj
{
...
...
@@ -17,21 +19,23 @@ public class PojoOption extends DataObj{
return
this
;
}
public
PojoOption
setAll
(
Map
map
)
{
if
(
map
!=
null
)
this
.
putAll
(
map
);
else
if
(
this
.
size
()==
0
)
return
null
;
return
this
;
}
public
String
getName
()
{
return
this
.
getStringValue
(
"name"
);
return
this
.
getStringValue
(
"name"
,
this
.
getStringValue
(
"code_name"
)
);
}
public
PojoOption
setName
(
String
name
)
{
return
this
.
set
(
"name"
,
name
);
}
public
String
getCode
()
{
return
this
.
getStringValue
(
"code"
);
}
public
PojoOption
setCode
(
String
code
)
{
return
this
.
set
(
"code"
,
code
);
}
public
Boolean
isLogicValid
()
{
return
this
.
getBooleanValue
(
"logicValid"
);
...
...
@@ -59,6 +63,15 @@ public class PojoOption extends DataObj{
return
this
.
set
(
"logicdelval"
,
logicdelval
);
}
public
String
getFieldName
()
{
return
this
.
getStringValue
(
"field_name"
);
}
public
PojoOption
setFieldName
(
String
code
)
{
return
this
.
set
(
"field_name"
,
code
);
}
public
String
getRelationName
()
{
return
this
.
getStringValue
(
"relation_name"
);
}
...
...
ibzdata-core/src/main/java/cn/ibizlab/core/data/model/PojoProperty.java
浏览文件 @
ac9d86f8
...
...
@@ -15,6 +15,7 @@ import org.springframework.util.ObjectUtils;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
@Getter
@Setter
...
...
@@ -56,6 +57,9 @@ public class PojoProperty
@JSONField
(
ordinal
=
8
)
private
PojoModel
model
;
@JSONField
(
ordinal
=
9
)
private
Map
<
String
,
Object
>
extensions
;
public
PojoModel
getModel
()
{
if
(
propertyType
!=
null
&&
propertyType
.
equals
(
PojoModel
.
PropertyType
.
recursion
)
&&
ownerModel
!=
null
)
{
...
...
ibzdata-core/src/main/java/cn/ibizlab/core/data/model/PojoSchema.java
浏览文件 @
ac9d86f8
...
...
@@ -31,18 +31,6 @@ public class PojoSchema {
@JSONField
(
ordinal
=
2
)
private
String
type
;
@JSONField
(
serialize
=
false
)
@JsonIgnore
private
String
code
;
@JSONField
(
serialize
=
false
)
@JsonIgnore
public
String
getCode
()
{
if
(
code
==
null
)
code
=
this
.
getOptions
()==
null
?
this
.
getName
():
this
.
getOptions
().
getCode
();
return
code
;
}
@JSONField
(
serialize
=
false
)
@JsonIgnore
...
...
@@ -70,6 +58,7 @@ public class PojoSchema {
}
@JSONField
(
ordinal
=
3
)
private
String
title
;
...
...
@@ -82,6 +71,16 @@ public class PojoSchema {
@JSONField
(
ordinal
=
6
)
private
PojoOption
options
;
public
PojoSchema
setOptions
(
PojoOption
options
)
{
if
(
options
==
null
)
return
this
;
if
(
this
.
options
!=
null
)
options
.
putAll
(
this
.
options
);
this
.
options
=
options
;
return
this
;
}
@JSONField
(
ordinal
=
7
)
private
String
ref
;
...
...
ibzdata-core/src/main/java/cn/ibizlab/core/data/model/TransUtils.java
0 → 100644
浏览文件 @
ac9d86f8
此差异已折叠。
点击以展开。
ibzdata-provider/ibzdata-provider-api/src/main/java/cn/ibizlab/api/dto/DOModelDTO.java
浏览文件 @
ac9d86f8
...
...
@@ -8,6 +8,8 @@ import java.util.Map;
import
java.util.HashMap
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
cn.ibizlab.core.data.model.PojoSchema
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
...
...
@@ -100,7 +102,7 @@ public class DOModelDTO extends DTOBase implements Serializable {
@JsonProperty
(
"schema"
)
@Size
(
min
=
0
,
max
=
1048576
,
message
=
"内容长度必须小于等于[1048576]"
)
@ApiModelProperty
(
"定义"
)
private
String
schema
;
private
PojoSchema
schema
;
/**
* 属性 [MODEL]
...
...
@@ -166,7 +168,7 @@ public class DOModelDTO extends DTOBase implements Serializable {
/**
* 设置 [SCHEMA]
*/
public
void
setSchema
(
String
schema
){
public
void
setSchema
(
PojoSchema
schema
){
this
.
schema
=
schema
;
this
.
modify
(
"schema"
,
schema
);
}
...
...
ibzdata-provider/ibzdata-provider-api/src/main/java/cn/ibizlab/api/dto/DOSchemaDTO.java
已删除
100644 → 0
浏览文件 @
b894a61d
package
cn
.
ibizlab
.
api
.
dto
;
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
cn.ibizlab.core.data.model.PojoModel
;
import
cn.ibizlab.core.data.model.PojoSchema
;
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
cn.ibizlab.util.domain.DTOBase
;
import
cn.ibizlab.util.domain.DTOClient
;
import
lombok.Data
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
/**
* 服务DTO对象[DOSchemaDTO]
*/
@Data
@ApiModel
(
"业务实体"
)
public
class
DOSchemaDTO
extends
DTOBase
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 属性 [ID]
*
*/
@JSONField
(
name
=
"id"
)
@JsonProperty
(
"id"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"标识"
)
private
String
id
;
/**
* 属性 [NAME]
*
*/
@JSONField
(
name
=
"name"
)
@JsonProperty
(
"name"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"名称"
)
private
String
name
;
/**
* 属性 [TITLE]
*
*/
@JSONField
(
name
=
"title"
)
@JsonProperty
(
"title"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"名称"
)
private
String
title
;
/**
* 属性 [SYSTEMID]
*
*/
@JSONField
(
name
=
"systemid"
)
@JsonProperty
(
"systemid"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"系统"
)
private
String
systemId
;
/**
* 属性 [PACKAGENAME]
*
*/
@JSONField
(
name
=
"packagename"
)
@JsonProperty
(
"packagename"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"包名"
)
private
String
packageName
;
/**
* 属性 [DESCRIPTION]
*
*/
@JSONField
(
name
=
"description"
)
@JsonProperty
(
"description"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"描述"
)
private
String
description
;
/**
* 属性 [SCHEMA]
*
*/
@JSONField
(
name
=
"schema"
)
@JsonProperty
(
"schema"
)
@Size
(
min
=
0
,
max
=
1048576
,
message
=
"内容长度必须小于等于[1048576]"
)
@ApiModelProperty
(
"定义"
)
private
PojoSchema
schema
;
/**
* 属性 [MODEL]
*
*/
@JSONField
(
name
=
"model"
)
@JsonProperty
(
"model"
)
@Size
(
min
=
0
,
max
=
1048576
,
message
=
"内容长度必须小于等于[1048576]"
)
@ApiModelProperty
(
"模型"
)
private
String
model
;
/**
* 属性 [POMODELS]
*
*/
@JSONField
(
name
=
"pomodels"
)
@JsonProperty
(
"pomodels"
)
@Size
(
min
=
0
,
max
=
100
,
message
=
"内容长度必须小于等于[100]"
)
@ApiModelProperty
(
"存储"
)
private
String
poModels
;
/**
* 设置 [NAME]
*/
public
void
setName
(
String
name
){
this
.
name
=
name
;
this
.
modify
(
"name"
,
name
);
}
/**
* 设置 [TITLE]
*/
public
void
setTitle
(
String
title
){
this
.
title
=
title
;
this
.
modify
(
"title"
,
title
);
}
/**
* 设置 [SYSTEMID]
*/
public
void
setSystemId
(
String
systemId
){
this
.
systemId
=
systemId
;
this
.
modify
(
"systemid"
,
systemId
);
}
/**
* 设置 [PACKAGENAME]
*/
public
void
setPackageName
(
String
packageName
){
this
.
packageName
=
packageName
;
this
.
modify
(
"packagename"
,
packageName
);
}
/**
* 设置 [DESCRIPTION]
*/
public
void
setDescription
(
String
description
){
this
.
description
=
description
;
this
.
modify
(
"description"
,
description
);
}
/**
* 设置 [SCHEMA]
*/
public
void
setSchema
(
PojoSchema
schema
){
this
.
schema
=
schema
;
this
.
modify
(
"schema"
,
schema
);
}
/**
* 设置 [MODEL]
*/
public
void
setModel
(
String
model
){
this
.
model
=
model
;
this
.
modify
(
"model"
,
model
);
}
/**
* 设置 [POMODELS]
*/
public
void
setPoModels
(
String
poModels
){
this
.
poModels
=
poModels
;
this
.
modify
(
"pomodels"
,
poModels
);
}
}
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录