huanghongfa
2021-07-06 02c9da2d6c8ce7dd316ba20f1af339321c60b567
修改bug
3个文件已修改
16 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoDAO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActUserWalletServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoDAO.java
@@ -44,6 +44,8 @@
            "p.feedback_at, " +
            "p.is_report, " +
            "p.is_publicity, " +
            "p.activity_type, " +
            "p.activity_amount, " +
            "p.examine_at  " +
            "FROM " +
            "com_act_easy_photo p " +
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java
@@ -136,7 +136,9 @@
                        .le(ComActEasyPhotoActivityDO::getActivityStartAt,nowDate).ge(ComActEasyPhotoActivityDO::getActivityEndAt,nowDate));
        if(!photoActivityDOS.isEmpty()){
            ComActEasyPhotoActivityDO photoActivityDO = photoActivityDOS.get(0);
            photoActivityDO.setCount(photoActivityDO.getCount() + 1);
            comActEasyPhotoDO.setActivityId(photoActivityDO.getId());
            comActEasyPhotoActivityMapper.updateById(photoActivityDO);
        }
        int insert = comActEasyPhotoDAO.insert(comActEasyPhotoDO);
        if (insert>0) {
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);