浏览代码

列表分页

yangzian 3 年之前
父节点
当前提交
bc685ee8db

+ 2 - 2
ruixuan-salesLeads/src/main/java/com.ruixuan.salesLeads/service/ISaleClueInfoService.java

@@ -21,9 +21,9 @@ public interface ISaleClueInfoService {
     ResultResponse importSaleExcelOrCsv(List<MultipartFile> files,int salesLeadsType,Long uploadDate,Long createUserId)throws Exception;
 
 
-    ResultResponse<List<SaleClueInfoPojo>> selectSaleClueInfoList(String sellerName, Long uploadDate, String distributionSaleFlag, String industryId, String fansType,String state, Long userId)throws Exception;
+    ResultResponse selectSaleClueInfoList(String sellerName, Long uploadDate, String distributionSaleFlag, String industryId, String fansType,String state, Long userId)throws Exception;
 
-    ResultResponse<List<SaleClueInfoPojo>> selectSaleClueTaskList(String sellerName,Integer state, Long userId);
+    ResultResponse selectSaleClueTaskList(String sellerName,Integer state, Long userId);
 
     ResultResponse<List<SaleClueInfoPojo>> selectSaleClueInfoBySellers(List<Long> sellerIds);
 

+ 7 - 5
ruixuan-salesLeads/src/main/java/com.ruixuan.salesLeads/service/impl/SaleClueInfoServiceImpl.java

@@ -1,7 +1,9 @@
 package com.ruixuan.salesLeads.service.impl;
 
 import com.alibaba.excel.EasyExcel;
+import com.github.pagehelper.PageInfo;
 import com.ruixuan.common.core.domain.ResultResponse;
+import com.ruixuan.common.core.page.TableDataInfo;
 import com.ruixuan.common.utils.PageUtils;
 import com.ruixuan.common.utils.StringUtils;
 import com.ruixuan.common.utils.file.FileTypeUtils;
@@ -172,12 +174,12 @@ public class SaleClueInfoServiceImpl implements ISaleClueInfoService {
      * @param distributionSaleFlag 是否分配销售 0-否 1-是
      * @param industryId 行业id
      * @param fansType 粉丝量级 1:0~50w 2:50W~200W 3:200W~500W 4:500W以上
-     * @param createUserId
+     * @param userId
      * @return: com.ruixuan.common.core.domain.ResultResponse<java.util.List<com.ruixuan.salesLeads.pojo.SaleClueInfoPojo>>
      * @author: zianY
      */
     @Override
-    public ResultResponse<List<SaleClueInfoPojo>> selectSaleClueInfoList(String sellerName, Long uploadDate, String distributionSaleFlag, String industryId, String fansType, String state,Long userId) throws Exception {
+    public ResultResponse selectSaleClueInfoList(String sellerName, Long uploadDate, String distributionSaleFlag, String industryId, String fansType, String state,Long userId) throws Exception {
 
         PageUtils.startPage();
         List<SaleClueInfoPojo> saleList =  saleClueInfoMapper.selectSaleClueInfoList(sellerName,uploadDate,distributionSaleFlag,industryId,fansType,state, userId);
@@ -185,7 +187,7 @@ public class SaleClueInfoServiceImpl implements ISaleClueInfoService {
             clue.setFirstRecord(saleClueRecordInfoMapper.getSaleClueRecordNumber(clue.getSellerId(),1));
             clue.setSecondRecord(saleClueRecordInfoMapper.getSaleClueRecordNumber(clue.getSellerId(),2));
         });
-        return ResultResponse.successMsg("查询成功。",saleList);
+        return ResultResponse.successMsg("查询成功。",new TableDataInfo(saleList,new Long(new PageInfo(saleList).getTotal()).intValue()));
     }
 
 
@@ -200,10 +202,10 @@ public class SaleClueInfoServiceImpl implements ISaleClueInfoService {
      * @author: zianY
      */
     @Override
-    public ResultResponse<List<SaleClueInfoPojo>> selectSaleClueTaskList(String sellerName,Integer state, Long userId) {
+    public ResultResponse selectSaleClueTaskList(String sellerName,Integer state, Long userId) {
         PageUtils.startPage();
         List<SaleClueInfoPojo> saleList =  saleClueInfoMapper.selectSaleClueTaskList(sellerName,state, userId);
-        return ResultResponse.successMsg("查询成功。",saleList);
+        return ResultResponse.successMsg("查询成功。",new TableDataInfo(saleList,new Long(new PageInfo(saleList).getTotal()).intValue()));
     }