| | |
| | | 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; |
| | |
| | | @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); |
| | | |
| | |
| | | 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); |
| | | } |
| | | |