update 对接内蒙古平台

This commit is contained in:
2024-04-20 15:55:35 +08:00
parent ef77a4e0ee
commit 6a7bd665cc
14 changed files with 407 additions and 59 deletions

View File

@@ -0,0 +1,85 @@
package com.jsowell.thirdparty.common;
import com.jsowell.pile.vo.ThirdPartySecretInfoVO;
import com.jsowell.thirdparty.platform.ThirdPartyPlatformService;
import com.jsowell.thirdparty.platform.factory.ThirdPartyPlatformFactory;
import com.jsowell.thirdparty.service.ThirdpartySecretInfoService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 主动通知Service
* 说明:创建此接口目的是为了简化开发
* 在需要通知第三方平台的地方,异步调用此类中对应的方法
* 通知方法中应该根据对接平台,自动找到响应的平台处理逻辑
*/
@Service
public class NotificationService {
@Autowired
private ThirdpartySecretInfoService thirdpartySecretInfoService;
/**
* 充电站信息变化推送
* notification_stationInfo
*/
public void notificationStationInfo(String stationId) {
// 通过stationId 查询该站点需要对接的平台配置
List<ThirdPartySecretInfoVO> secretInfoVOS = thirdpartySecretInfoService.queryStationToPlatformList(stationId);
if (CollectionUtils.isEmpty(secretInfoVOS)) {
return;
}
// 调用相应平台的处理方法
for (ThirdPartySecretInfoVO secretInfoVO : secretInfoVOS) {
ThirdPartyPlatformService platformService = ThirdPartyPlatformFactory.getInvokeStrategy(secretInfoVO.getPlatformType());
// platformService.printServiceName();
platformService.notificationStationInfo(stationId);
}
}
/**
* 设备状态变化推送
* notification_stationStatus
*/
public void notificationStationStatus(String stationId, String pileConnectorCode, String status) {
// 通过stationId 查询该站点需要对接的平台配置
List<ThirdPartySecretInfoVO> secretInfoVOS = thirdpartySecretInfoService.queryStationToPlatformList(stationId);
if (CollectionUtils.isEmpty(secretInfoVOS)) {
return;
}
// 调用相应平台的处理方法
for (ThirdPartySecretInfoVO secretInfoVO : secretInfoVOS) {
// 根据平台类型获取Service
ThirdPartyPlatformService platformService = ThirdPartyPlatformFactory.getInvokeStrategy(secretInfoVO.getPlatformType());
platformService.notificationStationStatus(stationId, pileConnectorCode, status, secretInfoVO);
}
}
/**
* 设备充电中状态变化推送
* notification_connector_charge_status
* notification_equip_charge_status
*/
public void notificationConnectorChargeStatus() {
}
/**
* 订单信息推送
* notification_orderInfo/notification_charge_order_info
*/
public void notificationOrderInfo() {
}
/**
* 站点费率变化推送
* notification_stationFee
*/
public void notificationStationFee() {
}
}

View File

@@ -10,11 +10,13 @@ import com.jsowell.common.util.StringUtils;
import com.jsowell.pile.dto.*;
import com.jsowell.pile.dto.ningxiajiaotou.NXJTQueryStationInfoDTO;
import com.jsowell.pile.thirdparty.CommonParamsDTO;
import com.jsowell.pile.vo.ThirdPartySecretInfoVO;
import com.jsowell.thirdparty.lianlian.vo.AccessTokenVO;
import com.jsowell.thirdparty.lianlian.vo.LianLianResultVO;
import com.jsowell.thirdparty.platform.util.Cryptos;
import com.jsowell.thirdparty.platform.util.Encodes;
import com.jsowell.thirdparty.platform.util.GBSignUtils;
import org.springframework.beans.factory.InitializingBean;
import java.nio.charset.StandardCharsets;
import java.util.*;
@@ -24,7 +26,10 @@ import java.util.*;
* 说明:此接口中的方法可以选择性实现,具体看要对接的第三方平台需要什么方法
* 所有的方法默认抛出未实现异常,在三方平台实现类中未覆盖的话,掉用会抛异常,注意处理异常
*/
public interface ThirdPartyPlatformService {
public interface ThirdPartyPlatformService extends InitializingBean {
default void printServiceName() {
throw new UnsupportedOperationException("This method is not yet implemented");
}
/**
* query_token 获取token提供给第三方平台使用
@@ -210,8 +215,11 @@ public interface ThirdPartyPlatformService {
}
/**
* 设备状态变化推送 notification_stationStatus
* 推送充电设备接口状态信息 supervise_notification_station_status
* 设备状态变化推送
* 概述:当设备状态发生变化时,推送最新的状态到合作方
* 接口定义:
* 中电联平台 设备状态变化推送 notification_stationStatus
* 内蒙古平台 推送充电设备接口状态信息 supervise_notification_station_status
*
* @param dto
* @throws UnsupportedOperationException 未实现异常
@@ -220,6 +228,21 @@ public interface ThirdPartyPlatformService {
throw new UnsupportedOperationException("This method is not yet implemented");
}
/**
* 设备状态变化推送
* 概述:当设备状态发生变化时,推送最新的状态到合作方
* 接口定义:
* 中电联平台 设备状态变化推送 notification_stationStatus
* 内蒙古平台 推送充电设备接口状态信息 supervise_notification_station_status
*
* @param stationId 站点id
* @param pileConnectorCode 充电桩枪口编号
* @throws UnsupportedOperationException 未实现异常
*/
default String notificationStationStatus(String stationId, String pileConnectorCode, String status, ThirdPartySecretInfoVO secretInfoVO) {
throw new UnsupportedOperationException("This method is not yet implemented");
}
/**
* 设备充电中状态变化推送 notification_connector_charge_status
*

View File

@@ -0,0 +1,38 @@
package com.jsowell.thirdparty.platform.factory;
import com.google.common.collect.Maps;
import com.jsowell.common.util.StringUtils;
import com.jsowell.thirdparty.platform.ThirdPartyPlatformService;
import java.util.Map;
import java.util.Objects;
/**
* 工厂设计模式
* 云快充操作
*/
public class ThirdPartyPlatformFactory {
private static Map<String, ThirdPartyPlatformService> serviceMap = Maps.newHashMap();
/**
* 注册
* @param str
* @param service
*/
public static void register(String str, ThirdPartyPlatformService service) {
if (StringUtils.isBlank(str) || Objects.isNull(service)) {
return;
}
serviceMap.put(str, service);
}
/**
* 获取
* @param type
* @return
*/
public static ThirdPartyPlatformService getInvokeStrategy(String type) {
return serviceMap.get(type);
}
}

View File

@@ -21,6 +21,7 @@ import com.jsowell.pile.domain.*;
import com.jsowell.pile.domain.ykcCommond.StartChargingCommand;
import com.jsowell.pile.dto.*;
import com.jsowell.pile.service.*;
import com.jsowell.pile.thirdparty.ZDLEquipmentInfo;
import com.jsowell.pile.vo.base.ConnectorInfoVO;
import com.jsowell.pile.vo.base.ThirdPartyStationInfoVO;
import com.jsowell.pile.vo.base.ThirdPartyStationRelationVO;
@@ -29,24 +30,24 @@ import com.jsowell.pile.vo.uniapp.BillingPriceVO;
import com.jsowell.pile.vo.web.BillingTemplateVO;
import com.jsowell.pile.vo.web.EchoBillingTemplateVO;
import com.jsowell.pile.vo.web.PileConnectorInfoVO;
import com.jsowell.pile.vo.web.PileStationVO;
import com.jsowell.pile.vo.zdl.EquipBusinessPolicyVO;
import com.jsowell.thirdparty.lianlian.domain.*;
import com.jsowell.thirdparty.platform.util.Cryptos;
import com.jsowell.thirdparty.platform.util.Encodes;
import com.jsowell.thirdparty.platform.util.GBSignUtils;
import com.jsowell.thirdparty.platform.util.HttpRequestUtil;
import com.jsowell.thirdparty.lianlian.vo.EquipmentAuthVO;
import com.jsowell.thirdparty.lianlian.vo.QueryChargingStatusVO;
import com.jsowell.thirdparty.lianlian.vo.QueryStartChargeVO;
import com.jsowell.thirdparty.lianlian.vo.QueryStopChargeVO;
import com.jsowell.thirdparty.platform.ThirdPartyPlatformService;
import com.jsowell.thirdparty.platform.factory.ThirdPartyPlatformFactory;
import com.jsowell.thirdparty.platform.hainan.domain.HNStationInfo;
import com.jsowell.pile.thirdparty.ZDLEquipmentInfo;
import com.jsowell.thirdparty.platform.util.Cryptos;
import com.jsowell.thirdparty.platform.util.Encodes;
import com.jsowell.thirdparty.platform.util.GBSignUtils;
import com.jsowell.thirdparty.platform.util.HttpRequestUtil;
import com.jsowell.thirdparty.zhongdianlian.service.ZDLService;
import org.apache.commons.collections4.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -70,7 +71,7 @@ import java.util.stream.Collectors;
public class HaiNanPlatformServiceImpl implements ThirdPartyPlatformService {
Logger logger = LoggerFactory.getLogger(HaiNanPlatformServiceImpl.class);
// 平台类型
private final String platformType = ThirdPlatformTypeEnum.HAI_NAN_1_PLATFORM.getTypeCode();
private final String thirdPlatformType = ThirdPlatformTypeEnum.HAI_NAN_1_PLATFORM.getTypeCode();
@Autowired
private PileMerchantInfoService pileMerchantInfoService;
@@ -108,10 +109,24 @@ public class HaiNanPlatformServiceImpl implements ThirdPartyPlatformService {
@Autowired
private ZDLService zdlService;
// @Override
// public void afterPropertiesSet() throws Exception {
// InterfaceWithPlatformLogicFactory.register(platformType, this);
// }
/**
* Invoked by the containing {@code BeanFactory} after it has set all bean properties
* and satisfied {@link BeanFactoryAware}, {@code ApplicationContextAware} etc.
* <p>This method allows the bean instance to perform validation of its overall
* configuration and final initialization when all bean properties have been set.
*
* @throws Exception in the event of misconfiguration (such as failure to set an
* essential property) or if initialization fails for any other reason
*/
@Override
public void afterPropertiesSet() throws Exception {
ThirdPartyPlatformFactory.register(thirdPlatformType, this);
}
@Override
public void printServiceName() {
System.out.println("当前类名:" + this.getClass().getSimpleName());
}
public String pushStationInfoV2(PushStationInfoDTO dto) {
return zdlService.pushStationInfoV2(dto);
@@ -994,4 +1009,5 @@ public class HaiNanPlatformServiceImpl implements ThirdPartyPlatformService {
return result;
}
}

View File

@@ -41,6 +41,7 @@ import com.jsowell.thirdparty.platform.ThirdPartyPlatformService;
import com.jsowell.thirdparty.platform.common.ChargeDetail;
import com.jsowell.thirdparty.platform.common.OrderInfo;
import com.jsowell.thirdparty.platform.common.StationInfo;
import com.jsowell.thirdparty.platform.factory.ThirdPartyPlatformFactory;
import com.jsowell.thirdparty.platform.util.*;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -55,7 +56,7 @@ import java.util.stream.Collectors;
@Service
public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService {
// 平台类型
private final String platformType = ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getTypeCode();
private final String thirdPlatformType = ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getTypeCode();
@Autowired
private PileMerchantInfoService pileMerchantInfoService;
@@ -84,11 +85,24 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService {
@Resource
private ThirdPartyStationRelationService thirdPartyStationRelationService;
/**
* Invoked by the containing {@code BeanFactory} after it has set all bean properties
* and satisfied {@link BeanFactoryAware}, {@code ApplicationContextAware} etc.
* <p>This method allows the bean instance to perform validation of its overall
* configuration and final initialization when all bean properties have been set.
*
* @throws Exception in the event of misconfiguration (such as failure to set an
* essential property) or if initialization fails for any other reason
*/
@Override
public void afterPropertiesSet() throws Exception {
ThirdPartyPlatformFactory.register(thirdPlatformType, this);
}
// @Override
// public void afterPropertiesSet() throws Exception {
// InterfaceWithPlatformLogicFactory.register(platformType, this);
// }
@Override
public void printServiceName() {
System.out.println("当前类名:" + this.getClass().getSimpleName());
}
// @Override
public Map<String, String> queryTokenOld(CommonParamsDTO dto) {
@@ -469,7 +483,7 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService {
PileStationInfo pileStationInfo = pileStationInfoService.selectPileStationInfoById(Long.parseLong(stationId));
// 通过第三方配置类型查询相关配置信息
ThirdPartySettingInfo settingInfo = new ThirdPartySettingInfo();
settingInfo.setType(platformType);
settingInfo.setType(thirdPlatformType);
ThirdPartySettingInfo thirdPartySettingInfo = thirdPartySettingInfoService.selectSettingInfo(settingInfo);
String operatorId = thirdPartySettingInfo.getOperatorId();
@@ -519,7 +533,7 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService {
info.setAreaCode(subAreaCode);
// 截取运营商组织机构代码(去除最后一位后的最后九位)
String organizationCode = "";
if (StringUtils.equals(ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getTypeCode(), platformType)) {
if (StringUtils.equals(ThirdPlatformTypeEnum.LIAN_LIAN_PLATFORM.getTypeCode(), thirdPlatformType)) {
// 联联平台先使用自己运营商的组织机构代码
organizationCode = Constants.OPERATORID_LIANLIAN;
info.setEquipmentOwnerID(organizationCode);
@@ -575,8 +589,8 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService {
, dataSecretIv, operatorId, signSecret);
// 新增数据库
thirdPartyStationRelationService.insertInfo2DataBase(platformType, stationId);
return platformType + "" + result;
thirdPartyStationRelationService.insertInfo2DataBase(thirdPlatformType, stationId);
return thirdPlatformType + "" + result;
}
/**
@@ -967,4 +981,5 @@ public class LianLianPlatformServiceImpl implements ThirdPartyPlatformService {
return resultMap;
}
}

View File

@@ -41,6 +41,7 @@ import com.jsowell.thirdparty.lianlian.domain.StationStatusInfo;
import com.jsowell.thirdparty.lianlian.vo.AccessTokenVO;
import com.jsowell.thirdparty.lianlian.vo.QueryChargingStatusVO;
import com.jsowell.thirdparty.platform.ThirdPartyPlatformService;
import com.jsowell.thirdparty.platform.factory.ThirdPartyPlatformFactory;
import com.jsowell.thirdparty.platform.neimenggu.domain.ChargeOrderInfo;
import com.jsowell.thirdparty.platform.neimenggu.domain.SupChargeDetails;
import com.jsowell.thirdparty.platform.neimenggu.domain.SupOperatorInfo;
@@ -97,6 +98,19 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
@Autowired
private PileBillingTemplateService pileBillingTemplateService;
@Override
public void afterPropertiesSet() throws Exception {
ThirdPartyPlatformFactory.register(thirdPlatformType, this);
}
/**
* @return
*/
@Override
public void printServiceName() {
System.out.println("当前类名:" + this.getClass().getSimpleName());
}
/**
* query_token 获取token提供给第三方平台使用
*
@@ -338,7 +352,6 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
*/
@Override
public String notificationStationStatus(PushRealTimeInfoDTO dto) {
String thirdPartyType = dto.getThirdPartyType();
String status = dto.getStatus();
String pileConnectorCode = dto.getPileConnectorCode();
@@ -372,6 +385,30 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
return result;
}
@Override
public String notificationStationStatus(String stationId, String pileConnectorCode, String status, ThirdPartySecretInfoVO secretInfoVO) {
String operatorId = secretInfoVO.getTheirOperatorId();
String operatorSecret = secretInfoVO.getTheirOperatorSecret();
String signSecret = secretInfoVO.getTheirSigSecret();
String dataSecret = secretInfoVO.getTheirDataSecret();
String dataSecretIv = secretInfoVO.getTheirDataSecretIv();
String urlAddress = secretInfoVO.getTheirUrlPrefix();
String url = urlAddress + BusinessInformationExchangeEnum.NOTIFICATION_STATION_STATUS.getValue();
ConnectorStatusInfo info = ConnectorStatusInfo.builder()
.connectorID(pileConnectorCode)
.status(Integer.parseInt(status))
.build();
// 调用联联平台接口
JSONObject json = new JSONObject();
json.put("ConnectorStatusInfo", info);
String jsonString = JSON.toJSONString(json);
// 获取令牌
String token = getToken(urlAddress, operatorId, operatorSecret, dataSecretIv, signSecret, dataSecret);
String result = HttpRequestUtil.sendPost(token, jsonString, url, dataSecret, dataSecretIv, operatorId, signSecret);
return result;
}
/**
* 充电订单推送 notification_charge_order_info
*
@@ -651,4 +688,6 @@ public class NeiMengGuPlatformServiceImpl implements ThirdPartyPlatformService {
}
return resultList;
}
}

View File

@@ -3,22 +3,22 @@ package com.jsowell.thirdparty.platform.qinghai.service;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
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;
import com.jsowell.common.enums.thirdparty.ThirdPartyOperatorIdEnum;
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
import com.jsowell.common.enums.ykc.OrderStatusEnum;
import com.jsowell.common.enums.ykc.PayModeEnum;
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.util.DateUtils;
import com.jsowell.common.util.PageUtils;
import com.jsowell.common.util.StringUtils;
import com.jsowell.pile.domain.*;
import com.jsowell.pile.dto.*;
import com.jsowell.pile.dto.PushRealTimeInfoDTO;
import com.jsowell.pile.dto.QueryConnectorListDTO;
import com.jsowell.pile.dto.QueryStartChargeDTO;
import com.jsowell.pile.dto.QueryStationInfoDTO;
import com.jsowell.pile.service.*;
import com.jsowell.pile.thirdparty.ZDLEquipmentInfo;
import com.jsowell.pile.thirdparty.ZDLStationInfo;
@@ -28,15 +28,13 @@ import com.jsowell.pile.vo.uniapp.BillingPriceVO;
import com.jsowell.pile.vo.uniapp.OrderVO;
import com.jsowell.pile.vo.web.PileConnectorInfoVO;
import com.jsowell.pile.vo.web.PileMerchantInfoVO;
import com.jsowell.pile.vo.web.PileStationVO;
import com.jsowell.pile.vo.zdl.EquipBusinessPolicyVO;
import com.jsowell.thirdparty.lianlian.domain.ConnectorStatusInfo;
import com.jsowell.thirdparty.lianlian.vo.QueryChargingStatusVO;
import com.jsowell.thirdparty.platform.ThirdPartyPlatformService;
import com.jsowell.thirdparty.platform.common.ChargeOrderInfo;
import com.jsowell.thirdparty.platform.common.ConnectorChargeStatusInfo;
import com.jsowell.thirdparty.platform.common.SupStationPowerInfo;
import com.jsowell.thirdparty.platform.hainan.domain.HNStationInfo;
import com.jsowell.thirdparty.platform.factory.ThirdPartyPlatformFactory;
import com.jsowell.thirdparty.platform.util.Cryptos;
import com.jsowell.thirdparty.platform.util.Encodes;
import com.jsowell.thirdparty.platform.util.GBSignUtils;
@@ -44,14 +42,13 @@ import com.jsowell.thirdparty.platform.util.HttpRequestUtil;
import org.apache.commons.collections4.CollectionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@@ -92,9 +89,28 @@ public class QingHaiPlatformServiceImpl implements ThirdPartyPlatformService {
Logger logger = LoggerFactory.getLogger(QingHaiPlatformServiceImpl.class);
// 平台类型
private final String platformType = ThirdPlatformTypeEnum.QING_HAI_PLATFORM.getTypeCode();
private final String thirdPlatformType = ThirdPlatformTypeEnum.QING_HAI_PLATFORM.getTypeCode();
/**
* Invoked by the containing {@code BeanFactory} after it has set all bean properties
* and satisfied {@link BeanFactoryAware}, {@code ApplicationContextAware} etc.
* <p>This method allows the bean instance to perform validation of its overall
* configuration and final initialization when all bean properties have been set.
*
* @throws Exception in the event of misconfiguration (such as failure to set an
* essential property) or if initialization fails for any other reason
*/
@Override
public void afterPropertiesSet() throws Exception {
ThirdPartyPlatformFactory.register(thirdPlatformType, this);
}
@Override
public void printServiceName() {
System.out.println("当前类名:" + this.getClass().getSimpleName());
}
/**
* 查询站点信息 query_stations_info
* @param dto 查询站点信息dto
@@ -593,4 +609,5 @@ public class QingHaiPlatformServiceImpl implements ThirdPartyPlatformService {
return resultMap;
}
}

View File

@@ -1,6 +1,7 @@
package com.jsowell.thirdparty.platform.zhongdianlian.service;
import com.alibaba.fastjson2.JSON;
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
import com.jsowell.common.util.JWTUtils;
import com.jsowell.common.util.StringUtils;
import com.jsowell.pile.service.ThirdPartyPlatformConfigService;
@@ -8,6 +9,7 @@ import com.jsowell.pile.thirdparty.CommonParamsDTO;
import com.jsowell.pile.vo.ThirdPartySecretInfoVO;
import com.jsowell.thirdparty.lianlian.vo.AccessTokenVO;
import com.jsowell.thirdparty.platform.ThirdPartyPlatformService;
import com.jsowell.thirdparty.platform.factory.ThirdPartyPlatformFactory;
import com.jsowell.thirdparty.platform.util.Cryptos;
import com.jsowell.thirdparty.platform.util.ThirdPartyPlatformUtils;
import com.jsowell.thirdparty.service.ThirdpartySecretInfoService;
@@ -18,6 +20,8 @@ import java.util.Map;
@Service
public class ZhongDianLianPlatformServiceImpl implements ThirdPartyPlatformService {
// 平台类型
private final String thirdPlatformType = ThirdPlatformTypeEnum.ZHONG_DIAN_LIAN_PLATFORM.getTypeCode();
@Autowired
private ThirdPartyPlatformConfigService thirdPartyPlatformConfigService;
@@ -25,6 +29,25 @@ public class ZhongDianLianPlatformServiceImpl implements ThirdPartyPlatformServi
@Autowired
private ThirdpartySecretInfoService thirdpartySecretInfoService;
/**
* Invoked by the containing {@code BeanFactory} after it has set all bean properties
* and satisfied {@link BeanFactoryAware}, {@code ApplicationContextAware} etc.
* <p>This method allows the bean instance to perform validation of its overall
* configuration and final initialization when all bean properties have been set.
*
* @throws Exception in the event of misconfiguration (such as failure to set an
* essential property) or if initialization fails for any other reason
*/
@Override
public void afterPropertiesSet() throws Exception {
ThirdPartyPlatformFactory.register(thirdPlatformType, this);
}
@Override
public void printServiceName() {
System.out.println("当前类名:" + this.getClass().getSimpleName());
}
/**
* query_token 获取token提供给第三方平台使用
*
@@ -75,4 +98,5 @@ public class ZhongDianLianPlatformServiceImpl implements ThirdPartyPlatformServi
Map<String, String> resultMap = ThirdPartyPlatformUtils.generateResultMap(vo, thirdPartySecretInfoVO);
return resultMap;
}
}