fengjin
2024-01-09 a12864863ad39bef665c58c4babbf95b1f5c9721
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;
@@ -66,6 +67,18 @@
            comActEasyPhotoVO.setIsDpcMember(loginUserInfo.getIsDpcMember());
        }
        return communityService.pageEasyPhotoApplets(comActEasyPhotoVO);
    }
    @ApiOperation(value = "分页展示社区随手拍-脱敏", response = ComActEasyPhotoVO.class)
    @PostMapping("pageEasyPhotoDesensitize")
    public R pageEasyPhotoDesensitize(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) {
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
        if (loginUserInfo != null) {
            comActEasyPhotoVO.setCommunityId(loginUserInfo.getCommunityId());
            comActEasyPhotoVO.setLogInUserId(loginUserInfo.getUserId());
            comActEasyPhotoVO.setIsDpcMember(loginUserInfo.getIsDpcMember());
        }
        return communityService.pageEasyPhotoAppletsDesensitize(comActEasyPhotoVO);
    }
    @ApiOperation("上传随手拍")
@@ -160,6 +173,17 @@
        }
        return communityService.detailEasyPhoto(id, userId);
    }
    @ApiOperation(value = "随手拍详情-脱敏", response = ComActEasyPhotoVO.class)
    @GetMapping("detailEasyPhotoDesensitize")
    @ApiImplicitParam(name = "id", value = "随手拍主键")
    public R detailEasyPhotoDesensitize(@RequestParam("id") Long id) {
        Long userId = 0L;
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
        if (loginUserInfo != null) {
            userId = loginUserInfo.getUserId();
        }
        return communityService.detailEasyPhotoDesensitize(id, userId);
    }
    @ApiOperation(value = "随手拍--评论--分页查询", response = ComActEasyPhotoCommentVO.class)
    @PostMapping("pagecomacteasyphotocomment")
@@ -171,6 +195,18 @@
        }
        pageComActEasyPhotoCommentDTO.setUserId(userId);
        return communityService.pageComActEasyPhotoComment(pageComActEasyPhotoCommentDTO);
    }
    @ApiOperation(value = "随手拍--评论--分页查询-脱敏", response = ComActEasyPhotoCommentVO.class)
    @PostMapping("pageComActEasyPhotoCommentDesensitize")
    public R pageComActEasyPhotoCommentDesensitize(@RequestBody PageComActEasyPhotoCommentDTO pageComActEasyPhotoCommentDTO) {
        Long userId = 0L;
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
        if (loginUserInfo != null) {
            userId = loginUserInfo.getUserId();
        }
        pageComActEasyPhotoCommentDTO.setUserId(userId);
        return communityService.pageComActEasyPhotoCommentDesensitize(pageComActEasyPhotoCommentDTO);
    }
    @ApiOperation(value = "随手拍--评论--新增评论")
@@ -216,7 +252,26 @@
    @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);
    }
    @ApiOperation(value = "分页展示社区微心愿-脱敏", response = ComActMicroWishVO.class)
    @PostMapping("pageMicroWishDesensitize")
    public R pageMicroWishDesensitize(@RequestBody ComActMicroWishVO comActMicroWishVO) {
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
        if (loginUserInfo != null) {
            comActMicroWishVO.setCommunityId(loginUserInfo.getCommunityId());
@@ -224,7 +279,7 @@
        }
        comActMicroWishVO.setIsApplets(1);
        comActMicroWishVO.setIsPageMyWish(null);
        return communityService.pageMicroWishApplets(comActMicroWishVO);
        return communityService.pageMicroWishAppletsDesensitize(comActMicroWishVO);
    }
    @ApiOperation("发布微心愿")
@@ -265,6 +320,18 @@
            userId = loginUserInfo.getUserId();
        }
        return communityService.detailMicroWish(id, userId);
    }
    @ApiOperation(value = "心愿详情-脱敏", response = ComActMicroWishVO.class)
    @GetMapping("microwishDesensitize")
    @ApiImplicitParam(name = "id", value = "微心愿主键")
    public R detailMicroWishDesensitize(@RequestParam("id") Long id) {
        Long userId = 0L;
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
        if (loginUserInfo != null) {
            userId = loginUserInfo.getUserId();
        }
        return communityService.detailMicroWishDesensitize(id, userId);
    }
    @ApiOperation("点赞/取消点赞微心愿")
@@ -447,6 +514,18 @@
        return communityService.getUserRewards(userId, communityId);
    }
    @ApiOperation(value = "获取普达首页弹窗接口", response = ComActEasyPhotoRewardVO.class)
    @GetMapping("getUserRewardsNew")
    public R getUserRewardsNew(@RequestParam("communityId") Long communityId) {
        Long userId = 0L;
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin();
        if (loginUserInfo != null) {
            userId = loginUserInfo.getUserId();
            communityId = loginUserInfo.getCommunityId();
        }
        return communityService.getUserRewardsNew(userId, communityId);
    }
    @ApiOperation(value = "读取用户随手拍奖励")
    @PostMapping("readUserReward")
    public R readUserReward() {