From febc33b84c7ac40c500c27dccd2a5c871c2c05f0 Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期一, 28 六月 2021 11:07:49 +0800
Subject: [PATCH] 后台管理审核随手拍计算用户收益

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java |    8 +++++++-
 1 files changed, 7 insertions(+), 1 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..830d97a 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;
     /**
      * 分页查询随手拍
      *
@@ -191,10 +194,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 +206,8 @@
                     cmActEasyPhotoDO.setStatus(4);//已完成
                 }
                 cmActEasyPhotoDO.setExamineAt(date);
+                //审核通过判断随手拍是否有活动并计算用户收益
+                comActUserWalletService.examineAddMoney(comActEasyPhotoVO.getActivityType(),comActEasyPhotoVO.getId(),comActEasyPhotoVO.getUserId());
                 break;
             case 2:
                 cmActEasyPhotoDO.setStatus(3);//已驳回

--
Gitblit v1.7.1