File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/service/impl Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,10 @@ public ComplaintResult queryComplaints(ComplaintRequest request) throws WxPayExc
34
34
List <ComplaintDetailResult > data = complaintResult .getData ();
35
35
for (ComplaintDetailResult complaintDetailResult : data ) {
36
36
// 对手机号进行解密操作
37
- String payerPhone = RsaCryptoUtil .decryptOAEP (complaintDetailResult .getPayerPhone (), this .payService .getConfig ().getPrivateKey ());
38
- complaintDetailResult .setPayerPhone (payerPhone );
37
+ if (complaintDetailResult .getPayerPhone () != null ) {
38
+ String payerPhone = RsaCryptoUtil .decryptOAEP (complaintDetailResult .getPayerPhone (), this .payService .getConfig ().getPrivateKey ());
39
+ complaintDetailResult .setPayerPhone (payerPhone );
40
+ }
39
41
}
40
42
return complaintResult ;
41
43
}
@@ -47,8 +49,10 @@ public ComplaintDetailResult getComplaint(ComplaintDetailRequest request) throws
47
49
String response = this .payService .getV3 (url );
48
50
ComplaintDetailResult result = GSON .fromJson (response , ComplaintDetailResult .class );
49
51
// 对手机号进行解密操作
50
- String payerPhone = RsaCryptoUtil .decryptOAEP (result .getPayerPhone (), this .payService .getConfig ().getPrivateKey ());
51
- result .setPayerPhone (payerPhone );
52
+ if (result .getPayerPhone () != null ) {
53
+ String payerPhone = RsaCryptoUtil .decryptOAEP (result .getPayerPhone (), this .payService .getConfig ().getPrivateKey ());
54
+ result .setPayerPhone (payerPhone );
55
+ }
52
56
return result ;
53
57
}
54
58
You can’t perform that action at this time.
0 commit comments