parent
04d3700961
commit
9b44dd353e
4 changed files with 103 additions and 10 deletions
@ -0,0 +1,58 @@ |
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package org.springblade.common.enums; |
||||
|
||||
import lombok.AllArgsConstructor; |
||||
import lombok.Getter; |
||||
|
||||
/** |
||||
* 系统字典枚举类 |
||||
* |
||||
* @author Chill |
||||
*/ |
||||
@Getter |
||||
@AllArgsConstructor |
||||
public enum CarChannelEnum { |
||||
|
||||
|
||||
DEFAULT(1, "默认"), |
||||
NO_UNREGISTER(2, "不默认"), |
||||
; |
||||
|
||||
final Integer name; |
||||
|
||||
final String value; |
||||
|
||||
public static Integer getName(String val) { |
||||
for (ApmRecordStatusEnum value : ApmRecordStatusEnum.values()) { |
||||
if (value.getValue().equals(val)) { |
||||
return value.getName(); |
||||
} |
||||
} |
||||
return -1; |
||||
} |
||||
|
||||
public static String getValue(Integer name) { |
||||
for (ApmRecordStatusEnum value : ApmRecordStatusEnum.values()) { |
||||
if (value.getName().equals(name)) { |
||||
return value.getValue(); |
||||
} |
||||
} |
||||
return ""; |
||||
} |
||||
|
||||
} |
||||
Loading…
Reference in new issue