update 对接内蒙古平台

This commit is contained in:
2024-04-22 16:07:08 +08:00
parent 04e9ecce23
commit 0839b8437e

View File

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