update 对接lianlian平台

This commit is contained in:
2024-04-18 14:15:44 +08:00
parent c76cbf3c07
commit 8f7b7d994e
14 changed files with 333 additions and 118 deletions

View File

@@ -1,6 +1,7 @@
package com.jsowell.pile.mapper;
import com.jsowell.pile.domain.ThirdPartyPlatformConfig;
import com.jsowell.pile.vo.ThirdPartySecretInfoVO;
import org.springframework.stereotype.Repository;
import java.util.List;
@@ -68,4 +69,6 @@ public interface ThirdPartyPlatformConfigMapper {
* @return
*/
ThirdPartyPlatformConfig getInfoByOperatorId(String operatorId);
ThirdPartySecretInfoVO queryThirdPartySecretInfo(String operatorId);
}

View File

@@ -1,9 +1,9 @@
package com.jsowell.pile.service;
import java.util.List;
import com.jsowell.pile.domain.ThirdPartySettingInfo;
import java.util.List;
/**
* 第三方平台配置Service接口
*
@@ -67,18 +67,5 @@ public interface ThirdPartySettingInfoService {
*/
public int deleteThirdPartySettingInfoById(Long id);
/**
* 根据站点id 查询配置列表
*
* @param stationId
* @return
*/
public ThirdPartySettingInfo getInfoByStationId(Long stationId);
/**
* 修改站点互联互通配置
* @param info
* @return
*/
int updateStationSettingInfo(ThirdPartySettingInfo info);
}

View File

@@ -1,13 +1,14 @@
package com.jsowell.pile.service.impl;
import java.util.List;
import com.jsowell.common.util.DateUtils;
import com.jsowell.pile.domain.ThirdPartyPlatformConfig;
import com.jsowell.pile.mapper.ThirdPartyPlatformConfigMapper;
import com.jsowell.pile.service.ThirdPartyPlatformConfigService;
import com.jsowell.pile.vo.ThirdPartySecretInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jsowell.pile.mapper.ThirdPartyPlatformConfigMapper;
import com.jsowell.pile.domain.ThirdPartyPlatformConfig;
import com.jsowell.pile.service.ThirdPartyPlatformConfigService;
import java.util.List;
/**
* 对接平台配置信息Service业务层处理
@@ -98,4 +99,12 @@ public class ThirdPartyPlatformConfigServiceImpl implements ThirdPartyPlatformCo
public ThirdPartyPlatformConfig getInfoByOperatorId(String operatorId) {
return thirdPartyPlatformConfigMapper.getInfoByOperatorId(operatorId);
}
/**
* 查询第三方平台配置的密钥信息
* @return
*/
public ThirdPartySecretInfoVO queryThirdPartySecretInfo(String operatorId) {
return thirdPartyPlatformConfigMapper.queryThirdPartySecretInfo(operatorId);
}
}

View File

@@ -1,13 +1,13 @@
package com.jsowell.pile.service.impl;
import java.util.List;
import com.jsowell.common.util.DateUtils;
import com.jsowell.pile.domain.ThirdPartySettingInfo;
import com.jsowell.pile.mapper.ThirdPartySettingInfoMapper;
import com.jsowell.pile.service.ThirdPartySettingInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.jsowell.pile.mapper.ThirdPartySettingInfoMapper;
import com.jsowell.pile.domain.ThirdPartySettingInfo;
import com.jsowell.pile.service.ThirdPartySettingInfoService;
import java.util.List;
/**
* 第三方平台配置Service业务层处理
@@ -98,33 +98,5 @@ public class ThirdPartySettingInfoServiceImpl implements ThirdPartySettingInfoSe
return thirdPartySettingInfoMapper.deleteThirdPartySettingInfoById(id);
}
/**
* 根据站点id 查询配置列表
*
* @param stationId
* @return
*/
@Override
public ThirdPartySettingInfo getInfoByStationId(Long stationId) {
return thirdPartySettingInfoMapper.getInfoByStationId(stationId);
}
/**
* 修改站点互联互通配置
* @param info
* @return
*/
@Override
public int updateStationSettingInfo(ThirdPartySettingInfo info) {
Long stationId = info.getStationId();
ThirdPartySettingInfo infoByStationId = getInfoByStationId(stationId);
if (infoByStationId == null) {
// 新增
return insertThirdPartySettingInfo(info);
}else {
// 修改
info.setId(infoByStationId.getId());
return updateThirdPartySettingInfo(info);
}
}
}

View File

@@ -0,0 +1,44 @@
package com.jsowell.pile.vo;
import lombok.Getter;
import lombok.Setter;
/**
* 第三方平台配置的密钥信息
*/
@Getter
@Setter
public class ThirdPartySecretInfoVO {
// 我方的组织机构代码
private String ourOperatorId;
// 我方生成的唯一识别密钥
private String ourOperatorSecret;
// 我方生成的消息密钥
private String ourDataSecret;
// 我方生成的初始化向量
private String ourDataSecretIv;
// 我方生成的签名密钥
private String ourSigSecret;
// 对接平台的组织机构代码
private String theirOperatorId;
// 对接平台生成的唯一识别密钥
private String theirOperatorSecret;
// 对接平台生成的消息密钥
private String theirDataSecret;
// 对接平台的初始化向量
private String theirDataSecretIv;
// 对接平台生成的签名密钥
private String theirSigSecret;
// 对接平台接口前缀
private String theirUrlPrefix;
}