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
43
44
45
46
47
48
49
50
51
52
53
54
55
| package com.matrix.system.enums;
|
| import com.google.common.collect.Lists;
| import com.matrix.core.enums.EnumApiShowAble;
| import com.matrix.core.enums.EnumsShowVo;
|
| import java.util.List;
| import java.util.stream.Collectors;
|
| /**
| * 支付方式
| * @author jyy
| */
| public enum PayMethodEnum implements EnumApiShowAble {
|
| CASH(1, "现金"),
| WECHAT(2, "微信"),
| ALIPAY(3, "支付宝"),
| BANK_CARD(4, "银行卡"),
| BANK_MT(5, "美团"),
| VIP_CARD(6, "会员卡");
|
| private Integer value;
|
| private String displayName;
|
| PayMethodEnum(Integer value, String displayName) {
| this.value = value;
| this.displayName = displayName;
| }
|
| @Override
| public String getEnumCode() {
| return "payMethod";
| }
|
| @Override
| public List<EnumsShowVo> getEnumsShowVos() {
| return Lists.newArrayList(values()).stream().map(item ->
| EnumsShowVo.builder()
| .displayName(item.getDisplayName())
| .value(item.value)
| .build()
| ).collect(Collectors.toList());
| }
|
| public Integer getValue() {
| return value;
| }
|
| public String getDisplayName() {
| return displayName;
| }
|
| }
|
|