SendModelEnum.java
1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.yoho.unions.constant;
public enum SendModelEnum {
ONLY_COUPON("1","只发优惠券"),ONLY_MONEY("2","只返现"),COUPON_AND_MONEY("3","优惠券和返现");
String code;
String desc;
private SendModelEnum(){}
SendModelEnum(String code, String desc) {
this.code = code;
this.desc = desc;
}
public String getCode() {
return code;
}
public static boolean containCoupon(String code) {
if ( ONLY_COUPON.getCode().equals(code) || COUPON_AND_MONEY.getCode().equals(code)) {
return true;
}
return false;
}
public static boolean containMoney(String code) {
if ( ONLY_MONEY.getCode().equals(code) || COUPON_AND_MONEY.getCode().equals(code)) {
return true;
}
return false;
}
public void setCode(String code) {
this.code = code;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
}