| | |
| | | package com.whyc.controller; |
| | | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.MailUser; |
| | | import com.whyc.service.MailUserService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RequestMapping("mailUser") |
| | | @RestController |
| | |
| | | |
| | | @GetMapping |
| | | @ApiOperation("查询所有用户") |
| | | public Response getAll(){ |
| | | return service.getAll(); |
| | | public Response getAll(@RequestParam int type){ |
| | | return service.getAll(type); |
| | | } |
| | | |
| | | @PostMapping |
| | | @ApiOperation("添加用户列表") |
| | | public Response add(@RequestBody List<MailUser> mailUserList){ |
| | | return service.add(mailUserList); |
| | | } |
| | | |
| | | @PostMapping |
| | | @ApiOperation("删除用户列表") |
| | | public Response delete(@RequestBody List<Integer> ids){ |
| | | return service.delete(ids); |
| | | } |
| | | } |