对比新文件 |
| | |
| | | package com.gk.firework.Domain.Enum; |
| | | |
| | | import com.baomidou.mybatisplus.core.enums.IEnum; |
| | | import com.fasterxml.jackson.annotation.JsonValue; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | public enum EnterpriseStatus implements IEnum { |
| | | |
| | | OFF("OFF","停止"), |
| | | ON("ON","正常"); |
| | | EnterpriseStatus(String code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | private String code; |
| | | @JsonValue |
| | | private String msg; |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | public static EnterpriseStatus parse(String code){ |
| | | for(EnterpriseStatus es:EnterpriseStatus.values()){ |
| | | if(es.getCode().equals(code)){ |
| | | return es; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public Serializable getValue() { |
| | | return this.code; |
| | | } |
| | | } |