package com.nova.sankuai.domain.enums.capitalInfo;
|
|
import com.nova.sankuai.domain.api.yixin.response.YxLoanResultQueryResponse;
|
import io.swagger.annotations.ApiModel;
|
|
/**
|
* @author weikangdi
|
* @create 2022/5/7
|
*/
|
@ApiModel(value = "资方信息用信申请结果枚举")
|
public enum CapitalLoanApplyResultEnum {
|
|
WAIT(0, "审核中"),
|
LOAN_SUCCESS(1, "放款成功"),
|
APPLY_REFUSE(2, "审核拒绝"),
|
LOAN_FAIL(3, "放款失败"),
|
;
|
|
private Integer code;
|
private String value;
|
|
CapitalLoanApplyResultEnum(int code, String value) {
|
this.code = code;
|
this.value = value;
|
}
|
|
public static String value(Integer code) {
|
if (code != null) {
|
for (CapitalLoanApplyResultEnum m : CapitalLoanApplyResultEnum.values()) {
|
if (m.getCode() == code.intValue()) {
|
return m.getValue();
|
}
|
}
|
}
|
return null;
|
}
|
|
public static Integer parseLvDiLoanResult(String loanResult) {
|
if (YxLoanResultQueryResponse.WAIT.equals(loanResult)) {
|
return WAIT.getCode();
|
} else if (YxLoanResultQueryResponse.LOAN_SUCCESS.equals(loanResult)) {
|
return LOAN_SUCCESS.getCode();
|
} else if (YxLoanResultQueryResponse.LOAN_FAIL.equals(loanResult)) {
|
return LOAN_FAIL.getCode();
|
} else {
|
return APPLY_REFUSE.getCode();
|
}
|
}
|
|
public Integer getCode() {
|
return code;
|
}
|
|
public void setCode(Integer code) {
|
this.code = code;
|
}
|
|
public String getValue() {
|
return value;
|
}
|
|
public void setValue(String value) {
|
this.value = value;
|
}
|
}
|