| | |
| | | import com.whyc.service.AlarmDiagnosisService; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @RequestMapping("alarmDiagnosis") |
| | |
| | | private AlarmDiagnosisService service; |
| | | |
| | | @GetMapping("getPage") |
| | | public Response<PageInfo<AlarmDiagnosis>> getPage(Integer pageNum, Integer pageSize) { |
| | | return service.getPage(pageNum, pageSize); |
| | | public Response<PageInfo<AlarmDiagnosis>> getPage(Integer pageNum, Integer pageSize, @RequestParam(required = false) String type) { |
| | | return service.getPage(pageNum, pageSize,type); |
| | | } |
| | | |
| | | @PostMapping("add") |
| | |
| | | return service.add(diagnosis); |
| | | } |
| | | |
| | | @PostMapping("update") |
| | | public Response update(AlarmDiagnosis diagnosis) { |
| | | return service.update(diagnosis); |
| | | } |
| | | |
| | | @PostMapping("delete") |
| | | public Response delete(Integer id) { |
| | | return service.delete(id); |
| | | } |
| | | |
| | | } |