diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/XinDiantuPlatfromServiceImpl.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/XinDiantuPlatfromServiceImpl.java index 3e7403dc0..a297fc67c 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/XinDiantuPlatfromServiceImpl.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/service/impl/XinDiantuPlatfromServiceImpl.java @@ -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 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 resultMap = ThirdPartyPlatformUtils.generateResultMap(vo, thirdPartySecretInfoVO); - return resultMap; + return ThirdPartyPlatformUtils.generateResultMap(vo, thirdPartySecretInfoVO); } /**