From 1ac9d6d25f32148354e46d11b814c306f475ee0d Mon Sep 17 00:00:00 2001 From: lidongdong <1459917685@qq.com> Date: 星期六, 08 十月 2022 17:07:41 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/huacheng_test' into huacheng_test --- springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/IndexApi.java | 80 ++++++++++++++++++++++++++++++++++++--- 1 files changed, 73 insertions(+), 7 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..95f3a8c 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,13 @@ import javax.annotation.Resource; +import com.panzhihua.common.model.dtos.common.EditComActEasyPhotoHandlerDto; +import com.panzhihua.common.model.dtos.common.EvaluateEasyDto; +import com.panzhihua.common.model.dtos.common.PageComActEasyPhotoHandlerDto; +import com.panzhihua.common.model.vos.common.ComActEasyPhotoHandlerVo; +import com.panzhihua.common.model.vos.community.easyPhoto.BannerVO; +import com.panzhihua.common.service.community.ComActEasyPhotoEvaluateFeign; +import com.panzhihua.common.service.community.ComActEasyPhotoHandlerFeign; import org.springframework.util.ObjectUtils; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; @@ -48,6 +55,8 @@ private UserService userService; @Resource private CheckService checkService; + @Resource + private ComActEasyPhotoEvaluateFeign easyPhotoEvaluateFeign; @ApiOperation(value = "分页展示社区随手拍", response = ComActEasyPhotoVO.class) @PostMapping("pageeasyphoto") @@ -56,6 +65,7 @@ if (loginUserInfo != null) { comActEasyPhotoVO.setCommunityId(loginUserInfo.getCommunityId()); comActEasyPhotoVO.setLogInUserId(loginUserInfo.getUserId()); + comActEasyPhotoVO.setIsDpcMember(loginUserInfo.getIsDpcMember()); } return communityService.pageEasyPhotoApplets(comActEasyPhotoVO); } @@ -78,6 +88,41 @@ comActEasyPhotoVO.setSponsorId(userId); comActEasyPhotoVO.setStatus(1); return communityService.addEasyPhoto(comActEasyPhotoVO); + } + + /** + * description queryByPage 分页查询 + * + * @param comActEasyPhotoHandler 请求参数 + * @return 分页查询返回参数 + * @author lyq + * @date 2022-03-01 13:45:10 + */ + @ApiOperation(value = "查询处理列表",response = ComActEasyPhotoHandlerVo.class) + @PostMapping("/handleList") + public R handleList(@RequestBody PageComActEasyPhotoHandlerDto comActEasyPhotoHandler) { + comActEasyPhotoHandler.setUserId(this.getUserId()); + return this.communityService.queryEasyPhotoHandler(comActEasyPhotoHandler); + } + /** + * description edit 编辑数据 + * + * @param comActEasyPhotoHandler 请求参数 + * @return 编辑结果 + * @author lyq + * @date 2022-03-01 13:45:10 + */ + @ApiOperation(value = "提交反馈") + @PostMapping("/editEasyPhotoHandler") + public R editEasyPhotoHandler(@RequestBody EditComActEasyPhotoHandlerDto comActEasyPhotoHandler) { + return this.communityService.editEasyPhotoHandler(comActEasyPhotoHandler); + } + + @ApiOperation(value = "查询处理详情", response = ComActEasyPhotoHandlerVo.class) + @ApiImplicitParam(name = "id", value = "处理id", required = true) + @GetMapping("/easyPhotoHandler") + public R detailEasyPhotoHandler(@RequestParam("id") Long id) { + return this.communityService.detailEasyPhotoHandler(id); } @ApiOperation(value = "查询随手拍是否有活动", response = ComActEasyPhotoActivityVO.class) @@ -155,7 +200,7 @@ } comActMicroWishVO.setIsApplets(1); comActMicroWishVO.setIsPageMyWish(null); - return communityService.pageMicroWish(comActMicroWishVO); + return communityService.pageMicroWishApplets(comActMicroWishVO); } @ApiOperation("发布微心愿") @@ -209,8 +254,8 @@ @ApiOperation(value = "首页广告banner", response = ComOpsAdvVO.class) @GetMapping("listadvertisement/noToken") - public R listAdvertisement() { - return communityService.listAdvertisement(); + public R listAdvertisement(@RequestParam(value = "type",required = false,defaultValue = "1") Integer type) { + return communityService.listAdvertisement(type); } @ApiOperation(value = "分页通知列表", response = SysUserNoticeVO.class) @@ -240,7 +285,7 @@ @GetMapping("agreement") @ApiImplicitParam(name = "type", value = "1居民端app协议 2网格员端app协议 3商家端app协议 4隐私政策") public R agreement(@RequestParam("type") Integer type) { - return userService.agreement(type); + return userService.agreement(type,this.getAppId()); } @ApiOperation("发布留言") @@ -343,16 +388,30 @@ 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; LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); if (loginUserInfo != null) { userId = loginUserInfo.getUserId(); - communityId = loginUserInfo.getCommunityId(); + if(loginUserInfo.getCommunityId()!=null){ + communityId = loginUserInfo.getCommunityId(); + } } 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 = "读取用户随手拍奖励") @@ -364,6 +423,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