zainali5120
2020-10-10 f8a0008705fd8067959151ce83c5dce19e72fb85
src/main/java/com/xcong/excoin/rabbit/consumer/UsdtUpdateConsumer.java
@@ -6,6 +6,7 @@
import com.xcong.excoin.modules.coin.service.BlockCoinService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@@ -16,6 +17,7 @@
 **/
@Slf4j
@Component
@ConditionalOnProperty(prefix = "app", name = "block-job", havingValue = "true")
public class UsdtUpdateConsumer {
@@ -25,7 +27,7 @@
    @RabbitListener(queues = RabbitMqConfig.QUEUE_USDT_UPDATE)
    public void doSomething(String content) {
        log.info("#---->{}#", content);
        log.info("#USDT同步---->{}#", content);
        EthUsdtChargeDto ethUsdtChargeDto = JSONObject.parseObject(content, EthUsdtChargeDto.class);
        // 更新这个用户的余额
        blockCoinService.updateEthUsdtNew(ethUsdtChargeDto);