huanghongfa
2021-07-06 02c9da2d6c8ce7dd316ba20f1af339321c60b567
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActUserWalletServiceImpl.java
@@ -84,6 +84,14 @@
            }
            comActWalletVO.setAgreement(Constants.PROFIT_EXPLAIN);
        }
        Integer easyCount = 0;
        //查询用户发布随手拍数量
        easyCount = comActEasyPhotoDAO.selectCount(new QueryWrapper<ComActEasyPhotoDO>().lambda()
                .eq(ComActEasyPhotoDO::getSponsorId,walletDetailDTO.getUserId())
                .eq(ComActEasyPhotoDO::getCommunityId,walletDetailDTO.getCommunityId()));
        comActWalletVO.setEasyCount(easyCount);
        return R.ok(comActWalletVO);
    }
@@ -133,9 +141,6 @@
        //活动正在进行中,需要给用户计算收益
        if(nowDate.getTime() - photoActivityDO.getActivityStartAt().getTime() > 0 && nowDate.getTime() - photoActivityDO.getActivityEndAt().getTime() < 0){
            photoActivityDO.setCount(photoActivityDO.getCount() + 1);
            comActEasyPhotoActivityMapper.updateById(photoActivityDO);
            //查询用户钱包
            ComActUserWalletDO userWalletDO = comActUserWalletMapper.selectOne(new QueryWrapper<ComActUserWalletDO>()
                    .lambda().eq(ComActUserWalletDO::getUserId,easyPhotoDO.getSponsorId()).eq(ComActUserWalletDO::getCommunityId,easyPhotoDO.getCommunityId()));
@@ -171,7 +176,6 @@
                BigDecimal oldSettlementAmount = userWalletDO.getSettlementAmount();
                //更新钱包金额
                userWalletDO.setEasyCount(userWalletDO.getEasyCount() + 1);
                userWalletDO.setIncomeAmount(userWalletDO.getIncomeAmount().add(profitAmount));
                userWalletDO.setAvailableAmount(userWalletDO.getAvailableAmount().add(profitAmount));
                comActUserWalletMapper.updateById(userWalletDO);