| @@ -0,0 +1,38 @@ | |||||
| package com.iformall.enums; | |||||
| /** | |||||
| * Created by Stormeye on 2018/08/09. | |||||
| */ | |||||
| public enum EnumShopType { | |||||
| DIRECT_RUN(1, "直营店"), | |||||
| JOINED(2, "加盟店"), | |||||
| PERSONAL(3, "个体店"), | |||||
| FLAGSHOP(4, "旗舰店"), | |||||
| ; | |||||
| public static EnumShopType getEnum(Integer code) { | |||||
| for (EnumShopType value : values()) { | |||||
| if (value.getCode().equals(code)) { | |||||
| return value; | |||||
| } | |||||
| } | |||||
| return null; | |||||
| } | |||||
| private Integer code; | |||||
| private String message; | |||||
| EnumShopType(Integer code, String message) { | |||||
| this.code = code; | |||||
| this.message = message; | |||||
| } | |||||
| public Integer getCode() { | |||||
| return code; | |||||
| } | |||||
| public String getMessage() { | |||||
| return message; | |||||
| } | |||||
| } | |||||