| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.cl.common.result.Result; |
| | | import com.cl.pojo.dto.AddInstitutionDTO; |
| | | import com.cl.pojo.dto.DataPageDTO; |
| | | import com.cl.pojo.dto.EditInstitutionDTO; |
| | | import com.cl.pojo.dto.InstitutionPageDTO; |
| | | import com.cl.pojo.entity.Institution; |
| | | import com.cl.pojo.vo.InstitutionVO; |
| | | import com.cl.service.InstitutionService; |
| | |
| | | /** |
| | | * 分页 |
| | | */ |
| | | @GetMapping("/pageList") |
| | | @PostMapping("/pageList") |
| | | @ApiOperation("机构分页") |
| | | public Result<IPage<InstitutionVO> > pageList(@RequestParam(value = "pageNum",defaultValue = "1")Integer pageNum, |
| | | @RequestParam(value = "pageSize",defaultValue = "10")Integer pageSize, |
| | | @RequestParam(value = "county",required = false)Integer county,//0-查所有 |
| | | @RequestParam(value = "name",required = false)String name) { |
| | | IPage<Institution> page = new Page<>(pageNum, pageSize); |
| | | return Result.success(institutionService.pageList(page,county,name)); |
| | | public Result<IPage<InstitutionVO> > pageList(@RequestBody @Valid InstitutionPageDTO dataPageDTO) { |
| | | IPage<Institution> page = new Page<>(dataPageDTO.getPageNum(), dataPageDTO.getPageSize()); |
| | | return Result.success(institutionService.pageList(page,dataPageDTO.getCountyList(),dataPageDTO.getName())); |
| | | } |
| | | /** |
| | | * 编辑回显 |