Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
workflow-core
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
黄夏豪
workflow-core
Commits
5afab766
提交
5afab766
authored
3月 18, 2021
作者:
ww1xhqc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[数据模型] 字段修改和更新方法添加
上级
f980ee6e
全部展开
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
17 行增加
和
16 行删除
+17
-16
ModelController.java
.../workflowcore/model_layer/controller/ModelController.java
+3
-3
ColumnInfo.java
.../com/tykj/workflowcore/model_layer/entity/ColumnInfo.java
+4
-4
TableInfo.java
...a/com/tykj/workflowcore/model_layer/entity/TableInfo.java
+2
-2
ColumnVO.java
...com/tykj/workflowcore/model_layer/entity/vo/ColumnVO.java
+1
-1
SearchTableInfoVo.java
...workflowcore/model_layer/entity/vo/SearchTableInfoVo.java
+2
-2
ModelImpl.java
...tykj/workflowcore/model_layer/service/impl/ModelImpl.java
+0
-0
ClassTypeLength.java
.../tykj/workflowcore/model_layer/utils/ClassTypeLength.java
+4
-4
VariableStorageService.java
...wcore/workflow_editer/service/VariableStorageService.java
+1
-0
没有找到文件。
src/main/java/com/tykj/workflowcore/model_layer/controller/ModelController.java
浏览文件 @
5afab766
...
@@ -30,7 +30,7 @@ import java.util.Map;
...
@@ -30,7 +30,7 @@ import java.util.Map;
*/
*/
@RestController
@RestController
@RequestMapping
(
"/model"
)
@RequestMapping
(
"/model"
)
@Api
(
"数据模型层接口"
)
@Api
(
tags
=
"数据模型层接口"
)
public
class
ModelController
{
public
class
ModelController
{
@Autowired
@Autowired
...
@@ -82,7 +82,7 @@ public class ModelController {
...
@@ -82,7 +82,7 @@ public class ModelController {
public
ResponseEntity
addModel
(
@RequestBody
TableVO
tableVO
)
throws
Exception
{
public
ResponseEntity
addModel
(
@RequestBody
TableVO
tableVO
)
throws
Exception
{
List
<
TableInfo
>
tableInfos
=
modelService
.
listAllEntities
();
List
<
TableInfo
>
tableInfos
=
modelService
.
listAllEntities
();
for
(
TableInfo
tableInfo
:
tableInfos
)
{
for
(
TableInfo
tableInfo
:
tableInfos
)
{
if
(
tableVO
.
getModelName
().
equals
(
tableInfo
.
getName
()))
{
if
(
tableVO
.
getModelName
().
equals
(
tableInfo
.
get
Model
Name
()))
{
return
ResultUtil
.
failed
(
"表已经存在!"
);
return
ResultUtil
.
failed
(
"表已经存在!"
);
}
}
}
}
...
@@ -142,7 +142,7 @@ public class ModelController {
...
@@ -142,7 +142,7 @@ public class ModelController {
throwables
.
printStackTrace
();
throwables
.
printStackTrace
();
}
}
for
(
TableInfo
tableInfo
:
tableInfos
)
{
for
(
TableInfo
tableInfo
:
tableInfos
)
{
if
(
tableName
.
equals
(
tableInfo
.
getName
()))
{
if
(
tableName
.
equals
(
tableInfo
.
get
Model
Name
()))
{
return
ResultUtil
.
failed
(
"表已经存在!"
);
return
ResultUtil
.
failed
(
"表已经存在!"
);
}
}
}
}
...
...
src/main/java/com/tykj/workflowcore/model_layer/entity/ColumnInfo.java
浏览文件 @
5afab766
...
@@ -31,13 +31,13 @@ public class ColumnInfo extends BaseEntity {
...
@@ -31,13 +31,13 @@ public class ColumnInfo extends BaseEntity {
private
Integer
primaryKey
;
private
Integer
primaryKey
;
@ApiModelProperty
(
"列名"
)
@ApiModelProperty
(
"列名"
)
private
String
n
ame
;
private
String
fieldN
ame
;
@ApiModelProperty
(
"列名中文描述"
)
@ApiModelProperty
(
"列名中文描述"
)
private
String
cnNam
e
;
private
String
fieldTitl
e
;
@ApiModelProperty
(
"列类型"
)
@ApiModelProperty
(
"列类型"
)
private
String
t
ype
;
private
String
fieldT
ype
;
@ApiModelProperty
(
"长度"
)
@ApiModelProperty
(
"长度"
)
private
Integer
l
ength
;
private
Integer
fieldL
ength
;
@ApiModelProperty
(
"所属表名"
)
@ApiModelProperty
(
"所属表名"
)
private
String
dbName
;
private
String
dbName
;
@ApiModelProperty
(
"所属表id"
)
@ApiModelProperty
(
"所属表id"
)
...
...
src/main/java/com/tykj/workflowcore/model_layer/entity/TableInfo.java
浏览文件 @
5afab766
...
@@ -30,10 +30,10 @@ public class TableInfo extends BaseEntity implements Serializable {
...
@@ -30,10 +30,10 @@ public class TableInfo extends BaseEntity implements Serializable {
@ApiModelProperty
(
"表名,不能为空"
)
@ApiModelProperty
(
"表名,不能为空"
)
@Column
(
nullable
=
false
)
@Column
(
nullable
=
false
)
private
String
n
ame
;
private
String
modelN
ame
;
@ApiModelProperty
(
"表中文名,不能为空"
)
@ApiModelProperty
(
"表中文名,不能为空"
)
@Column
(
nullable
=
false
)
@Column
(
nullable
=
false
)
private
String
cnNam
e
;
private
String
modelTitl
e
;
@ApiModelProperty
(
"详细描述"
)
@ApiModelProperty
(
"详细描述"
)
private
String
description
;
private
String
description
;
...
...
src/main/java/com/tykj/workflowcore/model_layer/entity/vo/ColumnVO.java
浏览文件 @
5afab766
...
@@ -22,7 +22,7 @@ public class ColumnVO {
...
@@ -22,7 +22,7 @@ public class ColumnVO {
@ApiModelProperty
(
"字段名"
)
@ApiModelProperty
(
"字段名"
)
private
String
fieldName
;
private
String
fieldName
;
@ApiModelProperty
(
"中文描述"
)
@ApiModelProperty
(
"中文描述"
)
private
String
field
Description
;
private
String
field
Title
;
@ApiModelProperty
(
"字段长度,有默认值"
)
@ApiModelProperty
(
"字段长度,有默认值"
)
private
Integer
fieldLength
;
private
Integer
fieldLength
;
...
...
src/main/java/com/tykj/workflowcore/model_layer/entity/vo/SearchTableInfoVo.java
浏览文件 @
5afab766
...
@@ -19,9 +19,9 @@ public class SearchTableInfoVo extends JpaCustomPage {
...
@@ -19,9 +19,9 @@ public class SearchTableInfoVo extends JpaCustomPage {
private
Integer
id
;
private
Integer
id
;
private
String
table
Name
;
private
String
model
Name
;
private
String
tableCnNam
e
;
private
String
modelTitl
e
;
private
Integer
modelType
;
private
Integer
modelType
;
}
}
src/main/java/com/tykj/workflowcore/model_layer/service/impl/ModelImpl.java
浏览文件 @
5afab766
差异被折叠。
点击展开。
src/main/java/com/tykj/workflowcore/model_layer/utils/ClassTypeLength.java
浏览文件 @
5afab766
...
@@ -19,15 +19,15 @@ public class ClassTypeLength {
...
@@ -19,15 +19,15 @@ public class ClassTypeLength {
if
(
STRING
.
equals
(
genericType
)){
if
(
STRING
.
equals
(
genericType
)){
columnInfo
.
setLength
(
255
);
columnInfo
.
set
Field
Length
(
255
);
}
else
if
(
Integer
.
equals
(
genericType
))
{
}
else
if
(
Integer
.
equals
(
genericType
))
{
columnInfo
.
setLength
(
11
);
columnInfo
.
set
Field
Length
(
11
);
}
else
if
(
Double
.
equals
(
genericType
))
{
}
else
if
(
Double
.
equals
(
genericType
))
{
columnInfo
.
setLength
(
10
);
columnInfo
.
set
Field
Length
(
10
);
}
}
else
{
else
{
columnInfo
.
setLength
(
0
);
columnInfo
.
set
Field
Length
(
0
);
}
}
}
}
}
}
src/main/java/com/tykj/workflowcore/workflow_editer/service/VariableStorageService.java
浏览文件 @
5afab766
package
com
.
tykj
.
workflowcore
.
workflow_editer
.
service
;
package
com
.
tykj
.
workflowcore
.
workflow_editer
.
service
;
import
com.tykj.workflowcore.workflow_editer.entity.VariableStorage
;
import
com.tykj.workflowcore.workflow_editer.entity.VariableStorage
;
import
com.tykj.workflowcore.workflow_editer.entity.vo.SearchVariableStorageVo
;
import
com.tykj.workflowcore.workflow_editer.entity.vo.SearchVariableStorageVo
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论