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
68
69
70
71
72
73
| 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
| * @create 2022/5/16
| * APP字段枚举-居住地类型
| */
| @ApiModel(value = "APP字段枚举-居住地枚举")
| public enum YiXinLivestEnum {
|
| LIVEST_1("1", "自置"),
| LIVEST_2("2", "按揭"),
| LIVEST_3("3", "亲属楼宇"),
| LIVEST_4("4", "集体宿舍"),
| LIVEST_5("5", "租房"),
| LIVEST_6("6", "共有住宅"),
| LIVEST_7("7", "其他"),
| UNKNOWN("9", "未知"),
| ;
|
| private String code;
| private String value;
|
| YiXinLivestEnum(String code, String value) {
| this.code = code;
| this.value = value;
| }
|
| public static String value(String code) {
| if (code != null) {
| for (YiXinLivestEnum m : YiXinLivestEnum.values()) {
| if (m.getCode().equals(code)) {
| return m.getValue();
| }
| }
| }
| return null;
| }
|
| public static List<EnumParamsVo> parseParams() {
| List<EnumParamsVo> paramsVos = new ArrayList<>();
| for (YiXinLivestEnum m : YiXinLivestEnum.values()) {
| EnumParamsVo enumParamsVo = new EnumParamsVo();
| enumParamsVo.setValue(m.getCode());
| enumParamsVo.setText(m.getValue());
| paramsVos.add(enumParamsVo);
| }
| return paramsVos;
| }
|
| public String getCode() {
| return code;
| }
|
| public void setCode(String code) {
| this.code = code;
| }
|
| public String getValue() {
| return value;
| }
|
| public void setValue(String value) {
| this.value = value;
| }
|
| }
|
|