New file |
| | |
| | | package com.ruoyi.other.enums; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | @Getter |
| | | public enum TechnicianStatus { |
| | | UNSUBSCRIBE(0, "待服务"), |
| | | SERVE(1, "已服务"), |
| | | CANCEL(2, "已取消"), |
| | | EXPIRED(3, "已到期"); |
| | | 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; |
| | | } |
| | | } |