From 9d55a1416f87fa513ed828fc559c8bbde3be2d8c Mon Sep 17 00:00:00 2001
From: lidongdong <1459917685@qq.com>
Date: 星期四, 16 十一月 2023 14:28:45 +0800
Subject: [PATCH] 修改微心愿列表我认领的接口

---
 springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 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 b5b0b4e..0c1b896 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
@@ -26,6 +26,7 @@
 import com.panzhihua.common.service.community.ComActEasyPhotoEvaluateFeign;
 import com.panzhihua.common.service.community.CommunityService;
 import com.panzhihua.common.service.user.UserService;
+import com.panzhihua.common.utlis.StringUtils;
 import com.panzhihua.common.validated.AddGroup;
 import com.panzhihua.common.validated.PageGroup;
 import io.swagger.annotations.Api;
@@ -108,9 +109,7 @@
             return R.fail("用户未绑定社区");
         }
         Long userId = loginUserInfo.getUserId();
-        if (null==comActEasyPhotoVO.getCommunityId()){
-            comActEasyPhotoVO.setCommunityId(communityId);
-        }
+        comActEasyPhotoVO.setCommunityId(communityId);
         comActEasyPhotoVO.setSponsorId(userId);
         comActEasyPhotoVO.setStatus(1);
         return communityService.addEasyPhoto(comActEasyPhotoVO);
@@ -253,11 +252,15 @@
 
     @ApiOperation(value = "分页展示社区微心愿", response = ComActMicroWishVO.class)
     @PostMapping("pagemicrowish")
-    public R pageMicroWish(@RequestBody ComActMicroWishVO comActMicroWishVO) {
-        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
-        if (loginUserInfo != null) {
-            comActMicroWishVO.setCommunityId(loginUserInfo.getCommunityId());
-            comActMicroWishVO.setResponsibleId(loginUserInfo.getUserId());// 责任人暂时放登录用户id
+    public R pageMicroWish(@RequestBody ComActMicroWishVO comActMicroWishVO)
+    {
+        if(StringUtils.isEmpty(comActMicroWishVO.getHandleId()))
+        {
+            LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
+            if (loginUserInfo != null) {
+                comActMicroWishVO.setCommunityId(loginUserInfo.getCommunityId());
+                comActMicroWishVO.setResponsibleId(loginUserInfo.getUserId());// 责任人暂时放登录用户id
+            }
         }
         comActMicroWishVO.setIsApplets(1);
         comActMicroWishVO.setIsPageMyWish(null);

--
Gitblit v1.7.1