ab
2024-11-04 09d882262f530ded672f1c01fb65a1fefa00d52d
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
66
67
package com.nova.sankuai.domain.enums.yixin;
 
import com.nova.sankuai.domain.vo.EnumParamsVo;
import io.swagger.annotations.ApiModel;
 
import java.util.ArrayList;
import java.util.List;
 
/**
 * @author weikangdi
 * APP字段枚举-月收入
 */
@ApiModel(value = "APP字段枚举-月收入枚举")
public enum YiXinMonthlyIncomeEnum {
 
    Income_1W_UNDER(13, "10000以下"),
    Income_1W_3W(3, "10000-30000"),
    Income_3W_UPPER(4, "30000以上"),
    ;
 
    private Integer code;
    private String value;
 
    YiXinMonthlyIncomeEnum(int code, String value) {
        this.code = code;
        this.value = value;
    }
 
    public static String value(Integer code) {
        if (code != null) {
            for (YiXinMonthlyIncomeEnum m : YiXinMonthlyIncomeEnum.values()) {
                if (m.getCode() == code.intValue()) {
                    return m.getValue();
                }
            }
        }
        return null;
    }
 
    public static List<EnumParamsVo> parseParams() {
        List<EnumParamsVo> paramsVos = new ArrayList<>();
        for (YiXinMonthlyIncomeEnum m : YiXinMonthlyIncomeEnum.values()) {
            EnumParamsVo enumParamsVo = new EnumParamsVo();
            enumParamsVo.setValue(m.getCode().toString());
            enumParamsVo.setText(m.getValue());
            paramsVos.add(enumParamsVo);
        }
        return paramsVos;
    }
 
    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;
    }
 
}