public enum NoticeTypeEnum { //通知类型1:月结收费 2:欠费催缴 3:欠费断能 MONTH_SETTLE(1, "月结收费"), ARREARS_REMINDER(2, "欠费催缴"), ARREARS_OFF(3, "欠费断能"); @EnumValue private int code;
@JsonValue
private String desc;
NoticeTypeEnum(int code, String desc) {
this.code = code;
this.desc = desc;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
}
@ColumnWidth(35) @ExcelProperty(value = "通知单类型",index = 2) @ApiModelProperty(value = "通知单类型", name = "noticeType") private NoticeTypeEnum noticeType;
实现导出时导出的是枚举的desc