Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
4aa6f86c
Commit
4aa6f86c
authored
Aug 10, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加押金记录客服电话,出行记录查询筛选
parent
95c80475
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
pom.xml
xx-universal/xx-universal-server/pom.xml
+6
-0
MQServiceBiZ.java
...in/java/com/xxfc/platform/universal/biz/MQServiceBiZ.java
+11
-0
No files found.
xx-universal/xx-universal-server/pom.xml
View file @
4aa6f86c
...
@@ -24,6 +24,12 @@
...
@@ -24,6 +24,12 @@
<version>
2.0-SNAPSHOT
</version>
<version>
2.0-SNAPSHOT
</version>
<scope>
compile
</scope>
<scope>
compile
</scope>
</dependency>
</dependency>
<dependency>
<groupId>
com.xxfc.platform
</groupId>
<artifactId>
xx-activity-api
</artifactId>
<version>
2.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<dependency>
<groupId>
com.aliyun
</groupId>
<groupId>
com.aliyun
</groupId>
<artifactId>
aliyun-java-sdk-core
</artifactId>
<artifactId>
aliyun-java-sdk-core
</artifactId>
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/biz/MQServiceBiZ.java
View file @
4aa6f86c
package
com
.
xxfc
.
platform
.
universal
.
biz
;
package
com
.
xxfc
.
platform
.
universal
.
biz
;
import
com.github.wxiaoqi.security.common.config.rabbit.RabbitConstant
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.activity.config.RabbitActivityConfig
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.amqp.core.Message
;
import
org.springframework.amqp.core.Message
;
import
org.springframework.amqp.core.MessageBuilder
;
import
org.springframework.amqp.core.MessageBuilder
;
import
org.springframework.amqp.core.MessageProperties
;
import
org.springframework.amqp.core.MessageProperties
;
...
@@ -12,6 +15,8 @@ import org.springframework.transaction.annotation.Transactional;
...
@@ -12,6 +15,8 @@ import org.springframework.transaction.annotation.Transactional;
import
java.util.UUID
;
import
java.util.UUID
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
config
.
rabbit
.
RabbitConstant
.
INTEGRAL_TOPIC
;
@Service
@Service
@Slf4j
@Slf4j
public
class
MQServiceBiZ
{
public
class
MQServiceBiZ
{
...
@@ -23,6 +28,12 @@ public class MQServiceBiZ {
...
@@ -23,6 +28,12 @@ public class MQServiceBiZ {
public
ObjectRestResponse
sendMessage
(
String
exchange
,
String
routKey
,
String
json
)
{
public
ObjectRestResponse
sendMessage
(
String
exchange
,
String
routKey
,
String
json
)
{
log
.
info
(
"发送消息到消息队列:exchange = {}, routingKey = {}, json = {}"
,
exchange
,
routKey
,
json
);
log
.
info
(
"发送消息到消息队列:exchange = {}, routingKey = {}, json = {}"
,
exchange
,
routKey
,
json
);
log
.
info
(
"开始发送消息。。。"
);
log
.
info
(
"开始发送消息。。。"
);
if
(
StringUtils
.
isBlank
(
exchange
))
{
exchange
=
INTEGRAL_TOPIC
;
}
if
(
StringUtils
.
isBlank
(
routKey
))
{
routKey
=
RabbitConstant
.
INTEGRAL_ROUTING_KEY
;
}
Message
message
=
MessageBuilder
.
withBody
(
json
.
getBytes
())
Message
message
=
MessageBuilder
.
withBody
(
json
.
getBytes
())
.
setContentType
(
MessageProperties
.
CONTENT_TYPE_JSON
).
setContentEncoding
(
"utf-8"
)
.
setContentType
(
MessageProperties
.
CONTENT_TYPE_JSON
).
setContentEncoding
(
"utf-8"
)
.
setMessageId
(
UUID
.
randomUUID
()
+
""
).
build
();
.
setMessageId
(
UUID
.
randomUUID
()
+
""
).
build
();
...
...
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