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
package com.tanpu.fund.enums;
import org.apache.commons.lang3.StringUtils;
/**
* @author: zhoupeng
* @email: zhoupeng_08@163.com
*/
public enum FundStatusEnum {
FUND_RAISING("1", "募集中"),
START_RUNING("2", "开放运行"),
CLOSED_OPERATION("3", "封闭运行"),
ADVANCE_CLEAR("4", "提前清算"),
EXPIRE_CLEAR("5", "到期清算"),
RELEASE_FAILURE("6", "发行失败"),
CHANGE_MANAGER("7", "更换管理人"),
OTHER("-1", "其他"),
;
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;
}
private String code;
private String value;
FundStatusEnum(String code, String value) {
this.code = code;
this.value = value;
}
public static String getName(String code) {
if (StringUtils.isBlank(code)) {
return "";
}
FundStatusEnum[] types = values();
for (FundStatusEnum p : types) {
if (code.equals(p.getCode())) {
return p.getValue();
}
}
return null;
}
}