🎨 优化微信消费者投诉接口

This commit is contained in:
大森林 2022-03-25 09:18:45 +00:00 committed by binarywang
parent 6ce3772c86
commit 1893790aae

View File

@ -34,8 +34,10 @@ public class ComplaintServiceImpl implements ComplaintService {
List<ComplaintDetailResult> data = complaintResult.getData();
for (ComplaintDetailResult complaintDetailResult : data) {
// 对手机号进行解密操作
String payerPhone = RsaCryptoUtil.decryptOAEP(complaintDetailResult.getPayerPhone(), this.payService.getConfig().getPrivateKey());
complaintDetailResult.setPayerPhone(payerPhone);
if(complaintDetailResult.getPayerPhone() != null) {
String payerPhone = RsaCryptoUtil.decryptOAEP(complaintDetailResult.getPayerPhone(), this.payService.getConfig().getPrivateKey());
complaintDetailResult.setPayerPhone(payerPhone);
}
}
return complaintResult;
}
@ -47,8 +49,10 @@ public class ComplaintServiceImpl implements ComplaintService {
String response = this.payService.getV3(url);
ComplaintDetailResult result = GSON.fromJson(response, ComplaintDetailResult.class);
// 对手机号进行解密操作
String payerPhone = RsaCryptoUtil.decryptOAEP(result.getPayerPhone(), this.payService.getConfig().getPrivateKey());
result.setPayerPhone(payerPhone);
if(result.getPayerPhone() != null) {
String payerPhone = RsaCryptoUtil.decryptOAEP(result.getPayerPhone(), this.payService.getConfig().getPrivateKey());
result.setPayerPhone(payerPhone);
}
return result;
}