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

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