mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update
This commit is contained in:
@@ -123,7 +123,7 @@ public class XinDiantuPlatfromServiceImpl implements ThirdPartyPlatformService {
|
||||
// 0:无;1:无此对接平台;2:密钥错误; 3~99:自定义
|
||||
int failReason = 0;
|
||||
|
||||
String operatorId = dto.getPlatformID();
|
||||
String operatorId = StringUtils.isNotBlank(dto.getOperatorID()) ? dto.getOperatorID() : dto.getPlatformID();
|
||||
// 通过operatorId 查出 operatorSecret
|
||||
ThirdPartySecretInfoVO thirdPartySecretInfoVO = thirdpartySecretInfoService.queryByOperatorId(operatorId);
|
||||
if (thirdPartySecretInfoVO == null) {
|
||||
@@ -137,10 +137,14 @@ public class XinDiantuPlatfromServiceImpl implements ThirdPartyPlatformService {
|
||||
String decrypt = Cryptos.decrypt(dto.getData(), dataSecret, dataSecretIv);
|
||||
String inputOperatorSecret = null;
|
||||
if (StringUtils.isNotBlank(decrypt)) {
|
||||
inputOperatorSecret = JSON.parseObject(decrypt).getString("PlatformSecret");
|
||||
inputOperatorSecret = JSON.parseObject(decrypt).getString("OperatorSecret");
|
||||
if (StringUtils.isBlank(inputOperatorSecret)) {
|
||||
inputOperatorSecret = JSON.parseObject(decrypt).getString("PlatformSecret");
|
||||
}
|
||||
}
|
||||
// 对比密钥
|
||||
if (!StringUtils.equals(theirOperatorSecret, inputOperatorSecret)) {
|
||||
List<String> operatorSecretList = Lists.newArrayList(theirOperatorSecret, thirdPartySecretInfoVO.getOurOperatorSecret());
|
||||
if (!operatorSecretList.contains(inputOperatorSecret)) {
|
||||
failReason = 1;
|
||||
succStat = 1;
|
||||
} else {
|
||||
@@ -155,8 +159,7 @@ public class XinDiantuPlatfromServiceImpl implements ThirdPartyPlatformService {
|
||||
vo.setFailReason(failReason);
|
||||
vo.setSuccStat(succStat);
|
||||
|
||||
Map<String, String> resultMap = ThirdPartyPlatformUtils.generateResultMap(vo, thirdPartySecretInfoVO);
|
||||
return resultMap;
|
||||
return ThirdPartyPlatformUtils.generateResultMap(vo, thirdPartySecretInfoVO);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user