fangyuan
2023-01-16 ecad870fe1896c8c3e48506d50bb5818974253bf
ycl-platform/src/main/java/com/ycl/controller/NewsDepartmentController.java
@@ -6,6 +6,7 @@
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;
@@ -42,6 +43,8 @@
    @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)));
    }