| | |
| | | import com.xcong.excoin.modules.platform.entity.PlatformSymbolsCoinEntity;
|
| | |
|
| | | import com.xcong.excoin.modules.symbols.constants.SymbolsConstats;
|
| | | import com.xcong.excoin.rabbit.producer.OrderSubmitProducer;
|
| | | import com.xcong.excoin.trade.CoinTrader;
|
| | | import com.xcong.excoin.trade.CoinTraderFactory;
|
| | | import com.xcong.excoin.trade.ExchangeTrade;
|
| | |
| | |
|
| | | @Resource
|
| | | private MemberDao memberDao;
|
| | |
|
| | | @Resource
|
| | | private OrderSubmitProducer orderSubmitProducer;
|
| | |
|
| | |
|
| | | @Override
|
| | |
| | | // memberWalletCoinDao.updateById(walletCoin);
|
| | | memberWalletCoinDao.updateWalletBalance(walletCoin.getId(),amount.negate(),amount.negate(),amount);
|
| | | }
|
| | | // 加入到撮合
|
| | | CoinTrader trader = factory.getTrader(symbol);
|
| | | trader.trade(order);
|
| | | // 加入到撮合 TODO 通过消息队列发送到交易撮合
|
| | | //CoinTrader trader = factory.getTrader(symbol);
|
| | | //trader.trade(order);
|
| | | order.setSymbol(symbol);
|
| | | orderSubmitProducer.sendMsg(JSONObject.toJSONString(order));
|
| | | return Result.ok(MessageSourceUtils.getString("order_service_0011"));
|
| | | }
|
| | |
|