public Integer bingMoneyByBagId(String bagId) { Integer money = null; Bingo.BING_TIMEOUT.put(bagId, System.currentTimeMillis()); List<Integer> bings = Bingo.BINGO_MAP.get(bagId); if (Collections3.isNotEmpty(bings)) { money = bingMoneyBag(bings); } else { if (bings != null && bings.size() == 0) { money = -1; } else { SchoolBingoService sbService = SpringContextHolder.getBean(SchoolBingoService.class); bings = sbService.addBingoByBagId(bagId); if (Collections3.isNotEmpty(bings)) { money = bingMoneyBag(bings); } else { money = -1; } } } return money; }
@Override public void destroy() throws Exception { SpringContextHolder.clearHolder(); }