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
| package com.ruoyi.im.comm;
|
| /**
| * 支付产品枚举
| */
| public enum PayProduct {
| ALIPAY(8000, "支付宝"),
| WECHAT(8001, "微信");
|
| private final int code;
| private final String name;
|
| PayProduct(int code, String name) {
| this.code = code;
| this.name = name;
| }
|
| public int getCode() { return code; }
| public String getName() { return name; }
|
| public static PayProduct getByCode(int code) {
| for (PayProduct product : values()) {
| if (product.code == code) {
| return product;
| }
| }
| return null;
| }
| }
|
|