fix
Helius
2021-11-26 ac88906c833cb3ead2f61cbebf646cd3d6ea65a1
src/main/java/com/xcong/excoin/rabbit/consumer/FishHitConsumer.java
@@ -35,13 +35,12 @@
    @RabbitListener(queues = RabbitMqConfig.QUEUE_FISH_HIT)
    public void fishHit(String content) {
        log.info("收到打渔消息:{}", content);
        MsgModel msg = JSONObject.parseObject(content, MsgModel.class);
        synchronized (this) {
            List<CannonOwnRecord> forts = cannonOwnRecordDao.selectCannonOwnRecordsByMemberIdAndCannonCode(msg.getMemberId(), msg.getFortCode());
            if (CollUtil.isEmpty(forts)) {
                log.info("未拥有该炮台");
                log.info("未拥有该炮台:{}", content);
                return;
            }
@@ -49,6 +48,7 @@
            BigDecimal available = accountGold.getAvailableBalance();
            BigDecimal gold;
            // 由于前端打渔实现逻辑为,点击炮台发射子弹时触发一次,打中鱼再触发一次,所以,扣减和增加分开算
            if (msg.getObtain() == 0) {
                gold = msg.getConsume().negate();
            } else {
@@ -56,7 +56,7 @@
            }
            if (msg.getConsume().compareTo(available) > 0) {
                log.info("余额不足");
                log.info("余额不足:{}", content);
                return;
            }