Sunshine
2024-11-05 8f7985d7764a0aad24bd593ac5ea47b7fc290961
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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;
    }
}