Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
nzwz
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
inroi
nzwz
Commits
5f1c5410
提交
5f1c5410
authored
6月 27, 2022
作者:
inroi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
微调
上级
8253eb81
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
31 行增加
和
6 行删除
+31
-6
SynchronizationController.java
...n/java/com/nzwz/controller/SynchronizationController.java
+4
-4
ISynchronizationService.java
...c/main/java/com/nzwz/serivce/ISynchronizationService.java
+11
-0
SynchronizationServiceImpl.java
...ava/com/nzwz/serivce/impl/SynchronizationServiceImpl.java
+15
-1
TableRelationServiceImpl.java
.../java/com/nzwz/serivce/impl/TableRelationServiceImpl.java
+1
-1
没有找到文件。
starbos-system/src/main/java/com/nzwz/controller/SynchronizationController.java
浏览文件 @
5f1c5410
...
@@ -47,17 +47,17 @@ public class SynchronizationController {
...
@@ -47,17 +47,17 @@ public class SynchronizationController {
return
synchronizationService
.
initConnectParmCreate
(
inVo
);
return
synchronizationService
.
initConnectParmCreate
(
inVo
);
}
}
@ApiOperation
(
"手动
开启自动同步
"
)
@ApiOperation
(
"手动
启动同步方法
"
)
@GetMapping
(
"/manual/synchronization"
)
@GetMapping
(
"/manual/synchronization"
)
public
RestResponse
manualSynchronization
()
{
public
RestResponse
manualSynchronization
()
{
synchronizationService
.
s
ynchronization
();
synchronizationService
.
manualS
ynchronization
();
return
RestResponse
.
success
();
return
RestResponse
.
success
();
}
}
@ApiOperation
(
"手动
重新同步错误同步
"
)
@ApiOperation
(
"手动
启动失败同步方法
"
)
@GetMapping
(
"/abnormal/synchronization"
)
@GetMapping
(
"/abnormal/synchronization"
)
public
RestResponse
abnormalSynchronization
()
{
public
RestResponse
abnormalSynchronization
()
{
synchronizationService
.
abnormal
Again
Synchronization
();
synchronizationService
.
abnormalSynchronization
();
return
RestResponse
.
success
();
return
RestResponse
.
success
();
}
}
...
...
starbos-system/src/main/java/com/nzwz/serivce/ISynchronizationService.java
浏览文件 @
5f1c5410
...
@@ -43,10 +43,21 @@ public interface ISynchronizationService {
...
@@ -43,10 +43,21 @@ public interface ISynchronizationService {
*/
*/
void
synchronization
();
void
synchronization
();
/**
* 手动启动同步方法
*/
void
manualSynchronization
();
/**
/**
* 异常重新同步方法
* 异常重新同步方法
*/
*/
void
abnormalAgainSynchronization
();
void
abnormalAgainSynchronization
();
/**
* 手动启动失败同步方法
*/
void
abnormalSynchronization
();
}
}
starbos-system/src/main/java/com/nzwz/serivce/impl/SynchronizationServiceImpl.java
浏览文件 @
5f1c5410
...
@@ -130,6 +130,16 @@ public class SynchronizationServiceImpl implements ISynchronizationService {
...
@@ -130,6 +130,16 @@ public class SynchronizationServiceImpl implements ISynchronizationService {
}
}
@Override
@Override
public
void
manualSynchronization
()
{
this
.
synchronization
();
}
@Override
public
void
abnormalSynchronization
()
{
this
.
abnormalAgainSynchronization
();
}
@Override
public
void
synchronization
()
{
public
void
synchronization
()
{
List
<
TableRelation
>
tableRelationList
=
tableRelationMapper
.
selectList
(
new
QueryWrapper
<>());
List
<
TableRelation
>
tableRelationList
=
tableRelationMapper
.
selectList
(
new
QueryWrapper
<>());
...
@@ -168,7 +178,11 @@ public class SynchronizationServiceImpl implements ISynchronizationService {
...
@@ -168,7 +178,11 @@ public class SynchronizationServiceImpl implements ISynchronizationService {
}
}
private
void
getTableRelationTree
(
List
<
TableRelation
>
result
,
String
tableHeader
,
List
<
TableRelation
>
tableRelationList
)
{
private
void
getTableRelationTree
(
List
<
TableRelation
>
result
,
String
tableHeader
,
List
<
TableRelation
>
tableRelationList
)
{
List
<
TableRelation
>
tempList
=
tableRelationList
.
stream
().
filter
(
m
->
tableHeader
.
equals
(
m
.
getSubTableHeader
())).
collect
(
Collectors
.
toList
());
List
<
TableRelation
>
tempList
=
tableRelationList
.
stream
()
.
filter
(
m
->
tableHeader
.
equals
(
m
.
getSubTableHeader
()))
.
sorted
(
Comparator
.
comparing
(
TableRelation:
:
getSortOrder
))
.
collect
(
Collectors
.
toList
());
for
(
TableRelation
tableRelation
:
tempList
)
{
for
(
TableRelation
tableRelation
:
tempList
)
{
result
.
add
(
tableRelation
);
result
.
add
(
tableRelation
);
this
.
getTableRelationTree
(
result
,
tableRelation
.
getTableHeader
(),
tableRelationList
);
this
.
getTableRelationTree
(
result
,
tableRelation
.
getTableHeader
(),
tableRelationList
);
...
...
starbos-system/src/main/java/com/nzwz/serivce/impl/TableRelationServiceImpl.java
浏览文件 @
5f1c5410
...
@@ -30,7 +30,7 @@ public class TableRelationServiceImpl implements ITableRelationService {
...
@@ -30,7 +30,7 @@ public class TableRelationServiceImpl implements ITableRelationService {
List
<
TableRelationListOutVoRecords
>
result
=
tempList
.
stream
()
List
<
TableRelationListOutVoRecords
>
result
=
tempList
.
stream
()
.
sorted
(
Comparator
.
comparing
(
TableRelationListOutVoRecords:
:
getCreateTime
).
reversed
())
.
sorted
(
Comparator
.
comparing
(
TableRelationListOutVoRecords:
:
getCreateTime
).
reversed
())
.
collect
(
Collectors
.
toList
())
.
collect
(
Collectors
.
toList
())
.
subList
(
inVo
.
getPageNo
()
*
inVo
.
getPageSize
()
-
10
,
Math
.
min
(
inVo
.
getPageNo
()
*
inVo
.
getPageSize
(),
tempList
.
size
()));
.
subList
(
inVo
.
getPageNo
()
*
inVo
.
getPageSize
()
-
inVo
.
getPageSize
()
,
Math
.
min
(
inVo
.
getPageNo
()
*
inVo
.
getPageSize
(),
tempList
.
size
()));
TableRelationListOutVo
outVo
=
new
TableRelationListOutVo
();
TableRelationListOutVo
outVo
=
new
TableRelationListOutVo
();
outVo
.
setTotal
(
tempList
.
size
());
outVo
.
setTotal
(
tempList
.
size
());
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论