Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 【微信支付】签约通知结果字段类型更改 #2538

Merged
merged 1 commit into from
Feb 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,15 @@ protected static Integer readXmlInteger(Document d, String tagName) {
return Integer.parseInt(content);
}

protected static Long readXmlLong(Document d, String tagName) {
String content = readXmlString(d, tagName);
if (content == null || content.trim().length() == 0) {
return null;
}

return Long.parseLong(content);
}

/**
* Gets logger.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public class WxPayEntrustResult extends BaseWxPayResult implements Serializable
* 非必传
*/
@XStreamAlias("request_serial")
private Integer requestSerial;
private Long requestSerial;

/**
* 签约协议号
Expand Down Expand Up @@ -120,7 +120,7 @@ protected void loadXml(Document d) {
tradeType = readXmlString(d, "trade_type");
codeUrl = readXmlString(d, "code_url");
planId = readXmlInteger(d, "plan_id");
requestSerial = readXmlInteger(d, "request_serial");
requestSerial = readXmlLong(d, "request_serial");
contractCode = readXmlString(d, "contract_code");
contractDisplayAccount = readXmlString(d, "contract_display_account");
mwebUrl = readXmlString(d, "mweb_url");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class WxSignQueryResult extends BaseWxPayResult implements Serializable {
* 请求序列号
*/
@XStreamAlias("request_serial")
private Integer requestSerial;
private Long requestSerial;

/**
* 签约协议号
Expand Down Expand Up @@ -106,7 +106,7 @@ public class WxSignQueryResult extends BaseWxPayResult implements Serializable {
protected void loadXml(Document d) {
contractId = readXmlString(d, "contract_id");
planId = readXmlString(d, "plan_id");
requestSerial = readXmlInteger(d, "request_serial");
requestSerial = readXmlLong(d, "request_serial");
contractCode = readXmlString(d, "contract_code");
contractDisplayAccount = readXmlString(d, "contract_display_account");
contractState = readXmlInteger(d, "contract_state");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public class WxSignStatusNotifyResult extends BaseWxPayResult {
* 请求序列号
*/
@XStreamAlias("request_serial")
private Integer requestSerial;
private Long requestSerial;

@Override
public void checkResult(WxPayService wxPayService, String signType, boolean checkSuccess) throws WxPayException {
Expand Down Expand Up @@ -117,7 +117,7 @@ protected void loadXml(Document d) {
contractId = readXmlString(d, "contract_id");
contractExpiredTime = readXmlString(d, "contract_expired_time");
contractTerminationMode = readXmlInteger(d, "contract_termination_mode");
requestSerial = readXmlInteger(d, "request_serial");
requestSerial = readXmlLong(d, "request_serial");
}

@Override
Expand Down