All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dahuatech.icc.brm.enums.MenuTerminal Maven / Gradle / Ivy

There is a newer version: 1.0.13.7
Show newest version
/*
 *
 *  *********************** 版权声明 ***********************************
 *
 *  版权所有:浙江大华技术股份有限公司
 *  ©CopyRight DahuaTech 2019
 *
 *  *********************************************************************
 *
 */
package com.dahuatech.icc.brm.enums;

import java.util.Objects;

/**
 * 菜单所属终端
 */
public enum MenuTerminal {
    ADMIN(1),
    CLIENT(2),
    APP(3);

    private Integer value;

    MenuTerminal(Integer value) {
        this.value = value;
    }

    public Integer getValue() {
        return value;
    }

    public static String getName(Integer terminal){
        if(terminal == null){
            return null;
        }
        switch (terminal){
            case 1 :{
                return "管理端";
            }
            case 2:{
                return "客户端";
            }
            case 3:{
                return  "移动端";
            }
        }
        return null;
    }


    public static MenuTerminal forValue(Integer value){
        for (MenuTerminal menuTerminal : MenuTerminal.values()) {
            if(menuTerminal.getValue().equals(value)){
                return menuTerminal;
            }
        }
        return null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy