123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- package com.qs.mp.common.enums;
- import com.alibaba.fastjson.JSONObject;
- import com.alibaba.fastjson.annotation.JSONType;
- import com.baomidou.mybatisplus.annotation.IEnum;
- import com.qs.mp.common.json.EnumValueDeserializer;
- /**
- *
- * 盲票组上下架状态
- *
- */
- @JSONType(deserializer = EnumValueDeserializer.class)
- public enum TicketBoxStatusEnum implements IEnum<String> {
- WAIT("wait", "待出票"),
- DOING("doing", "出票中"),
- DONE("done", "待上架"),
- PUT_ON("on", "已上架"),
- PUT_OFF("off", "已下架"),
- STOP("stop","已停售");
- private final String value;
- private final String desc;
- TicketBoxStatusEnum(final String value, final String desc) {
- this.value = value;
- this.desc = desc;
- }
- @Override
- public String getValue() {
- return value;
- }
- /**
- * 重写toString,单个转化成json
- * @return
- */
- @Override
- public String toString() {
- JSONObject object = new JSONObject();
- object.put("value",value);
- object.put("desc", desc);
- return object.toString();
- }
- }
|