From 7eedb5a250515610f1df1fa0730cf779f0525add Mon Sep 17 00:00:00 2001 From: manailin <261030956@qq.com> Date: 星期四, 08 七月 2021 08:56:33 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/test' into test --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java | 20 ++++++++++++++++++-- 1 files changed, 18 insertions(+), 2 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java index f325c99..090522f 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java @@ -17,6 +17,7 @@ import com.panzhihua.service_community.dao.*; import com.panzhihua.service_community.model.dos.*; import com.panzhihua.service_community.service.ComActEasyPhotoService; +import com.panzhihua.service_community.service.ComActUserWalletService; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import org.springframework.util.ObjectUtils; @@ -44,6 +45,8 @@ private ComActEasyPhotoCommentUserDAO comActEasyPhotoCommentUserDAO ; @Resource private ComActEasyPhotoActivityMapper comActEasyPhotoActivityMapper; + @Resource + private ComActUserWalletService comActUserWalletService; /** * 分页查询随手拍 * @@ -133,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) { @@ -191,10 +196,11 @@ ComActEasyPhotoDO cmActEasyPhotoDO=new ComActEasyPhotoDO(); cmActEasyPhotoDO.setId(comActEasyPhotoVO.getId()); cmActEasyPhotoDO.setHandlerId(comActEasyPhotoVO.getUserId()); +// cmActEasyPhotoDO.setActivityType(comActEasyPhotoVO.getActivityType()); Date date = new Date(); switch (type){ case 1: - int isNeedFeedBack = comActEasyPhotoVO.getIsNeedFeedBack().intValue(); + Integer isNeedFeedBack = comActEasyPhotoVO.getIsNeedFeedBack(); if (isNeedFeedBack==1) { cmActEasyPhotoDO.setStatus(2);//进行中 cmActEasyPhotoDO.setIsNeedFeedBack(1); @@ -202,6 +208,8 @@ cmActEasyPhotoDO.setStatus(4);//已完成 } cmActEasyPhotoDO.setExamineAt(date); + //审核通过判断随手拍是否有活动并计算用户收益 + comActUserWalletService.examineAddMoney(comActEasyPhotoVO.getActivityType(),comActEasyPhotoVO.getId(),comActEasyPhotoVO.getUserId()); break; case 2: cmActEasyPhotoDO.setStatus(3);//已驳回 @@ -376,7 +384,15 @@ return R.fail(); } - + /** + * 社区随手拍列表统计 + * @param communityId 社区id + * @return 统计结果 + */ + @Override + public R easyPhotoStatistics(Long communityId){ + return R.ok(this.baseMapper.getEasyPhotoStatistics(communityId)); + } } -- Gitblit v1.7.1