From ecad870fe1896c8c3e48506d50bb5818974253bf Mon Sep 17 00:00:00 2001
From: fangyuan <527392886@qq.com>
Date: 星期一, 16 一月 2023 11:33:58 +0800
Subject: [PATCH] 机场公安前后端联调内容
---
ycl-platform/src/main/java/com/ycl/controller/NewsDepartmentController.java | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/ycl-platform/src/main/java/com/ycl/controller/NewsDepartmentController.java b/ycl-platform/src/main/java/com/ycl/controller/NewsDepartmentController.java
index 4468ebe..f03f7b9 100644
--- a/ycl-platform/src/main/java/com/ycl/controller/NewsDepartmentController.java
+++ b/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)));
}
--
Gitblit v1.8.0