提交代码

dev-discount
胡锐 3 years ago
parent f2c14dacaa
commit 564de231f9
  1. 6
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java
  2. 12
      hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java

@ -483,7 +483,7 @@ public class HighOrderServiceImpl implements HighOrderService {
msgContent.put("order", highOrderService.getGasOrderDetail(highOrder.getOrderNo())); msgContent.put("order", highOrderService.getGasOrderDetail(highOrder.getOrderNo()));
msgContent.put("voice", baiduVoiceService.text2audio(highOrder.getHighChildOrderList().get(0).getGoodsName() + ",收款:" + highOrder.getTotalPrice())); msgContent.put("voice", baiduVoiceService.text2audio(highOrder.getHighChildOrderList().get(0).getGoodsName() + ",收款:" + highOrder.getTotalPrice()));
pushMsg.put("message", JSONObject.toJSONString(msgContent)); pushMsg.put("message", JSONObject.toJSONString(msgContent));
HttpsUtils.doGet("http://127.0.0.1:9901/msg/websocket/websocket", pushMsg); HttpsUtils.doPost("http://127.0.0.1:9901/msg/websocket/websocket", pushMsg, new HashMap<>());
} }
}).start(); }).start();
} }
@ -753,7 +753,7 @@ public class HighOrderServiceImpl implements HighOrderService {
msgContent.put("order", highOrderService.getGasOrderDetail(order.getOrderNo())); msgContent.put("order", highOrderService.getGasOrderDetail(order.getOrderNo()));
msgContent.put("voice", baiduVoiceService.text2audio(order.getHighChildOrderList().get(0).getGoodsName() + ",收款:" + order.getTotalPrice())); msgContent.put("voice", baiduVoiceService.text2audio(order.getHighChildOrderList().get(0).getGoodsName() + ",收款:" + order.getTotalPrice()));
pushMsg.put("message", JSONObject.toJSONString(msgContent)); pushMsg.put("message", JSONObject.toJSONString(msgContent));
HttpsUtils.doGet("http://127.0.0.1:9901/msg/websocket/websocket", pushMsg); HttpsUtils.doPost("http://127.0.0.1:9901/msg/websocket/websocket", pushMsg, new HashMap<>());
} }
}).start(); }).start();
} }
@ -1110,7 +1110,7 @@ public class HighOrderServiceImpl implements HighOrderService {
msgContent.put("order", highOrderService.getGasOrderDetail(order.getOrderNo())); msgContent.put("order", highOrderService.getGasOrderDetail(order.getOrderNo()));
msgContent.put("voice", baiduVoiceService.text2audio(order.getHighChildOrderList().get(0).getGoodsName() + ",收款:" + order.getTotalPrice())); msgContent.put("voice", baiduVoiceService.text2audio(order.getHighChildOrderList().get(0).getGoodsName() + ",收款:" + order.getTotalPrice()));
pushMsg.put("message", JSONObject.toJSONString(msgContent)); pushMsg.put("message", JSONObject.toJSONString(msgContent));
HttpsUtils.doGet("http://127.0.0.1:9901/msg/websocket/websocket", pushMsg); HttpsUtils.doPost("http://127.0.0.1:9901/msg/websocket/websocket", pushMsg, new HashMap<>());
} }
}).start(); }).start();
} }

@ -443,10 +443,14 @@ public class GoodsOrderServiceImpl implements PayService {
if (order.getHighChildOrderList().get(0).getGoodsType().equals(3)) { if (order.getHighChildOrderList().get(0).getGoodsType().equals(3)) {
new Thread(() -> { new Thread(() -> {
Map<String, Object> message = new HashMap<>(); Map<String, Object> pushMsg = new HashMap<>();
message.put("order", highOrderService.getGasOrderDetail(order.getOrderNo())); pushMsg.put("userId", order.getHighChildOrderList().get(0).getGoodsId());
message.put("voice", baiduVoiceService.text2audio(order.getHighChildOrderList().get(0).getGoodsName() + ",收款:" + order.getTotalPrice()));
HttpsUtils.doGet("http://127.0.0.1:9901/msg/test/websocket", message); Map<String, Object> msgContent = new HashMap<>();
msgContent.put("order", highOrderService.getGasOrderDetail(order.getOrderNo()));
msgContent.put("voice", baiduVoiceService.text2audio(order.getHighChildOrderList().get(0).getGoodsName() + ",收款:" + order.getTotalPrice()));
pushMsg.put("message", JSONObject.toJSONString(msgContent));
HttpsUtils.doPost("http://127.0.0.1:9901/msg/websocket/websocket", pushMsg, new HashMap<>());
}).start(); }).start();
new Thread(() -> { new Thread(() -> {

Loading…
Cancel
Save