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
| package com.dsh.activity.enums;
|
| /**
| * 玩湃惠民卡有效期类型枚举。
| *
| * @author Codex
| * @date 2026-09-04
| */
| public enum HuiminCardTypeEnum {
|
| /** 自购买日起有效一年 */
| ANNUAL_CARD(1),
|
| /** 有效期至当年年底 */
| CURRENT_YEAR_CARD(2);
|
| private final int code;
|
| HuiminCardTypeEnum(int code) {
| this.code = code;
| }
|
| /**
| * 判断卡类型编码是否匹配。
| *
| * @param type 卡类型编码
| * @return 匹配时返回 true
| */
| public boolean matches(Integer type) {
| return type != null && code == type;
| }
| }
|
|