From f2c16a386e87ff571c88af97525d1b0cf4afb268 Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Tue, 01 Jun 2021 17:36:13 +0800 Subject: [PATCH] modify --- src/main/java/com/xcong/excoin/rabbit/consumer/OtcConsumer.java | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/xcong/excoin/rabbit/consumer/OtcConsumer.java b/src/main/java/com/xcong/excoin/rabbit/consumer/OtcConsumer.java index c794c2c..59a2307 100644 --- a/src/main/java/com/xcong/excoin/rabbit/consumer/OtcConsumer.java +++ b/src/main/java/com/xcong/excoin/rabbit/consumer/OtcConsumer.java @@ -4,6 +4,7 @@ import com.xcong.excoin.configurations.RabbitMqConfig; import com.xcong.excoin.modules.otc.dao.OtcEntrustOrderDao; import com.xcong.excoin.modules.otc.dao.OtcMarketBussinessDao; +import com.xcong.excoin.modules.otc.dao.OtcOrderDao; import com.xcong.excoin.modules.otc.entity.OtcEntrustOrder; import com.xcong.excoin.modules.otc.entity.OtcMarketBussiness; import com.xcong.excoin.modules.otc.entity.OtcOrder; @@ -28,11 +29,15 @@ @Autowired private OtcEntrustOrderDao otcEntrustOrderDao; + @Autowired + private OtcOrderDao otcOrderDao; + @RabbitListener(queues = RabbitMqConfig.QUEUE_MARKET_BUSSINESS) public void marketBussiness(String content) { log.info("收到市商消息:{}", content); JSONObject jsonObject = JSONObject.parseObject(content); - Long entrustOrderId = (Long) jsonObject.get("entrustOrderId"); + Integer entrustOrderIdInt = jsonObject.getInteger("entrustOrderId"); + Long entrustOrderId = entrustOrderIdInt.longValue(); Integer status = jsonObject.getInteger("status"); OtcEntrustOrder entrustOrder = otcEntrustOrderDao.selectById(entrustOrderId); @@ -52,6 +57,15 @@ mb.setFinishRatio(buyFinishRatio); mb.setSaleFinishRatio(saleFinishRatio); + + // 平均付款时间 +// BigDecimal avgPayTime = otcOrderDao.selectMemberAvgPayTime(mb.getMemberId()); +// // 平均放币时间 +// BigDecimal avgCoinTime = otcOrderDao.selectMemberAvgCoinTime(mb.getMemberId()); +// +// mb.setAvgPayTime(avgPayTime.intValue()); +// mb.setAvgCoinTime(avgCoinTime.intValue()); + otcMarketBussinessDao.updateById(mb); } -- Gitblit v1.9.1