diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/neimenggu/service/NeiMengGuPlatformServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/neimenggu/service/NeiMengGuPlatformServiceImpl.java index 2ed702239..640727151 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/neimenggu/service/NeiMengGuPlatformServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/neimenggu/service/NeiMengGuPlatformServiceImpl.java @@ -3,8 +3,10 @@ package com.jsowell.thirdparty.platform.neimenggu.service; import cn.hutool.core.util.PageUtil; import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSONObject; +import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.google.common.collect.Lists; +import com.google.common.collect.Maps; import com.jsowell.common.constant.Constants; import com.jsowell.common.core.domain.ykc.RealTimeMonitorData; import com.jsowell.common.enums.thirdparty.BusinessInformationExchangeEnum; @@ -171,11 +173,13 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService { */ @Override public Map queryOperatorInfo(QueryOperatorInfoDTO dto) { + PageHelper.startPage(dto.getPageNo(), dto.getPageSize()); List merchantList = thirdPartyStationRelationService.selectMerchantList(thirdPlatformType); - if (CollectionUtils.isNotEmpty(merchantList)) { - List operatorInfos = Lists.newArrayList(); + PageInfo pageInfo = new PageInfo<>(merchantList); + List operatorInfos = Lists.newArrayList(); + if (CollectionUtils.isNotEmpty(pageInfo.getList())) { SupOperatorInfo supOperatorInfo; - for (MerchantInfoVO merchantInfoVO : merchantList) { + for (MerchantInfoVO merchantInfoVO : pageInfo.getList()) { supOperatorInfo = new SupOperatorInfo(); supOperatorInfo.setOperatorID(MerchantUtils.getOperatorID(merchantInfoVO.getOrganizationCode())); supOperatorInfo.setOperatorUSCID(merchantInfoVO.getOrganizationCode()); @@ -186,7 +190,15 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService { } } ThirdPartySecretInfoVO thirdPartySecretInfoVO = thirdpartySecretInfoService.queryByThirdPlatformType(thirdPlatformType); - Map resultMap = ThirdPartyPlatformUtils.generateResultMap(merchantList, thirdPartySecretInfoVO); + + // 组装结果集 + Map map = Maps.newHashMap(); + map.put("PageNo", pageInfo.getPageNum()); + map.put("PageCount", pageInfo.getPages()); + map.put("ItemSize", pageInfo.getTotal()); + map.put("OperatorInfos", operatorInfos); + + Map resultMap = ThirdPartyPlatformUtils.generateResultMap(map, thirdPartySecretInfoVO); return resultMap; }