| | |
| | | package com.panzhihua.service_community.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.VolunteerActivityVO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.service.VolunteerActivityService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/Volunteer") |
| | | public class VolunteerActivityApi |
| | | public class VolunteerActivityApi extends BaseController |
| | | { |
| | | @Resource |
| | | private VolunteerActivityService volunteerActivityService; |
| | |
| | | @PostMapping("/insertVolunteer") |
| | | R insertVolunteer(@RequestBody VolunteerActivityVO volunteerActivityVO) |
| | | { |
| | | if(StringUtils.isEmpty(volunteerActivityVO.getCommunityId())) |
| | | { |
| | | volunteerActivityVO.setCommunityId(getCommunityId()+""); |
| | | } |
| | | int num = volunteerActivityService.insertVolunteer(volunteerActivityVO); |
| | | if(num>0) |
| | | { |