From 0839b8437e8d2c6ea4a6cd273bfdca4fd55b8a1a Mon Sep 17 00:00:00 2001 From: Guoqs Date: Mon, 22 Apr 2024 16:07:08 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E5=AF=B9=E6=8E=A5=E5=86=85=E8=92=99?= =?UTF-8?q?=E5=8F=A4=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/NeiMengGuPlatformServiceImpl.java | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) 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; }