| | |
| | | /** |
| | | * 戳戳游戏顶部统计数据 |
| | | * @param userId |
| | | * @param type |
| | | * @return |
| | | */ |
| | | @Override |
| | | public R getTopStatistics(Long userId) { |
| | | public R getTopStatistics(Long userId, Integer type) { |
| | | McsMerchant mcsMerchant = mcsMerchantDAO.selectOne(new QueryWrapper<McsMerchant>().lambda().eq(McsMerchant::getUserId, userId)); |
| | | if (isNull(mcsMerchant)) { |
| | | return R.fail("未查询到商家信息"); |
| | |
| | | int surplusLitDays = DateUtils.retrieveRemainingDays(mcsMerchant.getExpireAt()); |
| | | topStatisticsVO.setSurplusLitDays(surplusLitDays > 0 ? surplusLitDays : 0); |
| | | } |
| | | Integer appliedCount = this.baseMapper.selectAppliedCount(mcsMerchant.getId()); |
| | | Integer appliedCount = this.baseMapper.selectAppliedCount(mcsMerchant.getId(), type); |
| | | topStatisticsVO.setAppliedTotal(appliedCount); |
| | | Integer verifiedCount = this.baseMapper.selectVerifiedCount(mcsMerchant.getId()); |
| | | Integer verifiedCount = this.baseMapper.selectVerifiedCount(mcsMerchant.getId(), type); |
| | | topStatisticsVO.setVerifiedTotal(verifiedCount); |
| | | |
| | | Integer publishLimit = mcsMerchant.getPublishLimit(); |
| | |
| | | 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::getStatus, McsGame.Status.jxz).eq(McsGame::getIsDel, false)); |
| | | .eq(McsGame::getMerchantId, mcsGameVO.getMerchantId()).eq(McsGame::getStatus, McsGame.Status.jxz) |
| | | .eq(McsGame::getType, mcsGameVO.getType()).eq(McsGame::getIsDel, false)); |
| | | mcsGameVO.setGameCount(gameCount); |
| | | return R.ok(mcsGameVO); |
| | | } |