KKSU
2024-04-29 0d30c93d000413c6eb34f489ef17688ad4175201
src/main/java/com/xcong/excoin/rabbit/consumer/OtcConsumer.java
@@ -13,9 +13,11 @@
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;
@@ -51,6 +53,9 @@
    @Autowired
    private MemberWalletCoinDao memberWalletCoinDao;
    @Autowired
    private OtcReturnMoneyDao otcReturnMoneyDao;
    @RabbitListener(queues = RabbitMqConfig.QUEUE_MARKET_BUSSINESS)
    public void marketBussiness(String content) {
@@ -137,6 +142,14 @@
                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;
            }
        }