提交代码

dev-discount
胡锐 3 years ago
parent e59848a089
commit 4b6a0f0cfd
  1. 16
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java

@ -113,6 +113,12 @@ public class HighOrderServiceImpl implements HighOrderService {
@Resource
private RedisTemplate redisTemplate;
@Resource
private WebSocket webSocket;
@Resource
private BaiduVoiceService baiduVoiceService;
@Override
@Transactional(
isolation = Isolation.SERIALIZABLE,
@ -367,7 +373,6 @@ public class HighOrderServiceImpl implements HighOrderService {
// 扣预存款
this.redisTemplate.boundListOps(MsgTopic.MerStoreAccount.getName()).leftPush(pushParam);
}
new Thread(() -> {
try {
SpPrinterConfig sp = new SpPrinterConfig();
@ -398,7 +403,6 @@ public class HighOrderServiceImpl implements HighOrderService {
e.printStackTrace();
}
}).start();
} else if (store.getSourceType().equals(2)) {
// 推送团油订单
Map<String,Object> paramMap = new HashMap<>();
@ -501,6 +505,14 @@ public class HighOrderServiceImpl implements HighOrderService {
}
updateOrder(highOrder);
if (highOrder.getHighChildOrderList().get(0).getGoodsType().equals(3)) {
Map<String, Object> message = new HashMap<>();
message.put("order", highOrderService.getOrderByOrderNo(highOrder.getOrderNo()));
message.put("voice", baiduVoiceService.text2audio(highOrder.getHighChildOrderList().get(0).getGoodsName() + "加油站,收款:" + highOrder.getTotalPrice()));
webSocket.SenderMessage(highOrder.getHighChildOrderList().get(0).getGoodsId().toString()
, JSONObject.toJSONString(message));
}
}
@Override

Loading…
Cancel
Save