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
| package com.ruoyi.other.enums;
|
| import lombok.Getter;
|
| @Getter
| public enum TechnicianStatus {
| UNSUBSCRIBE(0, "待服务"),
| SERVE(1, "已服务"),
| CANCEL(2, "已取消");
| private final Integer code;
| private final String message;
|
| TechnicianStatus(Integer code, String message) {
| this.code = code;
| this.message = message;
| }
|
| public static String getMessage(Integer code) {
| for (TechnicianStatus value : TechnicianStatus.values()) {
| if (value.getCode().equals(code)) {
| return value.getMessage();
| }
| }
| return null;
| }
| }
|
|