From fb4f898f9dbb2b5743a061912c310985d42197f4 Mon Sep 17 00:00:00 2001 From: huanghongfa <18228131219@163.com> Date: 星期三, 20 一月 2021 15:17:08 +0800 Subject: [PATCH] bug --- springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityApi.java | 35 +++++++++++++++++++++++------------ 1 files changed, 23 insertions(+), 12 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityApi.java b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityApi.java index 25317c3..8f43452 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityApi.java @@ -49,8 +49,14 @@ @ApiOperation(value = "社区动态详情",response = ComActDynVO.class) @GetMapping("detaildynamic") @ApiImplicitParam(name ="id",value = "社区动态主键",required = true) - public R detailDynamic(@RequestParam("id") Long id){//todo 增加微信分享接口 - return communityService.detailDynamic(id); + public R detailDynamic(@RequestParam("id") Long id){ + Long userId = this.getUserId(); + R r = communityService.detailDynamic(id); + if (R.isOk(r)) { + //增加浏览记录 + communityService.addDynamicUser(id,userId); + } + return r; } @ApiOperation(value = "分页查询社区活动",response = ComActActivityVO.class) @@ -59,6 +65,10 @@ Long communityId = this.getCommunityId(); comActActivityVO.setCommunityId(communityId); comActActivityVO.setIsApplets(1); + Integer status = comActActivityVO.getStatus(); + if (null!=status&&status.intValue()==4) { + comActActivityVO.setIsIng(1); + } return communityService.pageActivity(comActActivityVO); } @@ -107,21 +117,22 @@ return communityService.listActivitySign(activitySignVO); } - @ApiOperation(value = "新增社区动态浏览记录") - @PostMapping("dynamicuser") - public R addDynamicUser(@RequestBody ComActDynVO comActDynVO){ - Long id = comActDynVO.getId(); - if (null==id||id==0) { - return R.fail("社区动态不存在"); - } - Long userId = this.getUserId(); - return communityService.addDynamicUser(id,userId); - } +// @ApiOperation(value = "新增社区动态浏览记录") +// @PostMapping("dynamicuser") +// public R addDynamicUser(@RequestBody ComActDynVO comActDynVO){ +// Long id = comActDynVO.getId(); +// if (null==id||id==0) { +// return R.fail("社区动态不存在"); +// } +// Long userId = this.getUserId(); +// return communityService.addDynamicUser(id,userId); +// } @ApiOperation(value = "志愿者申请") @PostMapping("volunteer") public R addVolunteer(@RequestBody @Validated(AddGroup.class) ComMngVolunteerMngVO comMngVolunteerMngVO){ comMngVolunteerMngVO.setState(1); + comMngVolunteerMngVO.setCommunityId(this.getCommunityId()); return communityService.addVolunteer(comMngVolunteerMngVO); } -- Gitblit v1.7.1