| | |
| | | package com.panzhihua.applets.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.dtos.community.PageVolunteerDTO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import com.panzhihua.common.validated.PageGroup; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | |
| | | @ApiOperation(value = "报名/取消报名社区活动") |
| | | @PutMapping("signactivity") |
| | | public R signActivity(@RequestBody SignactivityVO signactivityVO){ |
| | | public R signActivity(@RequestBody @Validated(AddGroup.class) SignactivityVO signactivityVO){ |
| | | Long userId = this.getUserId(); |
| | | signactivityVO.setUserId(userId); |
| | | return communityService.signActivity(signactivityVO); |
| | |
| | | |
| | | @ApiOperation(value = "活动人员列表",response = ActivitySignVO.class) |
| | | @ApiImplicitParam(name ="id",value = "社区活动主键",required = true) |
| | | @PostMapping("listactivitysign") |
| | | @GetMapping("listactivitysign") |
| | | public R listActivitySign(@RequestParam("id") Long id){ |
| | | ActivitySignVO activitySignVO=new ActivitySignVO(); |
| | | activitySignVO.setActivityId(id); |
| | |
| | | return communityService.addVolunteer(comMngVolunteerMngVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页查询志愿者团队") |
| | | @PostMapping("pagevolunteer") |
| | | public R pageVolunteer(@RequestBody @Validated(PageGroup.class) PageVolunteerDTO pageVolunteerDTO){ |
| | | Long communityId = this.getCommunityId(); |
| | | ComMngVolunteerMngVO comMngVolunteerMngVO=new ComMngVolunteerMngVO(); |
| | | comMngVolunteerMngVO.setCommunityId(communityId); |
| | | comMngVolunteerMngVO.setPageNum(pageVolunteerDTO.getPageNum()); |
| | | comMngVolunteerMngVO.setPageSize(pageVolunteerDTO.getPageSize()); |
| | | return communityService.pageVolunteer(comMngVolunteerMngVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "志愿者详情",response = ComMngVolunteerMngAppletsVO.class) |
| | | @GetMapping("volunteer") |
| | | public R detailVolunteer(@RequestParam("id") Long id){ |
| | | return communityService.detailVolunteer(id); |
| | | } |
| | | |
| | | |
| | | } |
| | | |