| | |
| | | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.service.MacService; |
| | | import com.whyc.util.ActionUtil; |
| | | 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.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("mac") |
| | |
| | | @GetMapping("searMacHis") |
| | | @ApiOperation(value = "查询mac历史记录") |
| | | public Response searMacHis() { |
| | | String uname = ActionUtil.getUser().getUName(); |
| | | return service.searMacHis(uname); |
| | | return service.searMacHis(); |
| | | } |
| | | |
| | | @GetMapping("getMac") |
| | | @ApiOperation(value = "获取mac") |
| | | @ApiOperation(value = "获取mac并导出") |
| | | public void getMac(HttpServletRequest req, HttpServletResponse resp, @RequestParam int macNum) { |
| | | service.getMac(req, resp, macNum); |
| | | } |
| | | |
| | | @PostMapping("getMacHis") |
| | | @ApiOperation(value = "从历史导出CSV") |
| | | public void getMacHis(HttpServletRequest req, HttpServletResponse resp, @RequestBody List<String> macList) { |
| | | service.getMacHis(req, resp, macList); |
| | | } |
| | | } |