Commit dd6723ac authored by yanzg's avatar yanzg

消息队列服务

parent cd61b8f9
......@@ -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);
}
......@@ -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);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment