Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
workflow2
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
黄夏豪
workflow2
Commits
b67a2fe1
提交
b67a2fe1
authored
8月 11, 2021
作者:
黄承天
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[模型模块]controller层补充
上级
400de769
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
114 行增加
和
22 行删除
+114
-22
TableInfoController.java
...kj/workflowcore/model/controller/TableInfoController.java
+45
-0
TableInfoExController.java
.../workflowcore/model/controller/TableInfoExController.java
+43
-0
Bind.java
src/main/java/com/tykj/workflowcore/model/entity/Bind.java
+8
-8
ColumnInfo.java
...n/java/com/tykj/workflowcore/model/entity/ColumnInfo.java
+6
-6
TableInfo.java
...in/java/com/tykj/workflowcore/model/entity/TableInfo.java
+5
-7
TableInfoEx.java
.../java/com/tykj/workflowcore/model/entity/TableInfoEx.java
+5
-0
ColumnInfoRepository.java
...j/workflowcore/model/repository/ColumnInfoRepository.java
+2
-0
TableInfoService.java
...com/tykj/workflowcore/model/service/TableInfoService.java
+0
-1
没有找到文件。
src/main/java/com/tykj/workflowcore/model/controller/TableInfoController.java
0 → 100644
浏览文件 @
b67a2fe1
package
com
.
tykj
.
workflowcore
.
model
.
controller
;
import
com.tykj.workflowcore.base.result.ResultObj
;
import
com.tykj.workflowcore.base.result.ResultUtil
;
import
com.tykj.workflowcore.model.entity.TableInfo
;
import
com.tykj.workflowcore.model.service.TableInfoService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
@Api
(
tags
=
"基础模型接口"
)
@CrossOrigin
@RequestMapping
(
"/tableinfo"
)
@RestController
public
class
TableInfoController
{
@Autowired
private
TableInfoService
tableInfoService
;
@ApiOperation
(
value
=
"新增基础模型"
)
@PostMapping
public
ResponseEntity
save
(
@RequestBody
TableInfo
tableInfo
){
tableInfoService
.
save
(
tableInfo
);
return
ResponseEntity
.
ok
(
"新增成功"
);
}
@ApiOperation
(
value
=
"修改基础模型"
)
@PutMapping
public
ResponseEntity
update
(
@RequestBody
TableInfo
tableInfo
){
tableInfoService
.
update
(
tableInfo
);
return
ResponseEntity
.
ok
(
"修改成功"
);
}
@ApiOperation
(
value
=
"查询所有基础模型"
)
@GetMapping
public
ResponseEntity
<
List
<
TableInfo
>>
findAll
(){
List
<
TableInfo
>
tableInfos
=
tableInfoService
.
findAll
();
return
ResponseEntity
.
ok
(
tableInfos
);
}
}
src/main/java/com/tykj/workflowcore/model/controller/TableInfoExController.java
0 → 100644
浏览文件 @
b67a2fe1
package
com
.
tykj
.
workflowcore
.
model
.
controller
;
import
com.tykj.workflowcore.model.entity.TableInfoEx
;
import
com.tykj.workflowcore.model.service.TableInfoExService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
@Api
(
tags
=
"聚合模型接口"
)
@CrossOrigin
@RequestMapping
(
"/tableinfoex"
)
@RestController
public
class
TableInfoExController
{
@Autowired
private
TableInfoExService
tableInfoExService
;
@ApiOperation
(
value
=
"新增聚合模型"
)
@PostMapping
public
ResponseEntity
save
(
@RequestBody
TableInfoEx
tableInfoEx
){
tableInfoExService
.
save
(
tableInfoEx
);
return
ResponseEntity
.
ok
(
"新增成功"
);
}
@ApiOperation
(
value
=
"修改聚合模型"
)
@PutMapping
public
ResponseEntity
update
(
@RequestBody
TableInfoEx
tableInfoEx
){
tableInfoExService
.
update
(
tableInfoEx
);
return
ResponseEntity
.
ok
(
"修改成功"
);
}
@ApiOperation
(
value
=
"查询所有聚合模型"
)
@GetMapping
public
ResponseEntity
<
List
<
TableInfoEx
>>
findAll
(){
List
<
TableInfoEx
>
tableInfos
=
tableInfoExService
.
findAll
();
return
ResponseEntity
.
ok
(
tableInfos
);
}
}
src/main/java/com/tykj/workflowcore/model/entity/Bind.java
浏览文件 @
b67a2fe1
package
com
.
tykj
.
workflowcore
.
model
.
entity
;
package
com
.
tykj
.
workflowcore
.
model
.
entity
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
...
@@ -18,26 +19,25 @@ public class Bind {
...
@@ -18,26 +19,25 @@ public class Bind {
@Id
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@JsonIgnore
private
Integer
id
;
private
Integer
id
;
/**
@ApiModelProperty
(
value
=
"绑定的基础对象的名称"
,
position
=
1
)
* 是否为复数(List)
*/
private
Boolean
isComplex
;
/**
* 绑定的TableInfo的name
*/
private
String
name
;
private
String
name
;
@ApiModelProperty
(
value
=
"绑定的基础对象的版本号"
,
readOnly
=
true
,
position
=
2
)
private
Integer
version
;
private
Integer
version
;
@ApiModelProperty
(
value
=
"是否为复数 true/false"
,
position
=
3
)
private
Boolean
isComplex
;
@JsonIgnore
@JsonIgnore
private
Integer
tableInfoExId
;
private
Integer
tableInfoExId
;
@JsonIgnore
@JsonIgnore
private
Integer
parentId
;
private
Integer
parentId
;
@ApiModelProperty
(
value
=
"下级基础对象的绑定信息"
,
position
=
4
)
@Transient
@Transient
private
List
<
Bind
>
children
;
private
List
<
Bind
>
children
;
...
...
src/main/java/com/tykj/workflowcore/model/entity/ColumnInfo.java
浏览文件 @
b67a2fe1
...
@@ -25,22 +25,22 @@ public class ColumnInfo {
...
@@ -25,22 +25,22 @@ public class ColumnInfo {
//-----------------------------//
//-----------------------------//
@ApiModelProperty
(
"是否是主键"
)
@ApiModelProperty
(
value
=
"是否是主键 true/false"
,
position
=
1
)
private
Boolean
isPrimary
;
private
Boolean
isPrimary
;
@ApiModelProperty
(
"列名"
)
@ApiModelProperty
(
value
=
"列名"
,
position
=
1
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
"列类型"
)
@ApiModelProperty
(
value
=
"列类型"
,
position
=
1
)
private
String
type
;
private
String
type
;
@ApiModelProperty
(
"长度"
)
@ApiModelProperty
(
value
=
"长度"
,
position
=
1
)
private
Integer
length
;
private
Integer
length
;
@ApiModelProperty
(
"所属表id"
)
@ApiModelProperty
(
value
=
"所属表id"
,
position
=
1
)
private
Integer
tableInfoId
;
private
Integer
tableInfoId
;
@ApiModelProperty
(
"描述"
)
@ApiModelProperty
(
value
=
"描述"
,
position
=
1
)
private
String
description
;
private
String
description
;
}
}
src/main/java/com/tykj/workflowcore/model/entity/TableInfo.java
浏览文件 @
b67a2fe1
...
@@ -36,24 +36,22 @@ public class TableInfo {
...
@@ -36,24 +36,22 @@ public class TableInfo {
@JsonIgnore
@JsonIgnore
private
Date
updatedTime
;
private
Date
updatedTime
;
//------------------------------//
//------------------------------//
@ApiModelProperty
(
"表名,不能为空"
)
@ApiModelProperty
(
value
=
"基础对象名"
,
position
=
1
)
@Column
(
nullable
=
false
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
"描述"
)
@ApiModelProperty
(
value
=
"描述"
,
position
=
2
)
private
String
description
;
private
String
description
;
@ApiModelProperty
(
"工作流预留字段"
)
@ApiModelProperty
(
value
=
"工作流预留字段"
,
position
=
3
)
private
String
processKey
;
private
String
processKey
;
@ApiModelProperty
(
"版本号"
)
@ApiModelProperty
(
value
=
"版本号"
,
readOnly
=
true
,
position
=
4
)
private
Integer
version
;
private
Integer
version
;
@Transient
@Transient
@ApiModelProperty
(
"字段信息"
)
@ApiModelProperty
(
value
=
"字段信息"
,
position
=
5
)
private
List
<
ColumnInfo
>
columnInfos
;
private
List
<
ColumnInfo
>
columnInfos
;
}
}
...
...
src/main/java/com/tykj/workflowcore/model/entity/TableInfoEx.java
浏览文件 @
b67a2fe1
...
@@ -36,14 +36,19 @@ public class TableInfoEx {
...
@@ -36,14 +36,19 @@ public class TableInfoEx {
@JsonIgnore
@JsonIgnore
private
Date
updatedTime
;
private
Date
updatedTime
;
@ApiModelProperty
(
value
=
"聚合对象名"
,
position
=
1
)
private
String
name
;
private
String
name
;
@ApiModelProperty
(
value
=
"描述"
,
position
=
2
)
private
String
description
;
private
String
description
;
@ApiModelProperty
(
value
=
"工作流用预留字段"
,
position
=
3
)
private
String
processKey
;
private
String
processKey
;
@ApiModelProperty
(
value
=
"版本号"
,
readOnly
=
true
,
position
=
4
)
private
Integer
version
;
private
Integer
version
;
@ApiModelProperty
(
value
=
"绑定信息"
,
position
=
5
)
@Transient
@Transient
private
List
<
Bind
>
binds
;
private
List
<
Bind
>
binds
;
}
}
src/main/java/com/tykj/workflowcore/model/repository/ColumnInfoRepository.java
浏览文件 @
b67a2fe1
...
@@ -6,5 +6,7 @@ import org.springframework.data.jpa.repository.JpaRepository;
...
@@ -6,5 +6,7 @@ import org.springframework.data.jpa.repository.JpaRepository;
import
java.util.List
;
import
java.util.List
;
public
interface
ColumnInfoRepository
extends
JpaRepository
<
ColumnInfo
,
Integer
>
{
public
interface
ColumnInfoRepository
extends
JpaRepository
<
ColumnInfo
,
Integer
>
{
List
<
ColumnInfo
>
findByTableInfoId
(
Integer
tableInfoId
);
List
<
ColumnInfo
>
findByTableInfoId
(
Integer
tableInfoId
);
}
}
src/main/java/com/tykj/workflowcore/model/service/TableInfoService.java
浏览文件 @
b67a2fe1
...
@@ -88,7 +88,6 @@ public class TableInfoService {
...
@@ -88,7 +88,6 @@ public class TableInfoService {
//-----------------------------------------------------------------------------//
//-----------------------------------------------------------------------------//
private
TableInfo
getColumnInfos
(
TableInfo
tableInfo
)
{
private
TableInfo
getColumnInfos
(
TableInfo
tableInfo
)
{
List
<
ColumnInfo
>
columnInfos
=
columnInfoRepository
.
findByTableInfoId
(
tableInfo
.
getId
());
List
<
ColumnInfo
>
columnInfos
=
columnInfoRepository
.
findByTableInfoId
(
tableInfo
.
getId
());
tableInfo
.
setColumnInfos
(
columnInfos
);
tableInfo
.
setColumnInfos
(
columnInfos
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论