| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 路北社区商家管理 |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/community/discount/insert") |
| | | public R CommunityDiscountinsert(@RequestBody VolunteerCommunityDiscountVO item) |
| | | public R CommunityDiscountinsert(@RequestBody List<VolunteerCommunityDiscountVO> item) |
| | | { |
| | | return vtService.CommunityDiscountinsert(item); |
| | | if(item==null) |
| | | { |
| | | return R.fail("参数不能为空"); |
| | | } |
| | | |
| | | for (VolunteerCommunityDiscountVO vo:item) |
| | | { |
| | | vtService.CommunityDiscountinsert(vo); |
| | | } |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @PostMapping("/community/discount/update") |
| | | public R CommunityDiscountupdate(@RequestBody VolunteerCommunityDiscountVO item) |
| | | public R CommunityDiscountupdate(@RequestBody List<VolunteerCommunityDiscountVO> item) |
| | | { |
| | | return vtService.CommunityDiscountupdate(item); |
| | | for (VolunteerCommunityDiscountVO vo:item) |
| | | { |
| | | vtService.CommunityDiscountupdate(vo); |
| | | } |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | |