增加账户相关接口
diff --git a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/AccountPayRequest.java b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/AccountPayRequest.java
new file mode 100644
index 0000000..f4e2a76
--- /dev/null
+++ b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/AccountPayRequest.java
@@ -0,0 +1,287 @@
+package com.supwisdom.dlpay.payapi.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.openapitools.jackson.nullable.JsonNullable;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * AccountPayRequest
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:32:36.835+08:00[Asia/Shanghai]")
+
+public class AccountPayRequest {
+ @JsonProperty("billno")
+ private String billno;
+
+ @JsonProperty("shopaccno")
+ private String shopaccno;
+
+ @JsonProperty("transDate")
+ private String transDate;
+
+ @JsonProperty("transTime")
+ private String transTime;
+
+ @JsonProperty("userid")
+ private String userid;
+
+ @JsonProperty("amount")
+ private Integer amount;
+
+ @JsonProperty("accountName")
+ private String accountName;
+
+ @JsonProperty("description")
+ private String description;
+
+ @JsonProperty("dtltype")
+ private String dtltype = "pos";
+
+ public AccountPayRequest billno(String billno) {
+ this.billno = billno;
+ return this;
+ }
+
+ /**
+ * Get billno
+ * @return billno
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+@Pattern(regexp="[0-9]*") @Size(min=16)
+ public String getBillno() {
+ return billno;
+ }
+
+ public void setBillno(String billno) {
+ this.billno = billno;
+ }
+
+ public AccountPayRequest shopaccno(String shopaccno) {
+ this.shopaccno = shopaccno;
+ return this;
+ }
+
+ /**
+ * Get shopaccno
+ * @return shopaccno
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+@Pattern(regexp="[0-9]*")
+ public String getShopaccno() {
+ return shopaccno;
+ }
+
+ public void setShopaccno(String shopaccno) {
+ this.shopaccno = shopaccno;
+ }
+
+ public AccountPayRequest transDate(String transDate) {
+ this.transDate = transDate;
+ return this;
+ }
+
+ /**
+ * Get transDate
+ * @return transDate
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+@Pattern(regexp="[0-9]*") @Size(min=8,max=8)
+ public String getTransDate() {
+ return transDate;
+ }
+
+ public void setTransDate(String transDate) {
+ this.transDate = transDate;
+ }
+
+ public AccountPayRequest transTime(String transTime) {
+ this.transTime = transTime;
+ return this;
+ }
+
+ /**
+ * Get transTime
+ * @return transTime
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+@Pattern(regexp="[0-9]*") @Size(min=6,max=6)
+ public String getTransTime() {
+ return transTime;
+ }
+
+ public void setTransTime(String transTime) {
+ this.transTime = transTime;
+ }
+
+ public AccountPayRequest userid(String userid) {
+ this.userid = userid;
+ return this;
+ }
+
+ /**
+ * Get userid
+ * @return userid
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+
+ public String getUserid() {
+ return userid;
+ }
+
+ public void setUserid(String userid) {
+ this.userid = userid;
+ }
+
+ public AccountPayRequest amount(Integer amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * Get amount
+ * @return amount
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+
+ public Integer getAmount() {
+ return amount;
+ }
+
+ public void setAmount(Integer amount) {
+ this.amount = amount;
+ }
+
+ public AccountPayRequest accountName(String accountName) {
+ this.accountName = accountName;
+ return this;
+ }
+
+ /**
+ * Get accountName
+ * @return accountName
+ */
+ @ApiModelProperty(value = "")
+
+
+ public String getAccountName() {
+ return accountName;
+ }
+
+ public void setAccountName(String accountName) {
+ this.accountName = accountName;
+ }
+
+ public AccountPayRequest description(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get description
+ * @return description
+ */
+ @ApiModelProperty(value = "")
+
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public AccountPayRequest dtltype(String dtltype) {
+ this.dtltype = dtltype;
+ return this;
+ }
+
+ /**
+ * Get dtltype
+ * @return dtltype
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+
+ public String getDtltype() {
+ return dtltype;
+ }
+
+ public void setDtltype(String dtltype) {
+ this.dtltype = dtltype;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountPayRequest accountPayRequest = (AccountPayRequest) o;
+ return Objects.equals(this.billno, accountPayRequest.billno) &&
+ Objects.equals(this.shopaccno, accountPayRequest.shopaccno) &&
+ Objects.equals(this.transDate, accountPayRequest.transDate) &&
+ Objects.equals(this.transTime, accountPayRequest.transTime) &&
+ Objects.equals(this.userid, accountPayRequest.userid) &&
+ Objects.equals(this.amount, accountPayRequest.amount) &&
+ Objects.equals(this.accountName, accountPayRequest.accountName) &&
+ Objects.equals(this.description, accountPayRequest.description) &&
+ Objects.equals(this.dtltype, accountPayRequest.dtltype);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(billno, shopaccno, transDate, transTime, userid, amount, accountName, description, dtltype);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AccountPayRequest {\n");
+
+ sb.append(" billno: ").append(toIndentedString(billno)).append("\n");
+ sb.append(" shopaccno: ").append(toIndentedString(shopaccno)).append("\n");
+ sb.append(" transDate: ").append(toIndentedString(transDate)).append("\n");
+ sb.append(" transTime: ").append(toIndentedString(transTime)).append("\n");
+ sb.append(" userid: ").append(toIndentedString(userid)).append("\n");
+ sb.append(" amount: ").append(toIndentedString(amount)).append("\n");
+ sb.append(" accountName: ").append(toIndentedString(accountName)).append("\n");
+ sb.append(" description: ").append(toIndentedString(description)).append("\n");
+ sb.append(" dtltype: ").append(toIndentedString(dtltype)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/AccountPayResponse.java b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/AccountPayResponse.java
new file mode 100644
index 0000000..13f02bc
--- /dev/null
+++ b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/AccountPayResponse.java
@@ -0,0 +1,156 @@
+package com.supwisdom.dlpay.payapi.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.openapitools.jackson.nullable.JsonNullable;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * AccountPayResponse
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:32:36.835+08:00[Asia/Shanghai]")
+
+public class AccountPayResponse {
+ @JsonProperty("refno")
+ private String refno;
+
+ @JsonProperty("description")
+ private String description;
+
+ @JsonProperty("aftbal")
+ private Integer aftbal;
+
+ @JsonProperty("realAmount")
+ private Integer realAmount;
+
+ public AccountPayResponse refno(String refno) {
+ this.refno = refno;
+ return this;
+ }
+
+ /**
+ * Get refno
+ * @return refno
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+@Pattern(regexp="[0-9]*") @Size(min=16)
+ public String getRefno() {
+ return refno;
+ }
+
+ public void setRefno(String refno) {
+ this.refno = refno;
+ }
+
+ public AccountPayResponse description(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get description
+ * @return description
+ */
+ @ApiModelProperty(value = "")
+
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public AccountPayResponse aftbal(Integer aftbal) {
+ this.aftbal = aftbal;
+ return this;
+ }
+
+ /**
+ * Get aftbal
+ * @return aftbal
+ */
+ @ApiModelProperty(value = "")
+
+
+ public Integer getAftbal() {
+ return aftbal;
+ }
+
+ public void setAftbal(Integer aftbal) {
+ this.aftbal = aftbal;
+ }
+
+ public AccountPayResponse realAmount(Integer realAmount) {
+ this.realAmount = realAmount;
+ return this;
+ }
+
+ /**
+ * Get realAmount
+ * @return realAmount
+ */
+ @ApiModelProperty(value = "")
+
+
+ public Integer getRealAmount() {
+ return realAmount;
+ }
+
+ public void setRealAmount(Integer realAmount) {
+ this.realAmount = realAmount;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountPayResponse accountPayResponse = (AccountPayResponse) o;
+ return Objects.equals(this.refno, accountPayResponse.refno) &&
+ Objects.equals(this.description, accountPayResponse.description) &&
+ Objects.equals(this.aftbal, accountPayResponse.aftbal) &&
+ Objects.equals(this.realAmount, accountPayResponse.realAmount);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(refno, description, aftbal, realAmount);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AccountPayResponse {\n");
+
+ sb.append(" refno: ").append(toIndentedString(refno)).append("\n");
+ sb.append(" description: ").append(toIndentedString(description)).append("\n");
+ sb.append(" aftbal: ").append(toIndentedString(aftbal)).append("\n");
+ sb.append(" realAmount: ").append(toIndentedString(realAmount)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/AccountQueryRequest.java b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/AccountQueryRequest.java
new file mode 100644
index 0000000..d431131
--- /dev/null
+++ b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/AccountQueryRequest.java
@@ -0,0 +1,117 @@
+package com.supwisdom.dlpay.payapi.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
+import org.openapitools.jackson.nullable.JsonNullable;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * AccountQueryRequest
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:32:36.835+08:00[Asia/Shanghai]")
+
+public class AccountQueryRequest {
+ @JsonProperty("userid")
+ private String userid;
+
+ @JsonProperty("subaccounts")
+ @Valid
+ private List<String> subaccounts = null;
+
+ public AccountQueryRequest userid(String userid) {
+ this.userid = userid;
+ return this;
+ }
+
+ /**
+ * Get userid
+ * @return userid
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+
+ public String getUserid() {
+ return userid;
+ }
+
+ public void setUserid(String userid) {
+ this.userid = userid;
+ }
+
+ public AccountQueryRequest subaccounts(List<String> subaccounts) {
+ this.subaccounts = subaccounts;
+ return this;
+ }
+
+ public AccountQueryRequest addSubaccountsItem(String subaccountsItem) {
+ if (this.subaccounts == null) {
+ this.subaccounts = new ArrayList<>();
+ }
+ this.subaccounts.add(subaccountsItem);
+ return this;
+ }
+
+ /**
+ * Get subaccounts
+ * @return subaccounts
+ */
+ @ApiModelProperty(value = "")
+
+
+ public List<String> getSubaccounts() {
+ return subaccounts;
+ }
+
+ public void setSubaccounts(List<String> subaccounts) {
+ this.subaccounts = subaccounts;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountQueryRequest accountQueryRequest = (AccountQueryRequest) o;
+ return Objects.equals(this.userid, accountQueryRequest.userid) &&
+ Objects.equals(this.subaccounts, accountQueryRequest.subaccounts);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(userid, subaccounts);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AccountQueryRequest {\n");
+
+ sb.append(" userid: ").append(toIndentedString(userid)).append("\n");
+ sb.append(" subaccounts: ").append(toIndentedString(subaccounts)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/AccountQueryResponse.java b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/AccountQueryResponse.java
new file mode 100644
index 0000000..e1ed7ef
--- /dev/null
+++ b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/AccountQueryResponse.java
@@ -0,0 +1,220 @@
+package com.supwisdom.dlpay.payapi.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.supwisdom.dlpay.payapi.model.SubAccountBalance;
+import com.supwisdom.dlpay.payapi.model.UserStatus;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
+import org.openapitools.jackson.nullable.JsonNullable;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * AccountQueryResponse
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:32:36.835+08:00[Asia/Shanghai]")
+
+public class AccountQueryResponse {
+ @JsonProperty("userid")
+ private String userid;
+
+ @JsonProperty("username")
+ private String username;
+
+ @JsonProperty("status")
+ private UserStatus status;
+
+ @JsonProperty("balance")
+ private Integer balance;
+
+ @JsonProperty("frozenbal")
+ private Integer frozenbal;
+
+ @JsonProperty("subaccountList")
+ @Valid
+ private List<SubAccountBalance> subaccountList = null;
+
+ public AccountQueryResponse userid(String userid) {
+ this.userid = userid;
+ return this;
+ }
+
+ /**
+ * Get userid
+ * @return userid
+ */
+ @ApiModelProperty(value = "")
+
+
+ public String getUserid() {
+ return userid;
+ }
+
+ public void setUserid(String userid) {
+ this.userid = userid;
+ }
+
+ public AccountQueryResponse username(String username) {
+ this.username = username;
+ return this;
+ }
+
+ /**
+ * Get username
+ * @return username
+ */
+ @ApiModelProperty(value = "")
+
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public AccountQueryResponse status(UserStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ * @return status
+ */
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public UserStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(UserStatus status) {
+ this.status = status;
+ }
+
+ public AccountQueryResponse balance(Integer balance) {
+ this.balance = balance;
+ return this;
+ }
+
+ /**
+ * Get balance
+ * @return balance
+ */
+ @ApiModelProperty(value = "")
+
+
+ public Integer getBalance() {
+ return balance;
+ }
+
+ public void setBalance(Integer balance) {
+ this.balance = balance;
+ }
+
+ public AccountQueryResponse frozenbal(Integer frozenbal) {
+ this.frozenbal = frozenbal;
+ return this;
+ }
+
+ /**
+ * Get frozenbal
+ * @return frozenbal
+ */
+ @ApiModelProperty(value = "")
+
+
+ public Integer getFrozenbal() {
+ return frozenbal;
+ }
+
+ public void setFrozenbal(Integer frozenbal) {
+ this.frozenbal = frozenbal;
+ }
+
+ public AccountQueryResponse subaccountList(List<SubAccountBalance> subaccountList) {
+ this.subaccountList = subaccountList;
+ return this;
+ }
+
+ public AccountQueryResponse addSubaccountListItem(SubAccountBalance subaccountListItem) {
+ if (this.subaccountList == null) {
+ this.subaccountList = new ArrayList<>();
+ }
+ this.subaccountList.add(subaccountListItem);
+ return this;
+ }
+
+ /**
+ * Get subaccountList
+ * @return subaccountList
+ */
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public List<SubAccountBalance> getSubaccountList() {
+ return subaccountList;
+ }
+
+ public void setSubaccountList(List<SubAccountBalance> subaccountList) {
+ this.subaccountList = subaccountList;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AccountQueryResponse accountQueryResponse = (AccountQueryResponse) o;
+ return Objects.equals(this.userid, accountQueryResponse.userid) &&
+ Objects.equals(this.username, accountQueryResponse.username) &&
+ Objects.equals(this.status, accountQueryResponse.status) &&
+ Objects.equals(this.balance, accountQueryResponse.balance) &&
+ Objects.equals(this.frozenbal, accountQueryResponse.frozenbal) &&
+ Objects.equals(this.subaccountList, accountQueryResponse.subaccountList);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(userid, username, status, balance, frozenbal, subaccountList);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AccountQueryResponse {\n");
+
+ sb.append(" userid: ").append(toIndentedString(userid)).append("\n");
+ sb.append(" username: ").append(toIndentedString(username)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" balance: ").append(toIndentedString(balance)).append("\n");
+ sb.append(" frozenbal: ").append(toIndentedString(frozenbal)).append("\n");
+ sb.append(" subaccountList: ").append(toIndentedString(subaccountList)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/ErrorResponse.java b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/ErrorResponse.java
index f9cb7a7..0e42471 100644
--- a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/ErrorResponse.java
+++ b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/ErrorResponse.java
@@ -5,6 +5,7 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
+import java.time.OffsetDateTime;
import org.openapitools.jackson.nullable.JsonNullable;
import javax.validation.Valid;
import javax.validation.constraints.*;
@@ -12,15 +13,39 @@
/**
* ErrorResponse
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-17T08:49:02.541+08:00[Asia/Shanghai]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:32:36.835+08:00[Asia/Shanghai]")
public class ErrorResponse {
+ @JsonProperty("timestamp")
+ private OffsetDateTime timestamp;
+
@JsonProperty("code")
private String code;
@JsonProperty("message")
private String message;
+ public ErrorResponse timestamp(OffsetDateTime timestamp) {
+ this.timestamp = timestamp;
+ return this;
+ }
+
+ /**
+ * Get timestamp
+ * @return timestamp
+ */
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public OffsetDateTime getTimestamp() {
+ return timestamp;
+ }
+
+ public void setTimestamp(OffsetDateTime timestamp) {
+ this.timestamp = timestamp;
+ }
+
public ErrorResponse code(String code) {
this.code = code;
return this;
@@ -72,13 +97,14 @@
return false;
}
ErrorResponse errorResponse = (ErrorResponse) o;
- return Objects.equals(this.code, errorResponse.code) &&
+ return Objects.equals(this.timestamp, errorResponse.timestamp) &&
+ Objects.equals(this.code, errorResponse.code) &&
Objects.equals(this.message, errorResponse.message);
}
@Override
public int hashCode() {
- return Objects.hash(code, message);
+ return Objects.hash(timestamp, code, message);
}
@Override
@@ -86,6 +112,7 @@
StringBuilder sb = new StringBuilder();
sb.append("class ErrorResponse {\n");
+ sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append("}");
diff --git a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/PreAuthorizedDebitRequest.java b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/PreAuthorizedDebitRequest.java
new file mode 100644
index 0000000..37a4c6f
--- /dev/null
+++ b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/PreAuthorizedDebitRequest.java
@@ -0,0 +1,235 @@
+package com.supwisdom.dlpay.payapi.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.openapitools.jackson.nullable.JsonNullable;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * PreAuthorizedDebitRequest
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:32:36.835+08:00[Asia/Shanghai]")
+
+public class PreAuthorizedDebitRequest {
+ @JsonProperty("billno")
+ private String billno;
+
+ @JsonProperty("userid")
+ private String userid;
+
+ @JsonProperty("accountName")
+ private String accountName;
+
+ @JsonProperty("preAuthorizedAmount")
+ private Integer preAuthorizedAmount;
+
+ @JsonProperty("shopaccno")
+ private String shopaccno;
+
+ @JsonProperty("transDate")
+ private String transDate;
+
+ @JsonProperty("transTime")
+ private String transTime;
+
+ public PreAuthorizedDebitRequest billno(String billno) {
+ this.billno = billno;
+ return this;
+ }
+
+ /**
+ * Get billno
+ * @return billno
+ */
+ @ApiModelProperty(value = "")
+
+@Pattern(regexp="[0-9]*") @Size(min=16)
+ public String getBillno() {
+ return billno;
+ }
+
+ public void setBillno(String billno) {
+ this.billno = billno;
+ }
+
+ public PreAuthorizedDebitRequest userid(String userid) {
+ this.userid = userid;
+ return this;
+ }
+
+ /**
+ * Get userid
+ * @return userid
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+
+ public String getUserid() {
+ return userid;
+ }
+
+ public void setUserid(String userid) {
+ this.userid = userid;
+ }
+
+ public PreAuthorizedDebitRequest accountName(String accountName) {
+ this.accountName = accountName;
+ return this;
+ }
+
+ /**
+ * Get accountName
+ * @return accountName
+ */
+ @ApiModelProperty(value = "")
+
+
+ public String getAccountName() {
+ return accountName;
+ }
+
+ public void setAccountName(String accountName) {
+ this.accountName = accountName;
+ }
+
+ public PreAuthorizedDebitRequest preAuthorizedAmount(Integer preAuthorizedAmount) {
+ this.preAuthorizedAmount = preAuthorizedAmount;
+ return this;
+ }
+
+ /**
+ * Get preAuthorizedAmount
+ * @return preAuthorizedAmount
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+
+ public Integer getPreAuthorizedAmount() {
+ return preAuthorizedAmount;
+ }
+
+ public void setPreAuthorizedAmount(Integer preAuthorizedAmount) {
+ this.preAuthorizedAmount = preAuthorizedAmount;
+ }
+
+ public PreAuthorizedDebitRequest shopaccno(String shopaccno) {
+ this.shopaccno = shopaccno;
+ return this;
+ }
+
+ /**
+ * Get shopaccno
+ * @return shopaccno
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+@Pattern(regexp="[0-9]*")
+ public String getShopaccno() {
+ return shopaccno;
+ }
+
+ public void setShopaccno(String shopaccno) {
+ this.shopaccno = shopaccno;
+ }
+
+ public PreAuthorizedDebitRequest transDate(String transDate) {
+ this.transDate = transDate;
+ return this;
+ }
+
+ /**
+ * Get transDate
+ * @return transDate
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+@Pattern(regexp="[0-9]*") @Size(min=8,max=8)
+ public String getTransDate() {
+ return transDate;
+ }
+
+ public void setTransDate(String transDate) {
+ this.transDate = transDate;
+ }
+
+ public PreAuthorizedDebitRequest transTime(String transTime) {
+ this.transTime = transTime;
+ return this;
+ }
+
+ /**
+ * Get transTime
+ * @return transTime
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+@Pattern(regexp="[0-9]*") @Size(min=6,max=6)
+ public String getTransTime() {
+ return transTime;
+ }
+
+ public void setTransTime(String transTime) {
+ this.transTime = transTime;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ PreAuthorizedDebitRequest preAuthorizedDebitRequest = (PreAuthorizedDebitRequest) o;
+ return Objects.equals(this.billno, preAuthorizedDebitRequest.billno) &&
+ Objects.equals(this.userid, preAuthorizedDebitRequest.userid) &&
+ Objects.equals(this.accountName, preAuthorizedDebitRequest.accountName) &&
+ Objects.equals(this.preAuthorizedAmount, preAuthorizedDebitRequest.preAuthorizedAmount) &&
+ Objects.equals(this.shopaccno, preAuthorizedDebitRequest.shopaccno) &&
+ Objects.equals(this.transDate, preAuthorizedDebitRequest.transDate) &&
+ Objects.equals(this.transTime, preAuthorizedDebitRequest.transTime);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(billno, userid, accountName, preAuthorizedAmount, shopaccno, transDate, transTime);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class PreAuthorizedDebitRequest {\n");
+
+ sb.append(" billno: ").append(toIndentedString(billno)).append("\n");
+ sb.append(" userid: ").append(toIndentedString(userid)).append("\n");
+ sb.append(" accountName: ").append(toIndentedString(accountName)).append("\n");
+ sb.append(" preAuthorizedAmount: ").append(toIndentedString(preAuthorizedAmount)).append("\n");
+ sb.append(" shopaccno: ").append(toIndentedString(shopaccno)).append("\n");
+ sb.append(" transDate: ").append(toIndentedString(transDate)).append("\n");
+ sb.append(" transTime: ").append(toIndentedString(transTime)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/PreAuthorizedDebitResponse.java b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/PreAuthorizedDebitResponse.java
new file mode 100644
index 0000000..6ee29b4
--- /dev/null
+++ b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/PreAuthorizedDebitResponse.java
@@ -0,0 +1,132 @@
+package com.supwisdom.dlpay.payapi.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.supwisdom.dlpay.payapi.model.TransResult;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.openapitools.jackson.nullable.JsonNullable;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * PreAuthorizedDebitResponse
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:32:36.835+08:00[Asia/Shanghai]")
+
+public class PreAuthorizedDebitResponse {
+ @JsonProperty("refno")
+ private String refno;
+
+ @JsonProperty("result")
+ private TransResult result;
+
+ @JsonProperty("message")
+ private String message;
+
+ public PreAuthorizedDebitResponse refno(String refno) {
+ this.refno = refno;
+ return this;
+ }
+
+ /**
+ * Get refno
+ * @return refno
+ */
+ @ApiModelProperty(value = "")
+
+@Pattern(regexp="[0-9]*") @Size(min=16)
+ public String getRefno() {
+ return refno;
+ }
+
+ public void setRefno(String refno) {
+ this.refno = refno;
+ }
+
+ public PreAuthorizedDebitResponse result(TransResult result) {
+ this.result = result;
+ return this;
+ }
+
+ /**
+ * Get result
+ * @return result
+ */
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public TransResult getResult() {
+ return result;
+ }
+
+ public void setResult(TransResult result) {
+ this.result = result;
+ }
+
+ public PreAuthorizedDebitResponse message(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Get message
+ * @return message
+ */
+ @ApiModelProperty(value = "")
+
+
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ PreAuthorizedDebitResponse preAuthorizedDebitResponse = (PreAuthorizedDebitResponse) o;
+ return Objects.equals(this.refno, preAuthorizedDebitResponse.refno) &&
+ Objects.equals(this.result, preAuthorizedDebitResponse.result) &&
+ Objects.equals(this.message, preAuthorizedDebitResponse.message);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(refno, result, message);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class PreAuthorizedDebitResponse {\n");
+
+ sb.append(" refno: ").append(toIndentedString(refno)).append("\n");
+ sb.append(" result: ").append(toIndentedString(result)).append("\n");
+ sb.append(" message: ").append(toIndentedString(message)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/PreAuthorizedSettleRequest.java b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/PreAuthorizedSettleRequest.java
new file mode 100644
index 0000000..273c107
--- /dev/null
+++ b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/PreAuthorizedSettleRequest.java
@@ -0,0 +1,184 @@
+package com.supwisdom.dlpay.payapi.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.openapitools.jackson.nullable.JsonNullable;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * PreAuthorizedSettleRequest
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:32:36.835+08:00[Asia/Shanghai]")
+
+public class PreAuthorizedSettleRequest {
+ @JsonProperty("refno")
+ private String refno;
+
+ @JsonProperty("billno")
+ private String billno;
+
+ @JsonProperty("transDate")
+ private String transDate;
+
+ @JsonProperty("transTime")
+ private String transTime;
+
+ @JsonProperty("amount")
+ private Integer amount;
+
+ public PreAuthorizedSettleRequest refno(String refno) {
+ this.refno = refno;
+ return this;
+ }
+
+ /**
+ * Get refno
+ * @return refno
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+@Pattern(regexp="[0-9]*") @Size(min=16)
+ public String getRefno() {
+ return refno;
+ }
+
+ public void setRefno(String refno) {
+ this.refno = refno;
+ }
+
+ public PreAuthorizedSettleRequest billno(String billno) {
+ this.billno = billno;
+ return this;
+ }
+
+ /**
+ * Get billno
+ * @return billno
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+@Pattern(regexp="[0-9]*") @Size(min=16)
+ public String getBillno() {
+ return billno;
+ }
+
+ public void setBillno(String billno) {
+ this.billno = billno;
+ }
+
+ public PreAuthorizedSettleRequest transDate(String transDate) {
+ this.transDate = transDate;
+ return this;
+ }
+
+ /**
+ * Get transDate
+ * @return transDate
+ */
+ @ApiModelProperty(value = "")
+
+@Pattern(regexp="[0-9]*") @Size(min=8,max=8)
+ public String getTransDate() {
+ return transDate;
+ }
+
+ public void setTransDate(String transDate) {
+ this.transDate = transDate;
+ }
+
+ public PreAuthorizedSettleRequest transTime(String transTime) {
+ this.transTime = transTime;
+ return this;
+ }
+
+ /**
+ * Get transTime
+ * @return transTime
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+@Pattern(regexp="[0-9]*") @Size(min=6,max=6)
+ public String getTransTime() {
+ return transTime;
+ }
+
+ public void setTransTime(String transTime) {
+ this.transTime = transTime;
+ }
+
+ public PreAuthorizedSettleRequest amount(Integer amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * Get amount
+ * @return amount
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+
+ public Integer getAmount() {
+ return amount;
+ }
+
+ public void setAmount(Integer amount) {
+ this.amount = amount;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ PreAuthorizedSettleRequest preAuthorizedSettleRequest = (PreAuthorizedSettleRequest) o;
+ return Objects.equals(this.refno, preAuthorizedSettleRequest.refno) &&
+ Objects.equals(this.billno, preAuthorizedSettleRequest.billno) &&
+ Objects.equals(this.transDate, preAuthorizedSettleRequest.transDate) &&
+ Objects.equals(this.transTime, preAuthorizedSettleRequest.transTime) &&
+ Objects.equals(this.amount, preAuthorizedSettleRequest.amount);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(refno, billno, transDate, transTime, amount);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class PreAuthorizedSettleRequest {\n");
+
+ sb.append(" refno: ").append(toIndentedString(refno)).append("\n");
+ sb.append(" billno: ").append(toIndentedString(billno)).append("\n");
+ sb.append(" transDate: ").append(toIndentedString(transDate)).append("\n");
+ sb.append(" transTime: ").append(toIndentedString(transTime)).append("\n");
+ sb.append(" amount: ").append(toIndentedString(amount)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/PreAuthorizedSettleResponse.java b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/PreAuthorizedSettleResponse.java
new file mode 100644
index 0000000..67fd4ec
--- /dev/null
+++ b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/PreAuthorizedSettleResponse.java
@@ -0,0 +1,105 @@
+package com.supwisdom.dlpay.payapi.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.openapitools.jackson.nullable.JsonNullable;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * PreAuthorizedSettleResponse
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:32:36.835+08:00[Asia/Shanghai]")
+
+public class PreAuthorizedSettleResponse {
+ @JsonProperty("refno")
+ private String refno;
+
+ @JsonProperty("leftPreAuthorizedAmount")
+ private Integer leftPreAuthorizedAmount;
+
+ public PreAuthorizedSettleResponse refno(String refno) {
+ this.refno = refno;
+ return this;
+ }
+
+ /**
+ * Get refno
+ * @return refno
+ */
+ @ApiModelProperty(value = "")
+
+@Pattern(regexp="[0-9]*") @Size(min=16)
+ public String getRefno() {
+ return refno;
+ }
+
+ public void setRefno(String refno) {
+ this.refno = refno;
+ }
+
+ public PreAuthorizedSettleResponse leftPreAuthorizedAmount(Integer leftPreAuthorizedAmount) {
+ this.leftPreAuthorizedAmount = leftPreAuthorizedAmount;
+ return this;
+ }
+
+ /**
+ * Get leftPreAuthorizedAmount
+ * @return leftPreAuthorizedAmount
+ */
+ @ApiModelProperty(value = "")
+
+
+ public Integer getLeftPreAuthorizedAmount() {
+ return leftPreAuthorizedAmount;
+ }
+
+ public void setLeftPreAuthorizedAmount(Integer leftPreAuthorizedAmount) {
+ this.leftPreAuthorizedAmount = leftPreAuthorizedAmount;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ PreAuthorizedSettleResponse preAuthorizedSettleResponse = (PreAuthorizedSettleResponse) o;
+ return Objects.equals(this.refno, preAuthorizedSettleResponse.refno) &&
+ Objects.equals(this.leftPreAuthorizedAmount, preAuthorizedSettleResponse.leftPreAuthorizedAmount);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(refno, leftPreAuthorizedAmount);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class PreAuthorizedSettleResponse {\n");
+
+ sb.append(" refno: ").append(toIndentedString(refno)).append("\n");
+ sb.append(" leftPreAuthorizedAmount: ").append(toIndentedString(leftPreAuthorizedAmount)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/QrcodePayConfirmRequest.java b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/QrcodePayConfirmRequest.java
index e7064c7..7cae5de 100644
--- a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/QrcodePayConfirmRequest.java
+++ b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/QrcodePayConfirmRequest.java
@@ -13,7 +13,7 @@
/**
* QrcodePayConfirmRequest
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-17T08:49:02.541+08:00[Asia/Shanghai]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:32:36.835+08:00[Asia/Shanghai]")
public class QrcodePayConfirmRequest {
@JsonProperty("billno")
diff --git a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/QrcodePayConfirmResponse.java b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/QrcodePayConfirmResponse.java
index e6944c4..16f744d 100644
--- a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/QrcodePayConfirmResponse.java
+++ b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/QrcodePayConfirmResponse.java
@@ -13,7 +13,7 @@
/**
* QrcodePayConfirmResponse
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-17T08:49:02.541+08:00[Asia/Shanghai]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:32:36.835+08:00[Asia/Shanghai]")
public class QrcodePayConfirmResponse {
@JsonProperty("refno")
diff --git a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/QrcodePayInitRequest.java b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/QrcodePayInitRequest.java
index c570f7e..5ce852e 100644
--- a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/QrcodePayInitRequest.java
+++ b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/QrcodePayInitRequest.java
@@ -13,7 +13,7 @@
/**
* QrcodePayInitRequest
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-17T08:49:02.541+08:00[Asia/Shanghai]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:32:36.835+08:00[Asia/Shanghai]")
public class QrcodePayInitRequest {
@JsonProperty("qrcode")
diff --git a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/QrcodePayInitResponse.java b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/QrcodePayInitResponse.java
index eec032d..d34b2ab 100644
--- a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/QrcodePayInitResponse.java
+++ b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/QrcodePayInitResponse.java
@@ -1,16 +1,20 @@
package com.supwisdom.dlpay.payapi.model;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import io.swagger.annotations.ApiModelProperty;
-
import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.openapitools.jackson.nullable.JsonNullable;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
/**
* QrcodePayInitResponse
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-17T08:49:02.541+08:00[Asia/Shanghai]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:32:36.835+08:00[Asia/Shanghai]")
-public class QrcodePayInitResponse {
+public class QrcodePayInitResponse {
@JsonProperty("anonymous")
private Boolean anonymous;
diff --git a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/RefundRequest.java b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/RefundRequest.java
index d149412..994ebbb 100644
--- a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/RefundRequest.java
+++ b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/RefundRequest.java
@@ -12,7 +12,7 @@
/**
* RefundRequest
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-17T08:49:02.541+08:00[Asia/Shanghai]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:32:36.835+08:00[Asia/Shanghai]")
public class RefundRequest {
@JsonProperty("billno")
diff --git a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/RefundResponse.java b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/RefundResponse.java
index 69eaaed..bb7892c 100644
--- a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/RefundResponse.java
+++ b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/RefundResponse.java
@@ -13,7 +13,7 @@
/**
* RefundResponse
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-17T08:49:02.541+08:00[Asia/Shanghai]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:32:36.835+08:00[Asia/Shanghai]")
public class RefundResponse {
@JsonProperty("billno")
diff --git a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/SubAccountBalance.java b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/SubAccountBalance.java
new file mode 100644
index 0000000..5894e47
--- /dev/null
+++ b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/SubAccountBalance.java
@@ -0,0 +1,186 @@
+package com.supwisdom.dlpay.payapi.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.supwisdom.dlpay.payapi.model.UserStatus;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.time.OffsetDateTime;
+import org.openapitools.jackson.nullable.JsonNullable;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * SubAccountBalance
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:32:36.835+08:00[Asia/Shanghai]")
+
+public class SubAccountBalance {
+ @JsonProperty("name")
+ private String name;
+
+ @JsonProperty("status")
+ private UserStatus status;
+
+ @JsonProperty("offline")
+ private Boolean offline;
+
+ @JsonProperty("balance")
+ private Integer balance;
+
+ @JsonProperty("expire")
+ private OffsetDateTime expire;
+
+ public SubAccountBalance name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get name
+ * @return name
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public SubAccountBalance status(UserStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ * @return status
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+ @Valid
+
+ public UserStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(UserStatus status) {
+ this.status = status;
+ }
+
+ public SubAccountBalance offline(Boolean offline) {
+ this.offline = offline;
+ return this;
+ }
+
+ /**
+ * Get offline
+ * @return offline
+ */
+ @ApiModelProperty(value = "")
+
+
+ public Boolean getOffline() {
+ return offline;
+ }
+
+ public void setOffline(Boolean offline) {
+ this.offline = offline;
+ }
+
+ public SubAccountBalance balance(Integer balance) {
+ this.balance = balance;
+ return this;
+ }
+
+ /**
+ * Get balance
+ * @return balance
+ */
+ @ApiModelProperty(value = "")
+
+
+ public Integer getBalance() {
+ return balance;
+ }
+
+ public void setBalance(Integer balance) {
+ this.balance = balance;
+ }
+
+ public SubAccountBalance expire(OffsetDateTime expire) {
+ this.expire = expire;
+ return this;
+ }
+
+ /**
+ * Get expire
+ * @return expire
+ */
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public OffsetDateTime getExpire() {
+ return expire;
+ }
+
+ public void setExpire(OffsetDateTime expire) {
+ this.expire = expire;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ SubAccountBalance subAccountBalance = (SubAccountBalance) o;
+ return Objects.equals(this.name, subAccountBalance.name) &&
+ Objects.equals(this.status, subAccountBalance.status) &&
+ Objects.equals(this.offline, subAccountBalance.offline) &&
+ Objects.equals(this.balance, subAccountBalance.balance) &&
+ Objects.equals(this.expire, subAccountBalance.expire);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, status, offline, balance, expire);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class SubAccountBalance {\n");
+
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" offline: ").append(toIndentedString(offline)).append("\n");
+ sb.append(" balance: ").append(toIndentedString(balance)).append("\n");
+ sb.append(" expire: ").append(toIndentedString(expire)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/SubAccountMetadata.java b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/SubAccountMetadata.java
new file mode 100644
index 0000000..b54d2c8
--- /dev/null
+++ b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/SubAccountMetadata.java
@@ -0,0 +1,155 @@
+package com.supwisdom.dlpay.payapi.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.openapitools.jackson.nullable.JsonNullable;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * SubAccountMetadata
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:32:36.835+08:00[Asia/Shanghai]")
+
+public class SubAccountMetadata {
+ @JsonProperty("name")
+ private String name;
+
+ @JsonProperty("title")
+ private String title;
+
+ @JsonProperty("description")
+ private String description;
+
+ @JsonProperty("offline")
+ private Boolean offline;
+
+ public SubAccountMetadata name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get name
+ * @return name
+ */
+ @ApiModelProperty(value = "")
+
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public SubAccountMetadata title(String title) {
+ this.title = title;
+ return this;
+ }
+
+ /**
+ * Get title
+ * @return title
+ */
+ @ApiModelProperty(value = "")
+
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public SubAccountMetadata description(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get description
+ * @return description
+ */
+ @ApiModelProperty(value = "")
+
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public SubAccountMetadata offline(Boolean offline) {
+ this.offline = offline;
+ return this;
+ }
+
+ /**
+ * Get offline
+ * @return offline
+ */
+ @ApiModelProperty(value = "")
+
+
+ public Boolean getOffline() {
+ return offline;
+ }
+
+ public void setOffline(Boolean offline) {
+ this.offline = offline;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ SubAccountMetadata subAccountMetadata = (SubAccountMetadata) o;
+ return Objects.equals(this.name, subAccountMetadata.name) &&
+ Objects.equals(this.title, subAccountMetadata.title) &&
+ Objects.equals(this.description, subAccountMetadata.description) &&
+ Objects.equals(this.offline, subAccountMetadata.offline);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, title, description, offline);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class SubAccountMetadata {\n");
+
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" title: ").append(toIndentedString(title)).append("\n");
+ sb.append(" description: ").append(toIndentedString(description)).append("\n");
+ sb.append(" offline: ").append(toIndentedString(offline)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/SubAccountPayRequest.java b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/SubAccountPayRequest.java
new file mode 100644
index 0000000..3e30ef4
--- /dev/null
+++ b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/SubAccountPayRequest.java
@@ -0,0 +1,298 @@
+package com.supwisdom.dlpay.payapi.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.supwisdom.dlpay.payapi.model.SubAccountPayRequestAccountList;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
+import org.openapitools.jackson.nullable.JsonNullable;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * 子账户消费接口
+ */
+@ApiModel(description = "子账户消费接口")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:32:36.835+08:00[Asia/Shanghai]")
+
+public class SubAccountPayRequest {
+ @JsonProperty("billno")
+ private String billno;
+
+ @JsonProperty("shopaccno")
+ private String shopaccno;
+
+ @JsonProperty("transDate")
+ private String transDate;
+
+ @JsonProperty("transTime")
+ private String transTime;
+
+ @JsonProperty("userid")
+ private String userid;
+
+ @JsonProperty("amount")
+ private Integer amount;
+
+ @JsonProperty("overdraft")
+ private Boolean overdraft;
+
+ @JsonProperty("useMainAccount")
+ private Boolean useMainAccount;
+
+ @JsonProperty("accountList")
+ @Valid
+ private List<SubAccountPayRequestAccountList> accountList = new ArrayList<>();
+
+ public SubAccountPayRequest billno(String billno) {
+ this.billno = billno;
+ return this;
+ }
+
+ /**
+ * Get billno
+ * @return billno
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+@Pattern(regexp="[0-9]*") @Size(min=16)
+ public String getBillno() {
+ return billno;
+ }
+
+ public void setBillno(String billno) {
+ this.billno = billno;
+ }
+
+ public SubAccountPayRequest shopaccno(String shopaccno) {
+ this.shopaccno = shopaccno;
+ return this;
+ }
+
+ /**
+ * Get shopaccno
+ * @return shopaccno
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+@Pattern(regexp="[0-9]*")
+ public String getShopaccno() {
+ return shopaccno;
+ }
+
+ public void setShopaccno(String shopaccno) {
+ this.shopaccno = shopaccno;
+ }
+
+ public SubAccountPayRequest transDate(String transDate) {
+ this.transDate = transDate;
+ return this;
+ }
+
+ /**
+ * Get transDate
+ * @return transDate
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+@Pattern(regexp="[0-9]*") @Size(min=8,max=8)
+ public String getTransDate() {
+ return transDate;
+ }
+
+ public void setTransDate(String transDate) {
+ this.transDate = transDate;
+ }
+
+ public SubAccountPayRequest transTime(String transTime) {
+ this.transTime = transTime;
+ return this;
+ }
+
+ /**
+ * Get transTime
+ * @return transTime
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+@Pattern(regexp="[0-9]*") @Size(min=6,max=6)
+ public String getTransTime() {
+ return transTime;
+ }
+
+ public void setTransTime(String transTime) {
+ this.transTime = transTime;
+ }
+
+ public SubAccountPayRequest userid(String userid) {
+ this.userid = userid;
+ return this;
+ }
+
+ /**
+ * Get userid
+ * @return userid
+ */
+ @ApiModelProperty(value = "")
+
+
+ public String getUserid() {
+ return userid;
+ }
+
+ public void setUserid(String userid) {
+ this.userid = userid;
+ }
+
+ public SubAccountPayRequest amount(Integer amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * Get amount
+ * @return amount
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+
+ public Integer getAmount() {
+ return amount;
+ }
+
+ public void setAmount(Integer amount) {
+ this.amount = amount;
+ }
+
+ public SubAccountPayRequest overdraft(Boolean overdraft) {
+ this.overdraft = overdraft;
+ return this;
+ }
+
+ /**
+ * Get overdraft
+ * @return overdraft
+ */
+ @ApiModelProperty(required = true, value = "")
+ @NotNull
+
+
+ public Boolean getOverdraft() {
+ return overdraft;
+ }
+
+ public void setOverdraft(Boolean overdraft) {
+ this.overdraft = overdraft;
+ }
+
+ public SubAccountPayRequest useMainAccount(Boolean useMainAccount) {
+ this.useMainAccount = useMainAccount;
+ return this;
+ }
+
+ /**
+ * Get useMainAccount
+ * @return useMainAccount
+ */
+ @ApiModelProperty(value = "")
+
+
+ public Boolean getUseMainAccount() {
+ return useMainAccount;
+ }
+
+ public void setUseMainAccount(Boolean useMainAccount) {
+ this.useMainAccount = useMainAccount;
+ }
+
+ public SubAccountPayRequest accountList(List<SubAccountPayRequestAccountList> accountList) {
+ this.accountList = accountList;
+ return this;
+ }
+
+ public SubAccountPayRequest addAccountListItem(SubAccountPayRequestAccountList accountListItem) {
+ this.accountList.add(accountListItem);
+ return this;
+ }
+
+ /**
+ * 按照账户列表顺序扣款
+ * @return accountList
+ */
+ @ApiModelProperty(required = true, value = "按照账户列表顺序扣款")
+ @NotNull
+
+ @Valid
+
+ public List<SubAccountPayRequestAccountList> getAccountList() {
+ return accountList;
+ }
+
+ public void setAccountList(List<SubAccountPayRequestAccountList> accountList) {
+ this.accountList = accountList;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ SubAccountPayRequest subAccountPayRequest = (SubAccountPayRequest) o;
+ return Objects.equals(this.billno, subAccountPayRequest.billno) &&
+ Objects.equals(this.shopaccno, subAccountPayRequest.shopaccno) &&
+ Objects.equals(this.transDate, subAccountPayRequest.transDate) &&
+ Objects.equals(this.transTime, subAccountPayRequest.transTime) &&
+ Objects.equals(this.userid, subAccountPayRequest.userid) &&
+ Objects.equals(this.amount, subAccountPayRequest.amount) &&
+ Objects.equals(this.overdraft, subAccountPayRequest.overdraft) &&
+ Objects.equals(this.useMainAccount, subAccountPayRequest.useMainAccount) &&
+ Objects.equals(this.accountList, subAccountPayRequest.accountList);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(billno, shopaccno, transDate, transTime, userid, amount, overdraft, useMainAccount, accountList);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class SubAccountPayRequest {\n");
+
+ sb.append(" billno: ").append(toIndentedString(billno)).append("\n");
+ sb.append(" shopaccno: ").append(toIndentedString(shopaccno)).append("\n");
+ sb.append(" transDate: ").append(toIndentedString(transDate)).append("\n");
+ sb.append(" transTime: ").append(toIndentedString(transTime)).append("\n");
+ sb.append(" userid: ").append(toIndentedString(userid)).append("\n");
+ sb.append(" amount: ").append(toIndentedString(amount)).append("\n");
+ sb.append(" overdraft: ").append(toIndentedString(overdraft)).append("\n");
+ sb.append(" useMainAccount: ").append(toIndentedString(useMainAccount)).append("\n");
+ sb.append(" accountList: ").append(toIndentedString(accountList)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/SubAccountPayRequestAccountList.java b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/SubAccountPayRequestAccountList.java
new file mode 100644
index 0000000..1d328cc
--- /dev/null
+++ b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/SubAccountPayRequestAccountList.java
@@ -0,0 +1,81 @@
+package com.supwisdom.dlpay.payapi.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.openapitools.jackson.nullable.JsonNullable;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * 扣款账户列表
+ */
+@ApiModel(description = "扣款账户列表")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:32:36.835+08:00[Asia/Shanghai]")
+
+public class SubAccountPayRequestAccountList {
+ @JsonProperty("name")
+ private String name;
+
+ public SubAccountPayRequestAccountList name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get name
+ * @return name
+ */
+ @ApiModelProperty(value = "")
+
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ SubAccountPayRequestAccountList subAccountPayRequestAccountList = (SubAccountPayRequestAccountList) o;
+ return Objects.equals(this.name, subAccountPayRequestAccountList.name);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class SubAccountPayRequestAccountList {\n");
+
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/SubAccountPayResponse.java b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/SubAccountPayResponse.java
new file mode 100644
index 0000000..285a720
--- /dev/null
+++ b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/SubAccountPayResponse.java
@@ -0,0 +1,221 @@
+package com.supwisdom.dlpay.payapi.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.supwisdom.dlpay.payapi.model.SubAccountPayResponseAccountList;
+import com.supwisdom.dlpay.payapi.model.TransResult;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.util.ArrayList;
+import java.util.List;
+import org.openapitools.jackson.nullable.JsonNullable;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * 账户消费应答
+ */
+@ApiModel(description = "账户消费应答")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:32:36.835+08:00[Asia/Shanghai]")
+
+public class SubAccountPayResponse {
+ @JsonProperty("refno")
+ private String refno;
+
+ @JsonProperty("hostDate")
+ private String hostDate;
+
+ @JsonProperty("hostTime")
+ private String hostTime;
+
+ @JsonProperty("result")
+ private TransResult result;
+
+ @JsonProperty("description")
+ private String description;
+
+ @JsonProperty("accountList")
+ @Valid
+ private List<SubAccountPayResponseAccountList> accountList = null;
+
+ public SubAccountPayResponse refno(String refno) {
+ this.refno = refno;
+ return this;
+ }
+
+ /**
+ * Get refno
+ * @return refno
+ */
+ @ApiModelProperty(value = "")
+
+@Pattern(regexp="[0-9]*") @Size(min=16)
+ public String getRefno() {
+ return refno;
+ }
+
+ public void setRefno(String refno) {
+ this.refno = refno;
+ }
+
+ public SubAccountPayResponse hostDate(String hostDate) {
+ this.hostDate = hostDate;
+ return this;
+ }
+
+ /**
+ * Get hostDate
+ * @return hostDate
+ */
+ @ApiModelProperty(value = "")
+
+@Pattern(regexp="[0-9]*") @Size(min=8,max=8)
+ public String getHostDate() {
+ return hostDate;
+ }
+
+ public void setHostDate(String hostDate) {
+ this.hostDate = hostDate;
+ }
+
+ public SubAccountPayResponse hostTime(String hostTime) {
+ this.hostTime = hostTime;
+ return this;
+ }
+
+ /**
+ * Get hostTime
+ * @return hostTime
+ */
+ @ApiModelProperty(value = "")
+
+@Pattern(regexp="[0-9]*") @Size(min=6,max=6)
+ public String getHostTime() {
+ return hostTime;
+ }
+
+ public void setHostTime(String hostTime) {
+ this.hostTime = hostTime;
+ }
+
+ public SubAccountPayResponse result(TransResult result) {
+ this.result = result;
+ return this;
+ }
+
+ /**
+ * Get result
+ * @return result
+ */
+ @ApiModelProperty(value = "")
+
+ @Valid
+
+ public TransResult getResult() {
+ return result;
+ }
+
+ public void setResult(TransResult result) {
+ this.result = result;
+ }
+
+ public SubAccountPayResponse description(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get description
+ * @return description
+ */
+ @ApiModelProperty(value = "")
+
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public SubAccountPayResponse accountList(List<SubAccountPayResponseAccountList> accountList) {
+ this.accountList = accountList;
+ return this;
+ }
+
+ public SubAccountPayResponse addAccountListItem(SubAccountPayResponseAccountList accountListItem) {
+ if (this.accountList == null) {
+ this.accountList = new ArrayList<>();
+ }
+ this.accountList.add(accountListItem);
+ return this;
+ }
+
+ /**
+ * 账户扣款情况
+ * @return accountList
+ */
+ @ApiModelProperty(value = "账户扣款情况")
+
+ @Valid
+
+ public List<SubAccountPayResponseAccountList> getAccountList() {
+ return accountList;
+ }
+
+ public void setAccountList(List<SubAccountPayResponseAccountList> accountList) {
+ this.accountList = accountList;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ SubAccountPayResponse subAccountPayResponse = (SubAccountPayResponse) o;
+ return Objects.equals(this.refno, subAccountPayResponse.refno) &&
+ Objects.equals(this.hostDate, subAccountPayResponse.hostDate) &&
+ Objects.equals(this.hostTime, subAccountPayResponse.hostTime) &&
+ Objects.equals(this.result, subAccountPayResponse.result) &&
+ Objects.equals(this.description, subAccountPayResponse.description) &&
+ Objects.equals(this.accountList, subAccountPayResponse.accountList);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(refno, hostDate, hostTime, result, description, accountList);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class SubAccountPayResponse {\n");
+
+ sb.append(" refno: ").append(toIndentedString(refno)).append("\n");
+ sb.append(" hostDate: ").append(toIndentedString(hostDate)).append("\n");
+ sb.append(" hostTime: ").append(toIndentedString(hostTime)).append("\n");
+ sb.append(" result: ").append(toIndentedString(result)).append("\n");
+ sb.append(" description: ").append(toIndentedString(description)).append("\n");
+ sb.append(" accountList: ").append(toIndentedString(accountList)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/SubAccountPayResponseAccountList.java b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/SubAccountPayResponseAccountList.java
new file mode 100644
index 0000000..3384906
--- /dev/null
+++ b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/SubAccountPayResponseAccountList.java
@@ -0,0 +1,131 @@
+package com.supwisdom.dlpay.payapi.model;
+
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.openapitools.jackson.nullable.JsonNullable;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+/**
+ * 账户结果
+ */
+@ApiModel(description = "账户结果")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:32:36.835+08:00[Asia/Shanghai]")
+
+public class SubAccountPayResponseAccountList {
+ @JsonProperty("name")
+ private String name;
+
+ @JsonProperty("payAmount")
+ private Integer payAmount;
+
+ @JsonProperty("aftbal")
+ private Integer aftbal;
+
+ public SubAccountPayResponseAccountList name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get name
+ * @return name
+ */
+ @ApiModelProperty(value = "")
+
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public SubAccountPayResponseAccountList payAmount(Integer payAmount) {
+ this.payAmount = payAmount;
+ return this;
+ }
+
+ /**
+ * Get payAmount
+ * @return payAmount
+ */
+ @ApiModelProperty(value = "")
+
+
+ public Integer getPayAmount() {
+ return payAmount;
+ }
+
+ public void setPayAmount(Integer payAmount) {
+ this.payAmount = payAmount;
+ }
+
+ public SubAccountPayResponseAccountList aftbal(Integer aftbal) {
+ this.aftbal = aftbal;
+ return this;
+ }
+
+ /**
+ * Get aftbal
+ * @return aftbal
+ */
+ @ApiModelProperty(value = "")
+
+
+ public Integer getAftbal() {
+ return aftbal;
+ }
+
+ public void setAftbal(Integer aftbal) {
+ this.aftbal = aftbal;
+ }
+
+
+ @Override
+ public boolean equals(java.lang.Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ SubAccountPayResponseAccountList subAccountPayResponseAccountList = (SubAccountPayResponseAccountList) o;
+ return Objects.equals(this.name, subAccountPayResponseAccountList.name) &&
+ Objects.equals(this.payAmount, subAccountPayResponseAccountList.payAmount) &&
+ Objects.equals(this.aftbal, subAccountPayResponseAccountList.aftbal);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, payAmount, aftbal);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class SubAccountPayResponseAccountList {\n");
+
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" payAmount: ").append(toIndentedString(payAmount)).append("\n");
+ sb.append(" aftbal: ").append(toIndentedString(aftbal)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(java.lang.Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/UserStatus.java b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/UserStatus.java
new file mode 100644
index 0000000..9c2c7fe
--- /dev/null
+++ b/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model/UserStatus.java
@@ -0,0 +1,49 @@
+package com.supwisdom.dlpay.payapi.model;
+
+import java.util.Objects;
+import io.swagger.annotations.ApiModel;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+
+/**
+ * * normal 正常 * frozen 冻结 * canceled 注销 * closed 关闭 * notexists 不存在
+ */
+public enum UserStatus {
+
+ NORMAL("normal"),
+
+ FRONZEN("fronzen"),
+
+ CANCELED("canceled"),
+
+ CLOSED("closed"),
+
+ NOTEXISTS("notexists");
+
+ private String value;
+
+ UserStatus(String value) {
+ this.value = value;
+ }
+
+ @Override
+ @JsonValue
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static UserStatus fromValue(String value) {
+ for (UserStatus b : UserStatus.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
+
diff --git a/payapi-spec/accountapi.yaml b/payapi-spec/accountapi.yaml
index 08c83a0..043f4fd 100644
--- a/payapi-spec/accountapi.yaml
+++ b/payapi-spec/accountapi.yaml
@@ -41,7 +41,7 @@
title: 子账户列表
items:
title: 子账户属性
- $ref: 'definitions.yaml#/components/schemas/SubAccountMetadata'
+ $ref: 'definitions.yaml#/components/schemas/SubAccountBalance'
PreAuthorizedDebitRequest:
type: object
title: 预授权交易请求
@@ -168,6 +168,79 @@
realAmount:
title: 实际扣款金额(分)
type: integer
+ SubAccountPayRequest:
+ type: object
+ description: 子账户消费接口
+ required:
+ - billno
+ - shopaccno
+ - transDate
+ - transTime
+ - amount
+ - overdraft
+ - accountList
+ properties:
+ billno:
+ $ref: 'definitions.yaml#/components/schemas/Refno'
+ shopaccno:
+ $ref: 'definitions.yaml#/components/schemas/ShopAccNo'
+ transDate:
+ $ref: 'definitions.yaml#/components/schemas/TransDate'
+ transTime:
+ $ref: 'definitions.yaml#/components/schemas/TransTime'
+ userid:
+ title: 用户ID
+ type: string
+ amount:
+ title: 扣款金额(分)
+ type: integer
+ overdraft:
+ type: boolean
+ title: 是否允许主账户透支
+ useMainAccount:
+ type: boolean
+ title: 是否扣款账户
+ accountList:
+ type: array
+ description: 按照账户列表顺序扣款
+ items:
+ type: object
+ description: 扣款账户列表
+ properties:
+ name:
+ type: string
+ title: 账户名
+ SubAccountPayResponse:
+ type: object
+ description: 账户消费应答
+ properties:
+ refno:
+ $ref: 'definitions.yaml#/components/schemas/Refno'
+ hostDate:
+ $ref: 'definitions.yaml#/components/schemas/TransDate'
+ hostTime:
+ $ref: 'definitions.yaml#/components/schemas/TransTime'
+ result:
+ $ref: 'definitions.yaml#/components/schemas/TransResult'
+ description:
+ title: 扣款情况描述
+ type: string
+ accountList:
+ type: array
+ description: 账户扣款情况
+ items:
+ type: object
+ description: 账户结果
+ properties:
+ name:
+ title: 账户名
+ type: string
+ payAmount:
+ title: 扣款金额
+ type: integer
+ aftbal:
+ title: 交易后余额
+ type: integer
paths:
accountQuery:
@@ -195,7 +268,7 @@
application/json:
schema:
$ref: 'definitions.yaml#/components/schemas/ErrorResponse'
- default:
+ '500':
$ref: 'definitions.yaml#/components/responses/CommonError'
accountPay:
parameters:
@@ -203,6 +276,7 @@
post:
tags:
- pos
+ - pay
requestBody:
description: 主账户余额消费
content:
@@ -225,14 +299,47 @@
application/json:
schema:
$ref: 'definitions.yaml#/components/schemas/ErrorResponse'
- default:
+ '500':
$ref: 'definitions.yaml#/components/responses/CommonError'
+ subaccPay:
+ parameters:
+ - $ref: definitions.yaml#/components/headers/TenantId
+ post:
+ tags:
+ - pay
+ requestBody:
+ description: |
+ 子账户消费, 请求时指定扣款列表,系统安装账户顺序扣款
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SubAccountPayRequest'
+ responses:
+ '200':
+ description: 扣款成功
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/SubAccountPayResponse'
+ '400':
+ description: |
+ 扣款失败, code 定义错误信息
+ * short_of_balance 余额不足
+ * account_status_error 账户状态异常
+ content:
+ application/json:
+ schema:
+ $ref: 'definitions.yaml#/components/schemas/ErrorResponse'
+ '500':
+ $ref: 'definitions.yaml#/components/responses/CommonError'
+
accountPreAuthorizedDebit:
parameters:
- $ref: definitions.yaml#/components/headers/TenantId
post:
tags:
- pos
+ - pay
requestBody:
description: 账户预授权交易
content:
@@ -246,7 +353,7 @@
application/json:
schema:
$ref: '#/components/schemas/PreAuthorizedDebitResponse'
- default:
+ '500':
$ref: 'definitions.yaml#/components/responses/CommonError'
accountPreAuthorizedSettle:
parameters:
@@ -254,6 +361,7 @@
post:
tags:
- pos
+ - pay
requestBody:
description: 预授权交易清算
content:
@@ -267,6 +375,23 @@
application/json:
schema:
$ref: '#/components/schemas/PreAuthorizedSettleResponse'
- default:
+ '500':
+ $ref: 'definitions.yaml#/components/responses/CommonError'
+ querySubAccountMetadata:
+ parameters:
+ - $ref: definitions.yaml#/components/headers/TenantId
+ get:
+ tags:
+ - sa
+ responses:
+ '200':
+ description: 子账户元数据信息
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ $ref: 'definitions.yaml#/components/schemas/SubAccountMetadata'
+ '500':
$ref: 'definitions.yaml#/components/responses/CommonError'
diff --git a/payapi-spec/build.gradle b/payapi-spec/build.gradle
index 57f22e8..7d09e45 100644
--- a/payapi-spec/build.gradle
+++ b/payapi-spec/build.gradle
@@ -36,7 +36,7 @@
]
systemProperties = [
- "hideGenerationTimestamp": true
+ "hideGenerationTimestamp": "true"
]
}
@@ -54,5 +54,3 @@
}
into "$rootProject.projectDir/payapi-common/src/main/java/com/supwisdom/dlpay/payapi/model"
}
-
-//copySrc.dependsOn openApiGenerate
\ No newline at end of file
diff --git a/payapi-spec/consumeapi.yaml b/payapi-spec/consumeapi.yaml
index a9b91b9..b58bf96 100644
--- a/payapi-spec/consumeapi.yaml
+++ b/payapi-spec/consumeapi.yaml
@@ -149,7 +149,7 @@
application/json:
schema:
$ref: '#/components/schemas/QrcodePayInitResponse'
- default:
+ '500':
$ref: 'definitions.yaml#/components/responses/CommonError'
qrcodePayConfirm:
parameters:
@@ -177,7 +177,7 @@
application/json:
schema:
$ref: 'definitions.yaml#/components/schemas/ErrorResponse'
- default:
+ '500':
$ref: 'definitions.yaml#/components/responses/CommonError'
qrcodePayQuery:
parameters:
@@ -201,7 +201,7 @@
application/json:
schema:
$ref: '#/components/schemas/QrcodePayConfirmResponse'
- default:
+ '500':
$ref: 'definitions.yaml#/components/responses/CommonError'
refund:
parameters:
@@ -230,7 +230,7 @@
application/json:
schema:
$ref: 'definitions.yaml#/components/schemas/ErrorResponse'
- default:
+ '500':
$ref: 'definitions.yaml#/components/responses/CommonError'
refundQuery:
parameters:
@@ -260,5 +260,5 @@
application/json:
schema:
$ref: 'definitions.yaml#/components/schemas/ErrorResponse'
- default:
+ '500':
$ref: 'definitions.yaml#/components/responses/CommonError'
diff --git a/payapi-spec/definitions.yaml b/payapi-spec/definitions.yaml
index ed1adb4..a72bb54 100644
--- a/payapi-spec/definitions.yaml
+++ b/payapi-spec/definitions.yaml
@@ -82,7 +82,7 @@
- canceled
- closed
- notexists
- SubAccountMetadata:
+ SubAccountBalance:
type: object
required:
- name
@@ -94,6 +94,9 @@
status:
title: 子账户状态
$ref: '#/components/schemas/UserStatus'
+ offline:
+ type: boolean
+ title: 是否允许脱机使用
balance:
type: integer
title: 子账户余额
@@ -101,3 +104,18 @@
type: string
title: 余额有效期
format: date-time
+ SubAccountMetadata:
+ type: object
+ properties:
+ name:
+ type: string
+ title: 账户名
+ title:
+ type: string
+ title: 账户类型
+ description:
+ type: string
+ title: 账户描述
+ offline:
+ type: boolean
+ title: 是否可以脱机使用
diff --git a/payapi-spec/payapi-spec.yaml b/payapi-spec/payapi-spec.yaml
index b00d7ed..91197ef 100644
--- a/payapi-spec/payapi-spec.yaml
+++ b/payapi-spec/payapi-spec.yaml
@@ -17,9 +17,13 @@
$ref: consumeapi.yaml#/components/paths/refundQuery
/account/query:
$ref: accountapi.yaml#/components/paths/accountQuery
- /account/apy:
+ /account/pay:
$ref: accountapi.yaml#/components/paths/accountPay
+ /account/subaccPay:
+ $ref: accountapi.yaml#/components/paths/subaccPay
/account/preAuthorizedDebit:
$ref: accountapi.yaml#/components/paths/accountPreAuthorizedDebit
/account/preAuthorizedSettle:
$ref: accountapi.yaml#/components/paths/accountPreAuthorizedSettle
+ /account/subaccountMetadata:
+ $ref: accountapi.yaml#/components/paths/querySubAccountMetadata
diff --git a/payapi/src/main/java/com/supwisdom/dlpay/api/AccountApi.java b/payapi/src/main/java/com/supwisdom/dlpay/api/AccountApi.java
new file mode 100644
index 0000000..f54942f
--- /dev/null
+++ b/payapi/src/main/java/com/supwisdom/dlpay/api/AccountApi.java
@@ -0,0 +1,189 @@
+/**
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (4.2.2).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package com.supwisdom.dlpay.api;
+
+import com.supwisdom.dlpay.payapi.model.AccountPayRequest;
+import com.supwisdom.dlpay.payapi.model.AccountPayResponse;
+import com.supwisdom.dlpay.payapi.model.AccountQueryRequest;
+import com.supwisdom.dlpay.payapi.model.AccountQueryResponse;
+import com.supwisdom.dlpay.payapi.model.ErrorResponse;
+import com.supwisdom.dlpay.payapi.model.PreAuthorizedDebitRequest;
+import com.supwisdom.dlpay.payapi.model.PreAuthorizedDebitResponse;
+import com.supwisdom.dlpay.payapi.model.PreAuthorizedSettleRequest;
+import com.supwisdom.dlpay.payapi.model.PreAuthorizedSettleResponse;
+import com.supwisdom.dlpay.payapi.model.SubAccountMetadata;
+import com.supwisdom.dlpay.payapi.model.SubAccountPayRequest;
+import com.supwisdom.dlpay.payapi.model.SubAccountPayResponse;
+import io.swagger.annotations.*;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestHeader;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RequestPart;
+import org.springframework.web.context.request.NativeWebRequest;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:22:47.201+08:00[Asia/Shanghai]")
+
+@Validated
+@Api(value = "account", description = "the account API")
+public interface AccountApi {
+
+ default Optional<NativeWebRequest> getRequest() {
+ return Optional.empty();
+ }
+
+ @ApiOperation(value = "", nickname = "accountPayPost", notes = "", response = AccountPayResponse.class, tags={ "pos","pay", })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "账户消费成功", response = AccountPayResponse.class),
+ @ApiResponse(code = 400, message = "消费失败, code 用于定义错误信息 * short_of_balance 余额不足 * account_status_error 账户状态异常 ", response = ErrorResponse.class),
+ @ApiResponse(code = 500, message = "请求失败", response = ErrorResponse.class) })
+ @RequestMapping(value = "/account/pay",
+ produces = { "application/json" },
+ consumes = { "application/json" },
+ method = RequestMethod.POST)
+ default ResponseEntity<AccountPayResponse> accountPayPost(@ApiParam(value = "租户ID" ,required=true) @RequestHeader(value="X-TENANT-ID", required=true) String X_TENANT_ID,@ApiParam(value = "主账户余额消费" ) @Valid @RequestBody AccountPayRequest accountPayRequest) {
+ getRequest().ifPresent(request -> {
+ for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
+ if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
+ String exampleString = "{ \"realAmount\" : 6, \"refno\" : \"refno\", \"aftbal\" : 0, \"description\" : \"description\" }";
+ ApiUtil.setExampleResponse(request, "application/json", exampleString);
+ break;
+ }
+ }
+ });
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+
+ }
+
+
+ @ApiOperation(value = "", nickname = "accountPreAuthorizedDebitPost", notes = "", response = PreAuthorizedDebitResponse.class, tags={ "pos","pay", })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "预授权交易成功", response = PreAuthorizedDebitResponse.class),
+ @ApiResponse(code = 500, message = "请求失败", response = ErrorResponse.class) })
+ @RequestMapping(value = "/account/preAuthorizedDebit",
+ produces = { "application/json" },
+ consumes = { "application/json" },
+ method = RequestMethod.POST)
+ default ResponseEntity<PreAuthorizedDebitResponse> accountPreAuthorizedDebitPost(@ApiParam(value = "租户ID" ,required=true) @RequestHeader(value="X-TENANT-ID", required=true) String X_TENANT_ID,@ApiParam(value = "账户预授权交易" ) @Valid @RequestBody PreAuthorizedDebitRequest preAuthorizedDebitRequest) {
+ getRequest().ifPresent(request -> {
+ for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
+ if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
+ String exampleString = "{ \"refno\" : \"refno\", \"message\" : \"message\" }";
+ ApiUtil.setExampleResponse(request, "application/json", exampleString);
+ break;
+ }
+ }
+ });
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+
+ }
+
+
+ @ApiOperation(value = "", nickname = "accountPreAuthorizedSettlePost", notes = "", response = PreAuthorizedSettleResponse.class, tags={ "pos","pay", })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "预授权交易清算成功", response = PreAuthorizedSettleResponse.class),
+ @ApiResponse(code = 500, message = "请求失败", response = ErrorResponse.class) })
+ @RequestMapping(value = "/account/preAuthorizedSettle",
+ produces = { "application/json" },
+ consumes = { "application/json" },
+ method = RequestMethod.POST)
+ default ResponseEntity<PreAuthorizedSettleResponse> accountPreAuthorizedSettlePost(@ApiParam(value = "租户ID" ,required=true) @RequestHeader(value="X-TENANT-ID", required=true) String X_TENANT_ID,@ApiParam(value = "预授权交易清算" ) @Valid @RequestBody PreAuthorizedSettleRequest preAuthorizedSettleRequest) {
+ getRequest().ifPresent(request -> {
+ for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
+ if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
+ String exampleString = "{ \"refno\" : \"refno\", \"leftPreAuthorizedAmount\" : 0 }";
+ ApiUtil.setExampleResponse(request, "application/json", exampleString);
+ break;
+ }
+ }
+ });
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+
+ }
+
+
+ @ApiOperation(value = "", nickname = "accountQueryPost", notes = "", response = AccountQueryResponse.class, tags={ "pos", })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "查询账户成功", response = AccountQueryResponse.class),
+ @ApiResponse(code = 404, message = "指定用户不存在", response = ErrorResponse.class),
+ @ApiResponse(code = 500, message = "请求失败", response = ErrorResponse.class) })
+ @RequestMapping(value = "/account/query",
+ produces = { "application/json" },
+ consumes = { "application/json" },
+ method = RequestMethod.POST)
+ default ResponseEntity<AccountQueryResponse> accountQueryPost(@ApiParam(value = "租户ID" ,required=true) @RequestHeader(value="X-TENANT-ID", required=true) String X_TENANT_ID,@ApiParam(value = "账户余额查询" ) @Valid @RequestBody AccountQueryRequest accountQueryRequest) {
+ getRequest().ifPresent(request -> {
+ for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
+ if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
+ String exampleString = "{ \"frozenbal\" : 6, \"balance\" : 0, \"subaccountList\" : [ { \"offline\" : true, \"balance\" : 1, \"expire\" : \"2000-01-23T04:56:07.000+00:00\", \"name\" : \"name\" }, { \"offline\" : true, \"balance\" : 1, \"expire\" : \"2000-01-23T04:56:07.000+00:00\", \"name\" : \"name\" } ], \"userid\" : \"userid\", \"username\" : \"username\" }";
+ ApiUtil.setExampleResponse(request, "application/json", exampleString);
+ break;
+ }
+ }
+ });
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+
+ }
+
+
+ @ApiOperation(value = "", nickname = "accountSubaccPayPost", notes = "", response = SubAccountPayResponse.class, tags={ "pay", })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "扣款成功", response = SubAccountPayResponse.class),
+ @ApiResponse(code = 400, message = "扣款失败, code 定义错误信息 * short_of_balance 余额不足 * account_status_error 账户状态异常 ", response = ErrorResponse.class),
+ @ApiResponse(code = 500, message = "请求失败", response = ErrorResponse.class) })
+ @RequestMapping(value = "/account/subaccPay",
+ produces = { "application/json" },
+ consumes = { "application/json" },
+ method = RequestMethod.POST)
+ default ResponseEntity<SubAccountPayResponse> accountSubaccPayPost(@ApiParam(value = "租户ID" ,required=true) @RequestHeader(value="X-TENANT-ID", required=true) String X_TENANT_ID,@ApiParam(value = "子账户消费" ) @Valid @RequestBody SubAccountPayRequest subAccountPayRequest) {
+ getRequest().ifPresent(request -> {
+ for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
+ if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
+ String exampleString = "{ \"hostTime\" : \"hostTime\", \"refno\" : \"refno\", \"accountList\" : [ { \"payAmount\" : 0, \"aftbal\" : 6, \"name\" : \"name\" }, { \"payAmount\" : 0, \"aftbal\" : 6, \"name\" : \"name\" } ], \"hostDate\" : \"hostDate\", \"description\" : \"description\" }";
+ ApiUtil.setExampleResponse(request, "application/json", exampleString);
+ break;
+ }
+ }
+ });
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+
+ }
+
+
+ @ApiOperation(value = "", nickname = "accountSubaccountMetadataGet", notes = "", response = SubAccountMetadata.class, responseContainer = "List", tags={ "sa", })
+ @ApiResponses(value = {
+ @ApiResponse(code = 200, message = "子账户元数据信息", response = SubAccountMetadata.class, responseContainer = "List"),
+ @ApiResponse(code = 500, message = "请求失败", response = ErrorResponse.class) })
+ @RequestMapping(value = "/account/subaccountMetadata",
+ produces = { "application/json" },
+ method = RequestMethod.GET)
+ default ResponseEntity<List<SubAccountMetadata>> accountSubaccountMetadataGet(@ApiParam(value = "租户ID" ,required=true) @RequestHeader(value="X-TENANT-ID", required=true) String X_TENANT_ID) {
+ getRequest().ifPresent(request -> {
+ for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
+ if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
+ String exampleString = "{ \"offline\" : true, \"name\" : \"name\", \"description\" : \"description\", \"title\" : \"title\" }";
+ ApiUtil.setExampleResponse(request, "application/json", exampleString);
+ break;
+ }
+ }
+ });
+ return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
+
+ }
+
+}
diff --git a/payapi/src/main/java/com/supwisdom/dlpay/api/ConsumeApi.java b/payapi/src/main/java/com/supwisdom/dlpay/api/ConsumeApi.java
index 4625ca9..ce7cf2c 100644
--- a/payapi/src/main/java/com/supwisdom/dlpay/api/ConsumeApi.java
+++ b/payapi/src/main/java/com/supwisdom/dlpay/api/ConsumeApi.java
@@ -32,7 +32,7 @@
import java.util.List;
import java.util.Map;
import java.util.Optional;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-17T08:49:02.541+08:00[Asia/Shanghai]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2020-03-24T11:22:47.201+08:00[Asia/Shanghai]")
@Validated
@Api(value = "consume", description = "the consume API")
@@ -46,12 +46,12 @@
@ApiResponses(value = {
@ApiResponse(code = 200, message = "交易成功", response = QrcodePayConfirmResponse.class),
@ApiResponse(code = 409, message = "交易正忙,稍后重试", response = ErrorResponse.class),
- @ApiResponse(code = 200, message = "交易失败", response = ErrorResponse.class) })
+ @ApiResponse(code = 500, message = "请求失败", response = ErrorResponse.class) })
@RequestMapping(value = "/consume/qrcode/confirm",
produces = { "application/json" },
consumes = { "application/json" },
method = RequestMethod.POST)
- default ResponseEntity<QrcodePayConfirmResponse> qrcodePayConfirm(@ApiParam(value = "租户ID" ,required=true) @RequestHeader(value="X-Tenant-Id", required=true) String xTenantId,@ApiParam(value = "Qrcode确认" ) @Valid @RequestBody QrcodePayConfirmRequest qrcodePayConfirmRequest) {
+ default ResponseEntity<QrcodePayConfirmResponse> qrcodePayConfirm(@ApiParam(value = "租户ID" ,required=true) @RequestHeader(value="X-TENANT-ID", required=true) String X_TENANT_ID,@ApiParam(value = "Qrcode确认" ) @Valid @RequestBody QrcodePayConfirmRequest qrcodePayConfirmRequest) {
getRequest().ifPresent(request -> {
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
@@ -69,12 +69,12 @@
@ApiOperation(value = "", nickname = "qrcodePayInit", notes = "", response = QrcodePayInitResponse.class, tags={ "pos", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "初始化成功", response = QrcodePayInitResponse.class),
- @ApiResponse(code = 200, message = "请求错误", response = ErrorResponse.class) })
+ @ApiResponse(code = 500, message = "请求失败", response = ErrorResponse.class) })
@RequestMapping(value = "/consume/qrcode/init",
produces = { "application/json" },
consumes = { "application/json" },
method = RequestMethod.POST)
- default ResponseEntity<QrcodePayInitResponse> qrcodePayInit(@ApiParam(value = "租户ID" ,required=true) @RequestHeader(value="X-TENANT-ID", required=true) String xTenantId,@ApiParam(value = "QrCode 初始化" ) @Valid @RequestBody QrcodePayInitRequest qrcodePayInitRequest) {
+ default ResponseEntity<QrcodePayInitResponse> qrcodePayInit(@ApiParam(value = "租户ID" ,required=true) @RequestHeader(value="X-TENANT-ID", required=true) String X_TENANT_ID,@ApiParam(value = "QrCode 初始化" ) @Valid @RequestBody QrcodePayInitRequest qrcodePayInitRequest) {
getRequest().ifPresent(request -> {
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
@@ -92,11 +92,11 @@
@ApiOperation(value = "", nickname = "qrcodePayQuery", notes = "根据系统交易参考号查询流水状态", response = QrcodePayConfirmResponse.class, tags={ "pos", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "查询成功", response = QrcodePayConfirmResponse.class),
- @ApiResponse(code = 200, message = "查询失败", response = ErrorResponse.class) })
+ @ApiResponse(code = 500, message = "请求失败", response = ErrorResponse.class) })
@RequestMapping(value = "/consume/qrcode/query/{refno}",
produces = { "application/json" },
method = RequestMethod.GET)
- default ResponseEntity<QrcodePayConfirmResponse> qrcodePayQuery(@ApiParam(value = "租户ID" ,required=true) @RequestHeader(value="X-TENANT-ID", required=true) String xTenantId,@ApiParam(value = "系统交易参考号",required=true) @PathVariable("refno") String refno) {
+ default ResponseEntity<QrcodePayConfirmResponse> qrcodePayQuery(@ApiParam(value = "租户ID" ,required=true) @RequestHeader(value="X-TENANT-ID", required=true) String X_TENANT_ID,@ApiParam(value = "系统交易参考号",required=true) @PathVariable("refno") String refno) {
getRequest().ifPresent(request -> {
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
@@ -114,13 +114,13 @@
@ApiOperation(value = "", nickname = "refund", notes = "退款交易", response = RefundResponse.class, tags={ "pos", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "退款申请成功,等待查询", response = RefundResponse.class),
- @ApiResponse(code = 409, message = "退款申请失败,订单号已存在或正在退款中", response = ErrorResponse.class),
- @ApiResponse(code = 200, message = "退款申请失败", response = ErrorResponse.class) })
+ @ApiResponse(code = 409, message = "退款申请失败,订单号已存在或正在退款中 ", response = ErrorResponse.class),
+ @ApiResponse(code = 500, message = "请求失败", response = ErrorResponse.class) })
@RequestMapping(value = "/consume/refund",
produces = { "application/json" },
consumes = { "application/json" },
method = RequestMethod.POST)
- default ResponseEntity<RefundResponse> refund(@ApiParam(value = "租户ID" ,required=true) @RequestHeader(value="X-Tenant-Id", required=true) String xTenantId,@ApiParam(value = "" ) @Valid @RequestBody RefundRequest refundRequest) {
+ default ResponseEntity<RefundResponse> refund(@ApiParam(value = "租户ID" ,required=true) @RequestHeader(value="X-TENANT-ID", required=true) String X_TENANT_ID,@ApiParam(value = "" ) @Valid @RequestBody RefundRequest refundRequest) {
getRequest().ifPresent(request -> {
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
@@ -139,11 +139,11 @@
@ApiResponses(value = {
@ApiResponse(code = 200, message = "退款申请查询成功", response = RefundResponse.class),
@ApiResponse(code = 404, message = "退款申请订单不存在", response = ErrorResponse.class),
- @ApiResponse(code = 200, message = "退款申请失败", response = ErrorResponse.class) })
+ @ApiResponse(code = 500, message = "请求失败", response = ErrorResponse.class) })
@RequestMapping(value = "/consume/refund/query/{billno}",
produces = { "application/json" },
method = RequestMethod.GET)
- default ResponseEntity<RefundResponse> refundQuery(@ApiParam(value = "租户ID" ,required=true) @RequestHeader(value="X-Tenant-Id", required=true) String xTenantId,@ApiParam(value = "退款订单号",required=true) @PathVariable("billno") String billno) {
+ default ResponseEntity<RefundResponse> refundQuery(@ApiParam(value = "租户ID" ,required=true) @RequestHeader(value="X-TENANT-ID", required=true) String X_TENANT_ID,@ApiParam(value = "退款订单号",required=true) @PathVariable("billno") String billno) {
getRequest().ifPresent(request -> {
for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) {
if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) {
diff --git a/payapi/src/main/java/com/supwisdom/dlpay/api/domain/TSubAccount.java b/payapi/src/main/java/com/supwisdom/dlpay/api/domain/TSubAccount.java
index 5bc9f17..b1878e3 100644
--- a/payapi/src/main/java/com/supwisdom/dlpay/api/domain/TSubAccount.java
+++ b/payapi/src/main/java/com/supwisdom/dlpay/api/domain/TSubAccount.java
@@ -12,8 +12,8 @@
*/
@Entity
@Table(name = "TB_SUBACCOUNT",
- indexes = {@Index(name = "subacc_idx1", columnList = "userid, name", unique = true),
- @Index(name = "subacc_idx2", columnList = "name, status")})
+ indexes = {@Index(name = "subacc_idx1", columnList = "userid, accountname", unique = true),
+ @Index(name = "subacc_idx2", columnList = "accountname, status")})
@GenericGenerator(name = "subaccount_seq", strategy = "org.hibernate.id.UUIDGenerator")
public class TSubAccount {
@Id
@@ -30,7 +30,7 @@
/**
* 子账户名
*/
- @Column(name = "name", length = 30)
+ @Column(name = "accountname", length = 30)
@NotNull
private String accountName;
diff --git a/payapi/src/main/java/com/supwisdom/dlpay/api/domain/TSubAccountMetadata.java b/payapi/src/main/java/com/supwisdom/dlpay/api/domain/TSubAccountMetadata.java
new file mode 100644
index 0000000..bb3e9d4
--- /dev/null
+++ b/payapi/src/main/java/com/supwisdom/dlpay/api/domain/TSubAccountMetadata.java
@@ -0,0 +1,72 @@
+package com.supwisdom.dlpay.api.domain;
+
+import javax.persistence.*;
+import javax.validation.constraints.NotNull;
+import java.io.Serializable;
+
+@Entity
+@Table(name = "TB_SUBACCOUNT_METADATA",
+ indexes = {@Index(name = "subaccount_metadata_idx1", columnList = "name, tenantid", unique = true)})
+@SequenceGenerator(name = "subaccount_metadata_seq")
+public class TSubAccountMetadata implements Serializable {
+ private static final long serialVersionUID = -8826113804560528588L;
+
+ @Id
+ @Column(name = "id")
+ @GeneratedValue(generator = "subaccount_metadata_seq", strategy = GenerationType.SEQUENCE)
+ private Integer id;
+
+ @Column(name = "name", length = 32)
+ @NotNull
+ private String name;
+
+ @Column(name = "title", length = 100)
+ private String title;
+
+ @Column(name = "description", length = 200)
+ private String description;
+
+ @Column(name = "tenantid", length = 32)
+ @NotNull
+ private String tenantid;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getTenantid() {
+ return tenantid;
+ }
+
+ public void setTenantid(String tenantid) {
+ this.tenantid = tenantid;
+ }
+}