From 713ecf9847dbba077daa93617c0a7a2f90db0d8e Mon Sep 17 00:00:00 2001 From: lidongdong <1459917685@qq.com> Date: 星期五, 24 十一月 2023 15:50:13 +0800 Subject: [PATCH] 修改小程序下单2 --- springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 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..3a40450 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,12 +252,18 @@ @ApiOperation(value = "分页展示社区微心愿", response = ComActMicroWishVO.class) @PostMapping("pagemicrowish") - public R pageMicroWish(@RequestBody ComActMicroWishVO comActMicroWishVO) { + public R pageMicroWish(@RequestBody ComActMicroWishVO comActMicroWishVO) + { LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); if (loginUserInfo != null) { comActMicroWishVO.setCommunityId(loginUserInfo.getCommunityId()); comActMicroWishVO.setResponsibleId(loginUserInfo.getUserId());// 责任人暂时放登录用户id } + + if(!StringUtils.isEmpty(comActMicroWishVO.getHandleId())) + { + comActMicroWishVO.setCommunityId(null); + } comActMicroWishVO.setIsApplets(1); comActMicroWishVO.setIsPageMyWish(null); return communityService.pageMicroWishApplets(comActMicroWishVO); -- Gitblit v1.7.1