diff --git a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/enums/PayTypeEnum.java b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/enums/PayTypeEnum.java index 444bc3037..0e874dfb3 100644 --- a/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/enums/PayTypeEnum.java +++ b/mall-oms/oms-api/src/main/java/com/youlai/mall/oms/enums/PayTypeEnum.java @@ -1,41 +1,30 @@ package com.youlai.mall.oms.enums; +import com.youlai.common.base.IBaseEnum; import lombok.Getter; /** * @author huawei - * @desc 订单来源类型枚举 + * @desc 订单支付类型枚举 * @email huawei_code@163.com * @date 2021/1/16 */ -public enum PayTypeEnum { +public enum PayTypeEnum implements IBaseEnum { - WEIXIN_JSAPI(1,"微信JSAPI支付"), - ALIPAY(2,"支付宝支付"), - BALANCE(3,"会员余额支付"), - WEIXIN_APP(4,"微信APP支付"); + WX_JSAPI(1, "微信JSAPI支付"), + ALIPAY(2, "支付宝支付"), + BALANCE(3, "会员余额支付"), + WX_APP(4, "微信APP支付"); - PayTypeEnum(int code, String text) { - this.code = code; - this.text = text; + PayTypeEnum(int value, String label) { + this.value = value; + this.label = label; } @Getter - private Integer code; + private Integer value; @Getter - private String text; - - public static PayTypeEnum getByCode(Integer code) { - PayTypeEnum payTypeEnum = null; - - for (PayTypeEnum value : values()) { - if (value.getCode().equals(code)) { - payTypeEnum = value; - } - } - return payTypeEnum; - } - + private String label; }