提交代码

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 @Resource
private RedisTemplate redisTemplate; private RedisTemplate redisTemplate;
@Resource
private WebSocket webSocket;
@Resource
private BaiduVoiceService baiduVoiceService;
@Override @Override
@Transactional( @Transactional(
isolation = Isolation.SERIALIZABLE, isolation = Isolation.SERIALIZABLE,
@ -367,7 +373,6 @@ public class HighOrderServiceImpl implements HighOrderService {
// 扣预存款 // 扣预存款
this.redisTemplate.boundListOps(MsgTopic.MerStoreAccount.getName()).leftPush(pushParam); this.redisTemplate.boundListOps(MsgTopic.MerStoreAccount.getName()).leftPush(pushParam);
} }
new Thread(() -> { new Thread(() -> {
try { try {
SpPrinterConfig sp = new SpPrinterConfig(); SpPrinterConfig sp = new SpPrinterConfig();
@ -398,7 +403,6 @@ public class HighOrderServiceImpl implements HighOrderService {
e.printStackTrace(); e.printStackTrace();
} }
}).start(); }).start();
} else if (store.getSourceType().equals(2)) { } else if (store.getSourceType().equals(2)) {
// 推送团油订单 // 推送团油订单
Map<String,Object> paramMap = new HashMap<>(); Map<String,Object> paramMap = new HashMap<>();
@ -501,6 +505,14 @@ public class HighOrderServiceImpl implements HighOrderService {
} }
updateOrder(highOrder); 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 @Override

Loading…
Cancel
Save