| | |
| | | } |
| | | Integer beforeCoins = mcsGame.getCoins(); |
| | | Integer beforeSurplusCoins = mcsGame.getSurplusCoins(); |
| | | if (isNull(beforeSurplusCoins)) { |
| | | beforeSurplusCoins = beforeCoins; |
| | | } |
| | | Integer beforeUsedCoins = beforeCoins - beforeSurplusCoins; |
| | | Integer surplusCoins = coins - beforeUsedCoins; |
| | | if (surplusCoins < 0) { |
| | |
| | | public R getMcsGame(Long gameId) { |
| | | McsGameVO mcsGameVO = this.baseMapper.selectDetailById(gameId); |
| | | Integer gameCount = this.baseMapper.selectCount(new QueryWrapper<McsGame>().lambda() |
| | | .eq(McsGame::getMerchantId, mcsGameVO.getMerchantId()).eq(McsGame::getIsDel, false)); |
| | | .eq(McsGame::getMerchantId, mcsGameVO.getMerchantId()).eq(McsGame::getStatus, McsGame.Status.jxz).eq(McsGame::getIsDel, false)); |
| | | mcsGameVO.setGameCount(gameCount); |
| | | return R.ok(mcsGameVO); |
| | | } |