| | |
| | | package com.ycl.controller.caseHandler; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ycl.api.CommonResult; |
| | | import com.ycl.controller.BaseController; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ycl.entity.dict.DataDictionary; |
| | | import com.ycl.service.dict.IDataDictionaryService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/violations") |
| | | @Api(tags = "违规事项设置") |
| | | public class ViolationsController extends BaseController { |
| | | @Autowired |
| | | IDataDictionaryService iDataDictionaryService; |
| | | |
| | | /** |
| | | * @Description 查询违建类型 |
| | | * @Param [size, current, keyWord] |
| | | * @return com.ycl.api.CommonResult |
| | | **/ |
| | | @ApiOperation(value = "查询违规类型") |
| | | @GetMapping("/query") |
| | | public CommonResult searchIllegalBuilding(@RequestParam Integer size, |
| | | @RequestParam Integer current, |
| | | @RequestParam(required = false) String keyWord) { |
| | | Page<DataDictionary> dataDictionaryPage = new Page<>(); |
| | | dataDictionaryPage.setSize(size); |
| | | dataDictionaryPage.setCurrent(current); |
| | | return CommonResult.success(iDataDictionaryService.listViolations(dataDictionaryPage,keyWord)); |
| | | } |
| | | |
| | | /** |
| | | * @Description delete illegal building by id |
| | | * @Param [id] |
| | | * @return com.ycl.api.CommonResult |
| | | **/ |
| | | @ApiOperation(value = "删除违规类型") |
| | | @DeleteMapping("/delete") |
| | | public CommonResult removeIllegalBuilding(@RequestParam Integer id){ |
| | | return CommonResult.success(iDataDictionaryService.removeById(id)); |
| | | } |
| | | |
| | | } |