huanghongfa
2021-07-30 c7450a8e1724528046af3683d49eaf0a06785130
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java
@@ -1,6 +1,7 @@
package com.panzhihua.applets.api;
import com.panzhihua.applets.weixin.CheckService;
import com.panzhihua.common.constants.Constants;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.PageDTO;
import com.panzhihua.common.model.dtos.community.ComActEasyPhotoCommentDTO;
@@ -10,12 +11,7 @@
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.advertisement.ComOpsAdvVO;
import com.panzhihua.common.model.vos.community.ComActEasyPhotoCommentVO;
import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO;
import com.panzhihua.common.model.vos.community.ComActMessageBackVO;
import com.panzhihua.common.model.vos.community.ComActMessageVO;
import com.panzhihua.common.model.vos.community.ComActMicroWishVO;
import com.panzhihua.common.model.vos.community.PageComActMessageVO;
import com.panzhihua.common.model.vos.community.*;
import com.panzhihua.common.model.vos.user.NoticeUnReadVO;
import com.panzhihua.common.model.vos.user.SysUserAgreementVO;
import com.panzhihua.common.model.vos.user.SysUserNoticeVO;
@@ -80,6 +76,13 @@
        comActEasyPhotoVO.setSponsorId(userId);
        comActEasyPhotoVO.setStatus(1);
        return communityService.addEasyPhoto(comActEasyPhotoVO);
    }
    @ApiOperation(value = "查询随手拍是否有活动",response = ComActEasyPhotoActivityVO.class)
    @PostMapping("getEasyPhotoActivity")
    public R getEasyPhotoActivity (){
        Long communityId = this.getCommunityId();
        return communityService.getEasyPhotoActivity(communityId);
    }
    @ApiOperation(value = "随手拍详情",response =ComActEasyPhotoVO.class )
@@ -248,7 +251,6 @@
        comActMessageVO.setUserId(userId);
        comActMessageVO.setUserName(loginUserInfo.getName());
        comActMessageVO.setUserAccount(loginUserInfo.getAccount());
        comActMessageVO.setUserPhone(loginUserInfo.getPhone());
        comActMessageVO.setIspublic(1);
        comActMessageVO.setStatus(1);
        return communityService.addMessage(comActMessageVO);
@@ -312,4 +314,29 @@
    public R pageMessageByUser (@RequestBody ComActMessageVO comActMessageVO){
        return communityService.pageMessageByUser(comActMessageVO);
    }
    @ApiOperation(value = "留言详情",response =ComActMessageVO.class )
    @GetMapping("detailmessage")
    @ApiImplicitParam(name = "id",value = "随手拍主键")
    public R detailMessage(@RequestParam("id") Long id){
        return communityService.detailMessage(id);
    }
    @ApiOperation(value = "首页商城开关接口")
    @GetMapping("isShop")
    public R isShop(){
        return R.ok(Constants.IS_SHOP_OPEN);
    }
    @ApiOperation(value = "获取最新活动和用户最新收益",response =ComActEasyPhotoRewardVO.class )
    @PostMapping("getUserReward")
    public R getUserReward(){
        return communityService.getUserReward(this.getUserId(),this.getCommunityId());
    }
    @ApiOperation(value = "读取用户随手拍奖励")
    @PostMapping("readUserReward")
    public R readUserReward(){
        return communityService.readUserReward(this.getUserId(),this.getCommunityId());
    }
}