对比新文件 |
| | |
| | | package com.gk.firework.Domain.Enum; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.EnumValue; |
| | | import com.baomidou.mybatisplus.core.enums.IEnum; |
| | | import com.fasterxml.jackson.annotation.JsonValue; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | |
| | | public enum ApplyStatus implements IEnum { |
| | | APPROVING("APPROVING", "待审批"), |
| | | PASS("PASS", "通过"), |
| | | REFUSE("REFUSE","拒绝"); |
| | | |
| | | private String code; |
| | | |
| | | private String msg; |
| | | |
| | | ApplyStatus(String code, String msg) { |
| | | this.code = code; |
| | | this.msg = msg; |
| | | } |
| | | |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | @JsonValue |
| | | public String getMsg() { |
| | | return msg; |
| | | } |
| | | |
| | | |
| | | |
| | | public static ApplyStatus parse(String code){ |
| | | for(ApplyStatus as:ApplyStatus.values()){ |
| | | if(as.getCode().equals(code)){ |
| | | return as; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public Serializable getValue() { |
| | | return this.code; |
| | | } |
| | | } |