| | |
| | | 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.dao.OtcReturnMoneyDao; |
| | | import com.xcong.excoin.modules.otc.entity.OtcEntrustOrder; |
| | | import com.xcong.excoin.modules.otc.entity.OtcMarketBussiness; |
| | | import com.xcong.excoin.modules.otc.entity.OtcOrder; |
| | | import com.xcong.excoin.modules.otc.entity.OtcReturnMoney; |
| | | import com.xcong.excoin.utils.LogRecordUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.amqp.rabbit.annotation.RabbitListener; |
| | |
| | | |
| | | @Autowired |
| | | private MemberWalletCoinDao memberWalletCoinDao; |
| | | |
| | | @Autowired |
| | | private OtcReturnMoneyDao otcReturnMoneyDao; |
| | | |
| | | @RabbitListener(queues = RabbitMqConfig.QUEUE_MARKET_BUSSINESS) |
| | | public void marketBussiness(String content) { |
| | |
| | | memberWalletCoinDao.updateBlockBalance(wallet.getId(), returnAmount, BigDecimal.ZERO, 0); |
| | | |
| | | LogRecordUtils.insertMemberAccountMoneyChange(parent.getId(),"订单返利:" + content, returnAmount, "USDT", 1, 1); |
| | | |
| | | OtcReturnMoney otcReturnMoney = new OtcReturnMoney(); |
| | | otcReturnMoney.setToMemberId(parent.getId()); |
| | | otcReturnMoney.setOrderNo(content); |
| | | otcReturnMoney.setFromMemberId(member.getId()); |
| | | otcReturnMoney.setAmount(returnAmount); |
| | | otcReturnMoneyDao.insert(otcReturnMoney); |
| | | |
| | | isFirst = 0; |
| | | } |
| | | } |