update 对接lianlian平台

This commit is contained in:
2024-05-08 18:55:11 +08:00
parent cbde1637d6
commit 7f342435fa
4 changed files with 20 additions and 12 deletions

View File

@@ -51,6 +51,13 @@ public class ThirdPartyBaseController extends BaseController {
// }
// }
/**
* 验证签名
*/
protected boolean verifySign(CommonParamsDTO dto) {
return true;
}
/**
* 解析DTO

View File

@@ -424,19 +424,15 @@ public class LianLianController extends ThirdPartyBaseController {
}
// 校验签名
// Map<String, String> resultMap = lianLianService.checkoutSign(dto);
// if (resultMap == null) {
// // 签名错误
// return CommonResult.failed("签名校验错误");
// }
// String operatorSecret = resultMap.get("OperatorSecret");
// String dataString = resultMap.get("Data");
// String dataSecret = resultMap.get("DataSecret");
// String dataSecretIV = resultMap.get("DataSecretIV");
boolean verifySign = verifySign(dto);
if (!verifySign) {
// 签名错误
return CommonResult.failed("签名校验错误");
}
// 解析入参
QueryStartChargeDTO queryStartChargeDTO = parseParamsDTO(dto, QueryStartChargeDTO.class);
// 执行逻辑
Map<String, String> map = lianLianService.queryStartCharge(queryStartChargeDTO);
return CommonResult.success(0, "请求启动充电成功!", map.get("Data"), map.get("Sig"));