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;
|
}
|
|
}
|