| | |
| | | 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 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.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | @PostMapping("dynamicuser") |
| | | public R addDynamicUser(@RequestBody ComActDynVO comActDynVO){ |
| | | Long id = comActDynVO.getId(); |
| | | if (ObjectUtils.isEmpty(id)||id==0) { |
| | | if (null==id||id==0) { |
| | | return R.fail("社区动态不存在"); |
| | | } |
| | | Long userId = this.getUserId(); |
| | |
| | | |
| | | @ApiOperation(value = "志愿者申请") |
| | | @PostMapping("volunteer") |
| | | public R addVolunteer(@RequestBody ComMngVolunteerMngVO comMngVolunteerMngVO){ |
| | | public R addVolunteer(@RequestBody @Validated(AddGroup.class) ComMngVolunteerMngVO comMngVolunteerMngVO){ |
| | | comMngVolunteerMngVO.setState(1); |
| | | return communityService.addVolunteer(comMngVolunteerMngVO); |
| | | } |