mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-11-03 13:51:44 +08:00
格式化代码
This commit is contained in:
@ -311,7 +311,6 @@ public class WxPayServiceImpl implements WxPayService {
|
||||
request.checkAndSign(this.getConfig());
|
||||
|
||||
String url = this.getPayBaseUrl() + "/pay/downloadbill";
|
||||
//TODO 返回的内容可能是文件流,也有可能是xml,需要区分对待
|
||||
String responseContent = this.post(url, request.toXML());
|
||||
if (responseContent.startsWith("<")) {
|
||||
WxPayCommonResult result = WxPayBaseResult.fromXML(responseContent, WxPayCommonResult.class);
|
||||
@ -328,7 +327,7 @@ public class WxPayServiceImpl implements WxPayService {
|
||||
|
||||
String listStr = "";
|
||||
String objStr = "";
|
||||
if (responseContent.indexOf("总交易单数") >= 0){
|
||||
if (responseContent.contains("总交易单数")) {
|
||||
listStr = responseContent.substring(0, responseContent.indexOf("总交易单数"));
|
||||
objStr = responseContent.substring(responseContent.indexOf("总交易单数"));
|
||||
}
|
||||
@ -341,7 +340,7 @@ public class WxPayServiceImpl implements WxPayService {
|
||||
|
||||
// 参考以上格式进行取值
|
||||
|
||||
List<WxPayBillBaseResult> wxPayBillBaseResultLst = new LinkedList<WxPayBillBaseResult>();
|
||||
List<WxPayBillBaseResult> wxPayBillBaseResultLst = new LinkedList<>();
|
||||
String newStr = listStr.replaceAll(",", " "); // 去空格
|
||||
String[] tempStr = newStr.split("`"); // 数据分组
|
||||
String[] t = tempStr[0].split(" ");// 分组标题
|
||||
|
||||
Reference in New Issue
Block a user