mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-19 18:45:03 +08:00
汇付基础响应
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.jsowell.adapay.response;
|
||||
|
||||
import com.jsowell.common.enums.adapay.AdapayStatusEnum;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import lombok.*;
|
||||
|
||||
/**
|
||||
@@ -20,4 +22,12 @@ public class AdapayBaseResponse {
|
||||
private String error_code;
|
||||
private String error_msg;
|
||||
private String error_type;
|
||||
|
||||
public boolean isSuccess() {
|
||||
return StringUtils.equals(status, AdapayStatusEnum.SUCCEEDED.getValue());
|
||||
}
|
||||
|
||||
public boolean isNotSuccess() {
|
||||
return !isSuccess();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -663,7 +663,7 @@ public class AdapayService {
|
||||
|
||||
if (response != null) {
|
||||
QueryDrawCashResponse queryDrawCashResponse = JSON.parseObject(JSON.toJSONString(response), QueryDrawCashResponse.class);
|
||||
if (queryDrawCashResponse == null || !StringUtils.equals(queryDrawCashResponse.getStatus(), "succeeded")) {
|
||||
if (queryDrawCashResponse == null || queryDrawCashResponse.isNotSuccess()) {
|
||||
return null;
|
||||
}
|
||||
QueryDrawCashResponse.Cash cash = queryDrawCashResponse.getCashList().get(0);
|
||||
|
||||
Reference in New Issue
Block a user