|
@@ -2,6 +2,8 @@ package com.kexun.controller;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.github.pagehelper.PageHelper;
|
|
|
+import com.github.pagehelper.PageInfo;
|
|
|
import com.kexun.common.utils.Result;
|
|
|
import com.kexun.entity.CooperatorField;
|
|
|
import com.kexun.entity.CooperatorInfo;
|
|
@@ -27,11 +29,14 @@ public class CooperatorProductController {
|
|
|
|
|
|
// 获取合作产品信息
|
|
|
@GetMapping("cooperatorProductList")
|
|
|
- public Result cooperatorProductList() {
|
|
|
+ public Result cooperatorProductList(@RequestParam int pageNum) {
|
|
|
+ int pageSize = 10;
|
|
|
+ PageHelper.startPage(pageNum, pageSize);//设置分页信息
|
|
|
JSONObject resJson=new JSONObject();
|
|
|
- List<CooperatorProduct> list=CooperatorProductService.productList();
|
|
|
- resJson.put("cooperator_Product_List",list);
|
|
|
- System.out.println(list);
|
|
|
+ List<CooperatorProduct> list=CooperatorProductService.selectPage();
|
|
|
+ PageInfo pageInfo=new PageInfo(list);
|
|
|
+ resJson.put("cooperator_Product_List",pageInfo);
|
|
|
+ System.out.println(pageInfo);
|
|
|
|
|
|
return Result.success("ok",resJson);
|
|
|
}
|