From 02c9da2d6c8ce7dd316ba20f1af339321c60b567 Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期二, 06 七月 2021 18:03:56 +0800 Subject: [PATCH] 修改bug --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActUserWalletServiceImpl.java | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActUserWalletServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActUserWalletServiceImpl.java index c152393..3b552a4 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActUserWalletServiceImpl.java +++ b/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); -- Gitblit v1.7.1