| | |
| | | package cn.gistack.sm.patrol.controller; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | |
| | | @ApiOperation(value="巡查类型-分页列表查询", notes="巡查类型-分页列表查询") |
| | | @GetMapping(value = "/list") |
| | | public R queryPageList(PatrolType patrolType,Query query) { |
| | | // IPage<PatrolType> pageList = patrolTypeService.selectPatrolType(Condition.getPage(query),patrolType); |
| | | IPage<PatrolType> pageList = patrolTypeService.page(Condition.getPage(query), Condition.getQueryWrapper(patrolType)); |
| | | IPage<PatrolType> pageList = patrolTypeService.selectPatrolType(Condition.getPage(query),patrolType); |
| | | // IPage<PatrolType> pageList = patrolTypeService.page(Condition.getPage(query), Condition.getQueryWrapper(patrolType)); |
| | | return R.data(pageList); |
| | | } |
| | | |
| | | /** |
| | | * 获取所有巡查类型 |
| | | */ |
| | | @ApiOperation(value="获取所有巡查类型", notes="获取所有巡查类型") |
| | | @GetMapping(value = "/all") |
| | | public R getAll(){ |
| | | List<PatrolType> list = patrolTypeService.list(); |
| | | return R.data(list); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | @ApiOperation(value="巡查类型-通过id删除", notes="巡查类型-通过id删除") |
| | | @DeleteMapping(value = "/delete") |
| | | @PostMapping(value = "/delete") |
| | | public R delete(@RequestParam(name="id",required=true) String id) { |
| | | return R.data(patrolTypeService.removeById(id)); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @ApiOperation(value="巡查类型-批量删除", notes="巡查类型-批量删除") |
| | | @DeleteMapping(value = "/deleteBatch") |
| | | @PostMapping(value = "/deleteBatch") |
| | | public R deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
| | | return R.data(patrolTypeService.removeByIds(Arrays.asList(ids.split(",")))); |
| | | } |