Commit 0555e7c4 authored by 周健威's avatar 周健威

修改bug

parent e00fe2ba
......@@ -437,8 +437,8 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper, BaseOrder> {
orderMQDTO.setSign(sign);
SendMsgDTO sendMsgDTO = new SendMsgDTO(){{
setExchange(ORDER_TOPIC);
setJson(JSONUtil.toJsonStr(orderMQDTO));
}};
sendMsgDTO.setJson(JSONUtil.toJsonStr(orderMQDTO));
switch (sign) {
case 2:
sendMsgDTO.setRoutKey(KEY_ORDER_CANCEL);
......
......@@ -4,10 +4,7 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.xxfc.platform.universal.biz.MQServiceBiZ;
import com.xxfc.platform.universal.dto.SendMsgDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping(value = "message")
......@@ -22,7 +19,7 @@ public class MQSenderController {
}
@PostMapping(value = "/sendMessage")
public ObjectRestResponse sendMessage(SendMsgDTO dto) {
public ObjectRestResponse sendMessage(@RequestBody SendMsgDTO dto) {
return mqServiceBiZ.sendMessage(dto.getExchange(), dto.getRoutKey(), dto.getJson());
}
......
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