Commit 4299c2f7 authored by machengbo's avatar machengbo

no message

parent 64b65468
package com.jz.common.enums;
/**
* 订单方式
*
* @author Bellamy
* @since 2020-12-09 14:30:23
*/
public enum OrderMethodEnum {
/**
* 年
*/
YEAR("YEAR", "01"),
/**
* 季
*/
SEASON("SEASON", "02"),
/**
* 月
*/
MONTH("MONTH", "03"),
/**
* 月
*/
SECOND("SECOND", "04"),
;
private String code;
private String value;
OrderMethodEnum(String code, String value) {
this.code = code;
this.value = value;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public static OrderMethodEnum get(String code) {
if (code == null) {
return null;
}
for (OrderMethodEnum status : values()) {
if (status.getCode().equalsIgnoreCase(code)) {
return status;
}
}
return null;
}
}
package com.jz.common.enums;
/**
* 支付方式
*
* @author Bellamy
* @since 2020-12-09 14:30:23
*/
public enum PaymentMethodEnum {
/**
* 余额
*/
YE("YE", "01"),
/**
* 支付宝
*/
ZFB("ZFB", "02"),
/**
* 微信
*/
WX("WX", "03"),
/**
* 其他
*/
OTHER("OTHER", "04"),
;
private String code;
private String value;
PaymentMethodEnum(String code, String value) {
this.code = code;
this.value = value;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public static PaymentMethodEnum get(String code) {
if (code == null) {
return null;
}
for (PaymentMethodEnum status : values()) {
if (status.getCode().equalsIgnoreCase(code)) {
return status;
}
}
return null;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment