From b92edf56e7e25440e7c46b967aa5373a7a8b25c2 Mon Sep 17 00:00:00 2001
From: puhanshu <a9236326>
Date: 星期一, 14 三月 2022 09:22:02 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev

---
 springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java |   30 +++++++++++++++++++++++++++---
 1 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java
index 11c5138..ec6b707 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java
@@ -2,6 +2,9 @@
 
 import javax.annotation.Resource;
 
+import com.panzhihua.common.model.dtos.common.EvaluateEasyDto;
+import com.panzhihua.common.model.vos.community.easyPhoto.BannerVO;
+import com.panzhihua.common.service.community.ComActEasyPhotoEvaluateFeign;
 import org.springframework.util.ObjectUtils;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
@@ -48,6 +51,8 @@
     private UserService userService;
     @Resource
     private CheckService checkService;
+    @Resource
+    private ComActEasyPhotoEvaluateFeign easyPhotoEvaluateFeign;
 
     @ApiOperation(value = "分页展示社区随手拍", response = ComActEasyPhotoVO.class)
     @PostMapping("pageeasyphoto")
@@ -155,7 +160,7 @@
         }
         comActMicroWishVO.setIsApplets(1);
         comActMicroWishVO.setIsPageMyWish(null);
-        return communityService.pageMicroWish(comActMicroWishVO);
+        return communityService.pageMicroWishApplets(comActMicroWishVO);
     }
 
     @ApiOperation("发布微心愿")
@@ -343,7 +348,7 @@
         return R.ok(Constants.IS_SHOP_OPEN);
     }
 
-    @ApiOperation(value = "获取最新活动和用户最新收益", response = ComActEasyPhotoRewardVO.class)
+    @ApiOperation(value = "获取最新活动和用户最新收益", response = BannerVO.class)
     @GetMapping("getUserReward")
     public R getUserReward(@RequestParam("communityId") Long communityId) {
         Long userId = 0L;
@@ -355,6 +360,18 @@
         return communityService.getUserReward(userId, communityId);
     }
 
+    @ApiOperation(value = "获取首页弹窗接口", response = ComActEasyPhotoRewardVO.class)
+    @GetMapping("getUserRewards")
+    public R getUserRewards(@RequestParam("communityId") Long communityId) {
+        Long userId = 0L;
+        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
+        if (loginUserInfo != null) {
+            userId = loginUserInfo.getUserId();
+            communityId = loginUserInfo.getCommunityId();
+        }
+        return communityService.getUserRewards(userId, communityId);
+    }
+
     @ApiOperation(value = "读取用户随手拍奖励")
     @PostMapping("readUserReward")
     public R readUserReward() {
@@ -364,6 +381,13 @@
     @ApiOperation(value = "随手拍分类列表", response = ComActEasyPhotoClassifyVO.class)
     @GetMapping("easyphoto/classify/list")
     public R easyPhotoClassifyList() {
-        return communityService.listPhotoClassify();
+        return communityService.listPhotoClassify(this.getAreaCode());
+    }
+
+    @ApiOperation(value = "随手拍评价")
+    @PostMapping("easyphoto/whistle/evaluate")
+    public R evaluateEasyPhotoWhistle(@RequestBody EvaluateEasyDto whistleDto) {
+        whistleDto.setUserId(this.getUserId());
+        return easyPhotoEvaluateFeign.evaluateEasyApplets(whistleDto);
     }
 }

--
Gitblit v1.7.1