Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
7a797f31
Commit
7a797f31
authored
Aug 25, 2022
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
网关日志添加
parent
aafea009
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
32 deletions
+0
-32
common-lib/src/main/java/com/mortals/xhx/module/MessageProducer.java
...src/main/java/com/mortals/xhx/module/MessageProducer.java
+0
-32
No files found.
common-lib/src/main/java/com/mortals/xhx/module/MessageProducer.java
deleted
100644 → 0
View file @
aafea009
package
com.mortals.xhx.module
;
import
com.alibaba.fastjson.JSON
;
import
com.mortals.xhx.common.keys.QueueKey
;
import
com.mortals.xhx.common.pdu.access.AccessLogPdu
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.amqp.rabbit.core.RabbitTemplate
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
@Component
@Slf4j
public
class
MessageProducer
{
@Autowired
private
RabbitTemplate
rabbitTemplate
;
public
void
syncAccessSend
(
AccessLogPdu
accessLogPdu
)
{
if
(!
ObjectUtils
.
isEmpty
(
accessLogPdu
))
{
String
jsonString
=
JSON
.
toJSONString
(
accessLogPdu
);
if
(
log
.
isDebugEnabled
())
{
log
.
debug
(
"accessLog==>{}"
,
jsonString
);
}
rabbitTemplate
.
convertAndSend
(
QueueKey
.
EXCHANGE
,
QueueKey
.
ACCESS_LOG_QUEUE
,
jsonString
);
}
else
{
log
.
info
(
"accessLogPdu is null"
);
}
}
}
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