Pu Zhibing
2025-01-24 fd45fcbd496bbeaf9ee18edd8f2f858cf9cebaf3
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/TechnicianStatus.java
New file
@@ -0,0 +1,26 @@
package com.ruoyi.other.enums;
import lombok.Getter;
@Getter
public enum TechnicianStatus {
    UNSUBSCRIBE(0, "待服务"),
    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;
    }
}