| | |
| | | import com.baomidou.mybatisplus.extension.api.ApiController;
|
| | | import com.baomidou.mybatisplus.extension.api.R;
|
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
| | | import com.github.pagehelper.PageHelper;
|
| | | import com.ycl.entity.NewsDepartment;
|
| | | import com.ycl.service.NewsDepartmentService;
|
| | | import io.swagger.annotations.Api;
|
| | |
| | | @GetMapping
|
| | | @ApiOperation(value = "查询所有数据")
|
| | | public R selectAll(Page<NewsDepartment> page, NewsDepartment newsDepartment) {
|
| | | page.setTotal(newsDepartmentService.count());
|
| | | PageHelper.startPage(new Long(page.getCurrent()).intValue(),new Long(page.getSize()).intValue());
|
| | | return success(this.newsDepartmentService.page(page, new QueryWrapper<>(newsDepartment)));
|
| | | }
|
| | |
|