新增 河南省平台Service

This commit is contained in:
Lemon
2025-02-11 10:14:46 +08:00
parent 9fa4695f7d
commit 69596d2416
2 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
package com.jsowell.thirdparty.platform.service.impl;
import com.jsowell.common.constant.Constants;
import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
import com.jsowell.common.exception.BusinessException;
import com.jsowell.pile.vo.ThirdPartySecretInfoVO;
import com.jsowell.thirdparty.platform.factory.ThirdPartyPlatformFactory;
import com.jsowell.thirdparty.platform.service.ThirdPartyPlatformService;
import com.jsowell.thirdparty.service.ThirdpartySecretInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* 河南省平台Service
*
* @author Lemon
* @Date 2025/2/11 9:57:47
*/
@Service
public class HeNanPlatformServiceImpl implements ThirdPartyPlatformService {
// 平台类型
private final String thirdPlatformType = ThirdPlatformTypeEnum.HE_NAN_PLATFORM.getTypeCode();
@Autowired
private ThirdpartySecretInfoService thirdpartySecretInfoService;
@Override
public void afterPropertiesSet() throws Exception {
ThirdPartyPlatformFactory.register(thirdPlatformType, this);
}
/**
* 查询河南省平台密钥信息
* @return
*/
private ThirdPartySecretInfoVO getHeNanSecretInfo() {
// 通过第三方平台类型查询相关配置信息
ThirdPartySecretInfoVO thirdPartySecretInfoVO = thirdpartySecretInfoService.queryByThirdPlatformType(thirdPlatformType);
if (thirdPartySecretInfoVO == null) {
throw new BusinessException(ReturnCodeEnum.CODE_SELECT_INFO_IS_NULL);
}
thirdPartySecretInfoVO.setOurOperatorId(Constants.OPERATORID_JIANG_SU);
return thirdPartySecretInfoVO;
}
}