puhanshu
2022-08-16 43f0578e80af82ecae6c61b51bd0539c6b960603
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/McsGameServiceImpl.java
@@ -316,10 +316,11 @@
    /**
     * 戳戳游戏顶部统计数据
     * @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("未查询到商家信息");
@@ -330,9 +331,9 @@
            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();
@@ -435,7 +436,8 @@
    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);
    }