luodangjia
2024-12-16 a8d2cb07f6440dc54dc4005b0b06d5a47cb1517d
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/enums/TechnicianStatus.java
New file
@@ -0,0 +1,27 @@
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;
    }
}