mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update 校验签名
This commit is contained in:
@@ -180,6 +180,10 @@ public class ThirdPartyBaseController extends BaseController {
|
||||
* verifySignature
|
||||
*/
|
||||
protected boolean verifySignature(CommonParamsDTO dto) {
|
||||
return this.verifySignature(dto, null);
|
||||
}
|
||||
|
||||
protected boolean verifySignature(CommonParamsDTO dto, String signSecret) {
|
||||
// 查询密钥
|
||||
String operatorId = StringUtils.isNotBlank(dto.getOperatorID()) ? dto.getOperatorID() : dto.getPlatformID();
|
||||
ThirdPartySecretInfoVO secretInfoVO = thirdpartySecretInfoService.queryByOperatorId(operatorId);
|
||||
@@ -187,7 +191,9 @@ public class ThirdPartyBaseController extends BaseController {
|
||||
throw new BusinessException("1", "无此对接平台");
|
||||
}
|
||||
// 校验签名,使用响应方的密钥
|
||||
String signSecret = secretInfoVO.getOurSigSecret();
|
||||
if (StringUtils.isBlank(signSecret)) {
|
||||
signSecret = secretInfoVO.getTheirSigSecret();
|
||||
}
|
||||
Map<String, String> map = Maps.newLinkedHashMap();
|
||||
String operatorID = dto.getOperatorID();
|
||||
if (StringUtils.isNotBlank(operatorID)) {
|
||||
|
||||
Reference in New Issue
Block a user