Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
c783b2d3
Commit
c783b2d3
authored
Dec 01, 2022
by
litengwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/develop_dl_plan6' into develop_dl_plan6
parents
fc72ef76
bc9bdd36
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
13 deletions
+11
-13
DataSyncTopicEnum.java
.../amos/boot/module/common/api/enums/DataSyncTopicEnum.java
+3
-1
DataSyncServiceImpl.java
...t/module/common/biz/service/impl/DataSyncServiceImpl.java
+8
-9
application-dev.properties
...-system-jcs/src/main/resources/application-dev.properties
+0
-3
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/enums/DataSyncTopicEnum.java
View file @
c783b2d3
...
@@ -3,7 +3,9 @@ package com.yeejoin.amos.boot.module.common.api.enums;
...
@@ -3,7 +3,9 @@ package com.yeejoin.amos.boot.module.common.api.enums;
public
enum
DataSyncTopicEnum
{
public
enum
DataSyncTopicEnum
{
EQM_PATROL_CREATED
(
"user"
,
"emq.user.created"
),
EQM_PATROL_CREATED
(
"user"
,
"emq.user.created"
),
ORG_USR_DEL
(
"userDel"
,
"user/sync/orgUsrDel"
),
ORG_USR_DEL
(
"userDel"
,
"user/sync/orgUsrDel"
),
ORG_USR
(
"orgUsr"
,
"user/sync/orgUsr"
);
ORG_USR
(
"orgUsr"
,
"user/sync/orgUsr"
),
STATION_USER_UPDATE
(
"sattionUserUpdate"
,
"station/user/update"
),
STATION_USER_DELETE
(
"sattionUserDelete"
,
"station/user/delete"
);
private
String
type
;
private
String
type
;
private
String
topic
;
private
String
topic
;
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/DataSyncServiceImpl.java
View file @
c783b2d3
...
@@ -29,9 +29,6 @@ public class DataSyncServiceImpl implements IDataSyncService {
...
@@ -29,9 +29,6 @@ public class DataSyncServiceImpl implements IDataSyncService {
@Autowired
@Autowired
private
OrgUsrMapper
orgUsrMapper
;
private
OrgUsrMapper
orgUsrMapper
;
@Value
(
"${emq.orgUsr.sync.switch}"
)
private
Boolean
orgUsrSyncSwitch
;
@Override
@Override
public
void
OrgUsrSyncDtoDataSync
(
Long
id
)
{
public
void
OrgUsrSyncDtoDataSync
(
Long
id
)
{
try
{
try
{
...
@@ -43,9 +40,10 @@ public class DataSyncServiceImpl implements IDataSyncService {
...
@@ -43,9 +40,10 @@ public class DataSyncServiceImpl implements IDataSyncService {
for
(
OrgUsrSyncDto
x
:
list
)
{
for
(
OrgUsrSyncDto
x
:
list
)
{
String
message
=
buildSyncMessage
(
DataSyncTopicEnum
.
ORG_USR
.
getTopic
(),
x
);
String
message
=
buildSyncMessage
(
DataSyncTopicEnum
.
ORG_USR
.
getTopic
(),
x
);
emqKeeper
.
getMqttClient
().
publish
(
DataSyncTopicEnum
.
EQM_PATROL_CREATED
.
getTopic
(),
message
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
emqKeeper
.
getMqttClient
().
publish
(
DataSyncTopicEnum
.
EQM_PATROL_CREATED
.
getTopic
(),
message
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
if
(
orgUsrSyncSwitch
)
{
emqKeeper
.
getMqttClient
().
publish
(
DataSyncTopicEnum
.
ORG_USR
.
getTopic
(),
JSONObject
.
toJSONString
(
x
).
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
//站端人员信息同步
}
emqKeeper
.
getMqttClient
().
publish
(
DataSyncTopicEnum
.
STATION_USER_UPDATE
.
getTopic
(),
JSONObject
.
toJSONString
(
x
).
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
}
}
}
}
}
}
...
@@ -63,9 +61,10 @@ public class DataSyncServiceImpl implements IDataSyncService {
...
@@ -63,9 +61,10 @@ public class DataSyncServiceImpl implements IDataSyncService {
orgUsrSyncDto
.
setSequenceNbr
(
id
);
orgUsrSyncDto
.
setSequenceNbr
(
id
);
String
message
=
buildSyncMessage
(
DataSyncTopicEnum
.
ORG_USR_DEL
.
getTopic
(),
orgUsrSyncDto
);
String
message
=
buildSyncMessage
(
DataSyncTopicEnum
.
ORG_USR_DEL
.
getTopic
(),
orgUsrSyncDto
);
emqKeeper
.
getMqttClient
().
publish
(
DataSyncTopicEnum
.
EQM_PATROL_CREATED
.
getTopic
(),
message
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
emqKeeper
.
getMqttClient
().
publish
(
DataSyncTopicEnum
.
EQM_PATROL_CREATED
.
getTopic
(),
message
.
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
if
(
orgUsrSyncSwitch
)
{
emqKeeper
.
getMqttClient
().
publish
(
DataSyncTopicEnum
.
ORG_USR_DEL
.
getTopic
(),
JSONObject
.
toJSONString
(
orgUsrSyncDto
).
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
//站端人员信息删除同步
}
emqKeeper
.
getMqttClient
().
publish
(
DataSyncTopicEnum
.
STATION_USER_DELETE
.
getTopic
(),
JSONObject
.
toJSONString
(
orgUsrSyncDto
).
getBytes
(),
RuleConfig
.
DEFAULT_QOS
,
false
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"站端与中心级人员数据【OrgUsrSyncDto】同步推送失败-----------"
+
e
.
getMessage
());
log
.
error
(
"站端与中心级人员数据【OrgUsrSyncDto】同步推送失败-----------"
+
e
.
getMessage
());
...
...
amos-boot-system-jcs/src/main/resources/application-dev.properties
View file @
c783b2d3
...
@@ -46,5 +46,3 @@ video.url=https://11.11.16.4:443/
...
@@ -46,5 +46,3 @@ video.url=https://11.11.16.4:443/
ifc.url
=
http://11.11.16.17/IFCInterface
ifc.url
=
http://11.11.16.17/IFCInterface
ifc.call-back.localIp
=
11.11.16.1
ifc.call-back.localIp
=
11.11.16.1
#人员消息数据同步开关
emq.orgUsr.sync.switch
=
true
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment