mirror of
				https://gitee.com/binary/weixin-java-tools.git
				synced 2025-10-31 10:38:42 +08:00 
			
		
		
		
	🎨 优化部分代码
This commit is contained in:
		| @ -144,7 +144,7 @@ public abstract class BaseWxPayServiceImpl implements WxPayService { | |||||||
|     } catch (WxPayException e) { |     } catch (WxPayException e) { | ||||||
|       throw e; |       throw e; | ||||||
|     } catch (Exception e) { |     } catch (Exception e) { | ||||||
|       throw new WxPayException("发生异常," + e.getMessage(), e); |       throw new WxPayException("发生异常!", e); | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
| @ -508,7 +508,7 @@ public abstract class BaseWxPayServiceImpl implements WxPayService { | |||||||
|     return WxPayBillResult.fromRawBillResultString(responseContent, billType); |     return WxPayBillResult.fromRawBillResultString(responseContent, billType); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   private String handleGzipBill(String url, String requestStr) { |   private String handleGzipBill(String url, String requestStr) throws WxPayException { | ||||||
|     try { |     try { | ||||||
|       byte[] responseBytes = this.postForBytes(url, requestStr, false); |       byte[] responseBytes = this.postForBytes(url, requestStr, false); | ||||||
|       Path tempDirectory = Files.createTempDirectory("bill"); |       Path tempDirectory = Files.createTempDirectory("bill"); | ||||||
| @ -522,13 +522,12 @@ public abstract class BaseWxPayServiceImpl implements WxPayService { | |||||||
|           throw WxPayException.from(BaseWxPayResult.fromXML(new String(responseBytes, StandardCharsets.UTF_8), |           throw WxPayException.from(BaseWxPayResult.fromXML(new String(responseBytes, StandardCharsets.UTF_8), | ||||||
|             WxPayCommonResult.class)); |             WxPayCommonResult.class)); | ||||||
|         } else { |         } else { | ||||||
|           throw new WxPayException("解压zip文件出错," + e.getMessage(), e); |           throw new WxPayException("解压zip文件出错!", e); | ||||||
|         } |         } | ||||||
|       } |       } | ||||||
|     } catch (Exception e) { |     } catch (Exception e) { | ||||||
|       throw new WxPayException("解析对账单文件时出错," + e.getMessage(), e); |       throw new WxPayException("解析对账单文件时出错!", e); | ||||||
|     } |     } | ||||||
|     return null; |  | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   @Override |   @Override | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Binary Wang
					Binary Wang