Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 72300c71
authored
Jun 06, 2021
by
刘宇峰
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
预留围栏同步口子
1 parent
7e3d9d5e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
src/main/java/cn/com/glsx/admin/modules/controller/ElectricFenceController.java
src/main/java/cn/com/glsx/admin/modules/service/ElectricFenceService.java
src/main/java/cn/com/glsx/admin/modules/controller/ElectricFenceController.java
View file @
72300c7
...
...
@@ -119,10 +119,17 @@ public class ElectricFenceController {
return
R
.
ok
();
}
@GetMapping
(
value
=
"/syncalldata"
)
@ApiOperation
(
value
=
"同步全部围栏到数据侧"
)
public
R
syncAllData
()
{
electricFenceService
.
syncAllFences
();
return
R
.
ok
();
}
@GetMapping
(
value
=
"/syncdata"
)
@ApiOperation
(
value
=
"同步围栏到数据侧"
)
public
R
syncData
()
{
electricFenceService
.
syncFence
s
(
);
public
R
syncData
(
@RequestParam
(
"fenceId"
)
Long
fenceId
)
{
electricFenceService
.
syncFence
(
fenceId
);
return
R
.
ok
();
}
...
...
src/main/java/cn/com/glsx/admin/modules/service/ElectricFenceService.java
View file @
72300c7
...
...
@@ -567,7 +567,7 @@ public class ElectricFenceService {
electricFenceSnsMapper
.
logicDeleteByFenceId
(
fenceId
);
}
public
void
syncFences
()
{
public
void
sync
All
Fences
()
{
List
<
ElectricFence
>
fenceList
=
electricFenceMapper
.
selectAllNotDel
();
fenceList
.
forEach
(
fence
->
{
System
.
out
.
println
(
JSON
.
toJSONString
(
fence
));
...
...
@@ -575,4 +575,12 @@ public class ElectricFenceService {
});
}
public
void
syncFence
(
Long
fenceId
)
{
ElectricFence
fence
=
electricFenceMapper
.
selectById
(
fenceId
);
if
(
fence
!=
null
)
{
System
.
out
.
println
(
JSON
.
toJSONString
(
fence
));
eFenceComponent
.
addElectricFence
(
fence
);
}
}
}
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment