| | |
| | | import com.panzhihua.common.validated.PageGroup; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | R r = communityService.detailDynamic(id); |
| | | if (R.isOk(r)) { |
| | | //增加浏览记录 |
| | | communityService.addDynamicUser(id,userId); |
| | | R r1 = communityService.addDynamicUser(id, userId); |
| | | Object data = r.getData(); |
| | | ComActDynVO comActDynVO=JSONObject.parseObject(JSONObject.toJSONString(data),ComActDynVO.class); |
| | | if (R.isOk(r1)) { |
| | | comActDynVO.setIsAdd(1); |
| | | }else{ |
| | | comActDynVO.setIsAdd(0); |
| | | } |
| | | return R.ok(comActDynVO); |
| | | } |
| | | return r; |
| | | } |
| | |
| | | } |
| | | |
| | | @ApiOperation(value = "活动人员列表",response = ActivitySignVO.class) |
| | | @ApiImplicitParam(name ="id",value = "社区活动主键",required = true) |
| | | @ApiImplicitParams ({@ApiImplicitParam(name ="type",value = "人员类型 1 普通居民 2 志愿者",required = true), |
| | | @ApiImplicitParam(name ="id",value = "社区活动主键",required = true)}) |
| | | @GetMapping("listactivitysign") |
| | | public R listActivitySign(@RequestParam("id") Long id){ |
| | | public R listActivitySign(@RequestParam("id") Long id,@RequestParam("type") Integer type){ |
| | | ActivitySignVO activitySignVO=new ActivitySignVO(); |
| | | activitySignVO.setActivityId(id); |
| | | if (null==type||0==type||type>2) { |
| | | return R.fail("人员类型错误"); |
| | | } |
| | | activitySignVO.setType(type); |
| | | return communityService.listActivitySign(activitySignVO); |
| | | } |
| | | |
| | |
| | | return communityService.addVolunteer(comMngVolunteerMngVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询志愿者团队") |
| | | @ApiOperation(value = "分页查询志愿者团队",response = ComMngVolunteerMngVO.class) |
| | | @PostMapping("pagevolunteer") |
| | | public R pageVolunteer(@RequestBody @Validated(PageGroup.class) PageVolunteerDTO pageVolunteerDTO){ |
| | | Long communityId = this.getCommunityId(); |