Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7bf811a

Browse filesBrowse files
committed
🎨 优化部分代码
1 parent 0605761 commit 7bf811a
Copy full SHA for 7bf811a

File tree

Expand file treeCollapse file tree

11 files changed

+39
-15
lines changed
Filter options
Expand file treeCollapse file tree

11 files changed

+39
-15
lines changed

‎weixin-java-common/src/main/java/me/chanjar/weixin/common/util/fs/FileUtils.java

Copy file name to clipboardExpand all lines: weixin-java-common/src/main/java/me/chanjar/weixin/common/util/fs/FileUtils.java
+12-1Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
package me.chanjar.weixin.common.util.fs;
22

3+
import org.apache.commons.io.IOUtils;
4+
35
import java.io.File;
46
import java.io.IOException;
57
import java.io.InputStream;
8+
import java.io.OutputStream;
69
import java.nio.file.Files;
710
import java.util.Base64;
811

12+
import static org.apache.commons.io.FileUtils.openOutputStream;
13+
914
public class FileUtils {
1015

1116
/**
@@ -20,10 +25,16 @@ public static File createTmpFile(InputStream inputStream, String name, String ex
2025
File resultFile = File.createTempFile(name, '.' + ext, tmpDirFile);
2126

2227
resultFile.deleteOnExit();
23-
org.apache.commons.io.FileUtils.copyToFile(inputStream, resultFile);
28+
copyToFile(inputStream, resultFile);
2429
return resultFile;
2530
}
2631

32+
private static void copyToFile(final InputStream source, final File destination) throws IOException {
33+
try (InputStream in = source; OutputStream out = openOutputStream(destination)) {
34+
IOUtils.copy(in, out);
35+
}
36+
}
37+
2738
/**
2839
* 创建临时文件.
2940
*

‎weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/applydata/ContentValue.java

Copy file name to clipboardExpand all lines: weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/oa/applydata/ContentValue.java
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ public class ContentValue implements Serializable {
1818
private String text;
1919

2020
@SerializedName("new_number")
21-
private Double newNumber;
21+
private String newNumber;
2222

2323
@SerializedName("new_money")
24-
private Double newMoney;
24+
private String newMoney;
2525

2626
private ContentValue.Date date;
2727

@@ -43,7 +43,7 @@ public static class Date implements Serializable {
4343
private String type;
4444

4545
@SerializedName("s_timestamp")
46-
private Double timestamp;
46+
private String timestamp;
4747
}
4848

4949
@Data

‎weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/ApplymentsStatusResult.java

Copy file name to clipboardExpand all lines: weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/ApplymentsStatusResult.java
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
@Data
1515
@NoArgsConstructor
1616
public class ApplymentsStatusResult implements Serializable {
17+
private static final long serialVersionUID = 1488464536143984732L;
1718
/**
1819
* <pre>
1920
* 字段名:申请状态

‎weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/CombineTransactionsNotifyResult.java

Copy file name to clipboardExpand all lines: weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/CombineTransactionsNotifyResult.java
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
@NoArgsConstructor
1818
public class CombineTransactionsNotifyResult implements Serializable {
1919

20+
private static final long serialVersionUID = -4710926828683593250L;
2021
/**
2122
* 源数据
2223
*/

‎weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/CombineTransactionsRequest.java

Copy file name to clipboardExpand all lines: weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/CombineTransactionsRequest.java
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
@Data
1717
@NoArgsConstructor
1818
public class CombineTransactionsRequest implements Serializable {
19+
private static final long serialVersionUID = -1242741645939606441L;
1920
/**
2021
* <pre>
2122
* 字段名:合单商户appid

‎weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/NotifyResponse.java

Copy file name to clipboardExpand all lines: weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/NotifyResponse.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
@Data
1313
@NoArgsConstructor
1414
public class NotifyResponse implements Serializable {
15-
15+
private static final long serialVersionUID = 341873114458149365L;
1616
@SerializedName(value = "id")
1717
private String id;
1818

‎weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsNotifyResult.java

Copy file name to clipboardExpand all lines: weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsNotifyResult.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
@Data
1717
@NoArgsConstructor
1818
public class PartnerTransactionsNotifyResult implements Serializable {
19-
19+
private static final long serialVersionUID = -6602962275015706689L;
2020
/**
2121
* 源数据
2222
*/

‎weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsRequest.java

Copy file name to clipboardExpand all lines: weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/PartnerTransactionsRequest.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
@Data
1818
@NoArgsConstructor
1919
public class PartnerTransactionsRequest implements Serializable {
20-
20+
private static final long serialVersionUID = -1550405819444680465L;
2121
/**
2222
* <pre>
2323
* 字段名:服务商公众号ID

‎weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SignatureHeader.java

Copy file name to clipboardExpand all lines: weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/SignatureHeader.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
@Data
1313
@NoArgsConstructor
1414
public class SignatureHeader implements Serializable {
15-
15+
private static final long serialVersionUID = -6958015499416059949L;
1616
/**
1717
* 时间戳
1818
*/

‎weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/TransactionsResult.java

Copy file name to clipboardExpand all lines: weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/TransactionsResult.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
@Data
1717
@NoArgsConstructor
1818
public class TransactionsResult implements Serializable {
19-
19+
private static final long serialVersionUID = 1760592667519950149L;
2020
/**
2121
* <pre>
2222
* 字段名:预支付交易会话标识 (APP支付、JSAPI支付 会返回)

‎weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/enums/TradeTypeEnum.java

Copy file name to clipboardExpand all lines: weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/ecommerce/enums/TradeTypeEnum.java
+16-6Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,22 @@
99
@Getter
1010
@AllArgsConstructor
1111
public enum TradeTypeEnum {
12-
13-
APP("/v3/combine-transactions/app","/v3/pay/partner/transactions/app"),
14-
JSAPI("/v3/combine-transactions/jsapi","/v3/pay/partner/transactions/jsapi"),
15-
NATIVE("/v3/combine-transactions/native","/v3/pay/partner/transactions/native"),
16-
MWEB("/v3/combine-transactions/h5","/v3/pay/partner/transactions/h5")
17-
;
12+
/**
13+
* APP
14+
*/
15+
APP("/v3/combine-transactions/app", "/v3/pay/partner/transactions/app"),
16+
/**
17+
* JSAPI
18+
*/
19+
JSAPI("/v3/combine-transactions/jsapi", "/v3/pay/partner/transactions/jsapi"),
20+
/**
21+
* NATIVE
22+
*/
23+
NATIVE("/v3/combine-transactions/native", "/v3/pay/partner/transactions/native"),
24+
/**
25+
* MWEB
26+
*/
27+
MWEB("/v3/combine-transactions/h5", "/v3/pay/partner/transactions/h5");
1828

1929
/**
2030
* 合单url

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.