You've already forked FrameTour-BE
聪明付
This commit is contained in:
@ -1,16 +1,22 @@
|
||||
package com.ycwl.basic.pay.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class PayResponse {
|
||||
private boolean valid;
|
||||
private String orderNo;
|
||||
@JsonIgnore
|
||||
private Object originalResponse;
|
||||
private Integer orderPrice;
|
||||
private Integer payPrice;
|
||||
private PAY_STATE state;
|
||||
private String payTime;
|
||||
@JsonIgnore
|
||||
private String customResponse;
|
||||
|
||||
public boolean isPay() {
|
||||
return state == PAY_STATE.SUCCESS;
|
||||
@ -24,8 +30,17 @@ public class PayResponse {
|
||||
return state == PAY_STATE.REFUND;
|
||||
}
|
||||
|
||||
public void setPayPriceInYuan(BigDecimal money) {
|
||||
payPrice = money.multiply(BigDecimal.valueOf(100)).intValue();
|
||||
}
|
||||
|
||||
public void setOrderPriceInYuan(BigDecimal money) {
|
||||
orderPrice = money.multiply(BigDecimal.valueOf(100)).intValue();
|
||||
}
|
||||
|
||||
public enum PAY_STATE {
|
||||
SUCCESS,
|
||||
NOT_PAY,
|
||||
CANCEL,
|
||||
REFUND,
|
||||
FAIL,
|
||||
|
Reference in New Issue
Block a user