| | |
| | | |
| | | @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; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | if (msg.getConsume().compareTo(available) > 0) { |
| | | log.info("余额不足"); |
| | | log.info("余额不足:{}", content); |
| | | return; |
| | | } |
| | | |