12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- 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;
- import io.swagger.annotations.ApiModel;
- /**
- * 提货订单来源枚举类
- *
- * @author Cup
- * @date 2022/5/23
- */
- @ApiModel("提货订单来源枚举类")
- @JSONType(deserializer = EnumValueDeserializer.class)
- public enum DeliverOrderResourceEnum implements IEnum<Integer> {
- DELIVER(1, "提货订单"),
- PAYMENT(2, "现金购买");
- private final int value;
- private final String desc;
- DeliverOrderResourceEnum(int value, String desc) {
- this.value = value;
- this.desc = desc;
- }
- @Override
- public Integer getValue() {
- return value;
- }
- public String getDesc() {
- return desc;
- }
- @Override
- public String toString() {
- JSONObject object = new JSONObject();
- object.put("value", value);
- object.put("desc", desc);
- return object.toString();
- }
- }
|