Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
Y
yzg-util
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
YZG
yzg-util
Commits
dd6723ac
Commit
dd6723ac
authored
Apr 10, 2019
by
yanzg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息队列服务
parent
cd61b8f9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
MqService.java
...q/src/main/java/com/yanzuoguang/mq/service/MqService.java
+5
-5
MqServiceImpl.java
...n/java/com/yanzuoguang/mq/service/impl/MqServiceImpl.java
+10
-10
No files found.
yzg-util-mq/src/main/java/com/yanzuoguang/mq/service/MqService.java
View file @
dd6723ac
...
...
@@ -15,7 +15,7 @@ public interface MqService {
*
* @param req
*/
ResponseResult
<
String
>
createQueue
(
QueueVo
req
);
String
createQueue
(
QueueVo
req
);
/**
* 查询队列
...
...
@@ -23,14 +23,14 @@ public interface MqService {
* @param req 请求数据
* @return 查询结果
*/
ResponseResult
<
PageSizeData
<
QueueVo
>
>
queryQueue
(
QueueQueryReqVo
req
);
PageSizeData
<
QueueVo
>
queryQueue
(
QueueQueryReqVo
req
);
/**
* 查询队列
*
* @return 查询结果
*/
ResponseResult
<
String
>
queryInit
();
String
queryInit
();
/**
* 发送消息
...
...
@@ -38,7 +38,7 @@ public interface MqService {
* @param req 需要发送的消息
* @return 消息编号,但是没有任何意义,发送成功会更改
*/
ResponseResult
<
String
>
message
(
MessageVo
req
);
String
message
(
MessageVo
req
);
/**
* 发送错误消息
...
...
@@ -46,5 +46,5 @@ public interface MqService {
* @param req
* @return
*/
ResponseResult
<
String
>
message_error
(
MessageVo
req
);
String
message_error
(
MessageVo
req
);
}
yzg-util-mq/src/main/java/com/yanzuoguang/mq/service/impl/MqServiceImpl.java
View file @
dd6723ac
...
...
@@ -25,9 +25,9 @@ public class MqServiceImpl implements MqService {
*
* @param req
*/
public
ResponseResult
<
String
>
createQueue
(
QueueVo
req
)
{
public
String
createQueue
(
QueueVo
req
)
{
req
.
check
();
return
ResponseResult
.
result
(
queueService
.
create
(
req
)
);
return
queueService
.
create
(
req
);
}
/**
...
...
@@ -36,8 +36,8 @@ public class MqServiceImpl implements MqService {
* @param req 请求数据
* @return 查询结果
*/
public
ResponseResult
<
PageSizeData
<
QueueVo
>
>
queryQueue
(
QueueQueryReqVo
req
)
{
return
ResponseResult
.
result
(
queueService
.
query
(
req
)
);
public
PageSizeData
<
QueueVo
>
queryQueue
(
QueueQueryReqVo
req
)
{
return
queueService
.
query
(
req
);
}
/**
...
...
@@ -45,9 +45,9 @@ public class MqServiceImpl implements MqService {
*
* @return 查询结果
*/
public
ResponseResult
<
String
>
queryInit
()
{
public
String
queryInit
()
{
queueService
.
init
();
return
ResponseResult
.
result
(
"初始化完成"
)
;
return
"初始化完成"
;
}
/**
...
...
@@ -56,9 +56,9 @@ public class MqServiceImpl implements MqService {
* @param req 需要发送的消息
* @return 消息编号,但是没有任何意义,发送成功会更改
*/
public
ResponseResult
<
String
>
message
(
MessageVo
req
)
{
public
String
message
(
MessageVo
req
)
{
req
.
check
();
return
ResponseResult
.
result
(
messageService
.
send
(
req
)
);
return
messageService
.
send
(
req
);
}
/**
...
...
@@ -67,8 +67,8 @@ public class MqServiceImpl implements MqService {
* @param req
* @return
*/
public
ResponseResult
<
String
>
message_error
(
MessageVo
req
)
{
public
String
message_error
(
MessageVo
req
)
{
req
.
check
();
return
ResponseResult
.
result
(
messageService
.
onError
(
req
)
);
return
messageService
.
onError
(
req
);
}
}
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