Skip to content

Commit 9824420

Browse files
committed
#862 修复微信支付对账单结果中统计数据里的多余空格
1 parent 896a4af commit 9824420

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/result/WxPayBillResult.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,13 @@ public static WxPayBillResult fromRawBillResultString(String responseContent) {
120120
* 参考以上格式进行取值
121121
*/
122122
String[] totalTempStr = objStr.replaceAll(",", " ").split("`");
123-
billResult.setTotalRecord(totalTempStr[1]);
124-
billResult.setTotalFee(totalTempStr[2]);
125-
billResult.setTotalRefundFee(totalTempStr[3]);
126-
billResult.setTotalCouponFee(totalTempStr[4]);
127-
billResult.setTotalPoundageFee(totalTempStr[5]);
128-
billResult.setTotalAmount(totalTempStr[6]);
129-
billResult.setTotalAppliedRefundFee(totalTempStr[7]);
123+
billResult.setTotalRecord(totalTempStr[1].trim());
124+
billResult.setTotalFee(totalTempStr[2].trim());
125+
billResult.setTotalRefundFee(totalTempStr[3].trim());
126+
billResult.setTotalCouponFee(totalTempStr[4].trim());
127+
billResult.setTotalPoundageFee(totalTempStr[5].trim());
128+
billResult.setTotalAmount(totalTempStr[6].trim());
129+
billResult.setTotalAppliedRefundFee(totalTempStr[7].trim());
130130

131131
return billResult;
132132
}

0 commit comments

Comments
 (0)