test
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.volvo.ai.analytic.center.controller;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.volvo.common.core.util.ResultMsg;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -28,8 +29,9 @@ public class TestController {
|
||||
|
||||
@PostMapping("/mockMq")
|
||||
@ApiOperation(value = "补偿处理消息")
|
||||
public ResultMsg<Object> mockMq(@RequestBody String topic,@RequestBody String message) {
|
||||
rocketMQTemplate.syncSend(topic, message);
|
||||
public ResultMsg<Object> mockMq(@RequestBody String message) {
|
||||
JSONObject messageJson = JSONObject.parseObject(message);
|
||||
rocketMQTemplate.syncSend(messageJson.getString("topic"), messageJson.getString("message"));
|
||||
return ResultMsg.ok("ok");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user