| | |
| | | import com.google.common.collect.Lists; |
| | | import com.matrix.core.enums.EnumApiShowAble; |
| | | import com.matrix.core.enums.EnumsShowVo; |
| | | import com.matrix.core.exception.GlobleException; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 操作功能枚举 |
| | | * |
| | | * @author jyy |
| | | */ |
| | | public enum OperationFunctionEnum implements EnumApiShowAble { |
| | | |
| | | ORDER(1, "订单"), |
| | | SERVICE_ORDER(2, "服务单"), |
| | | VIP_PROJECT(3, "会员套餐卡项"), |
| | | VIP_CARD(4, "会员卡"); |
| | | ; |
| | | |
| | | private Integer value; |
| | | |
| | |
| | | ).collect(Collectors.toList()); |
| | | } |
| | | |
| | | public static String getByValue(Integer value) { |
| | | for (int i = 0; i < values().length; i++) { |
| | | if (value.equals(values()[i].getValue())) { |
| | | return values()[i].displayName; |
| | | } |
| | | } |
| | | throw new GlobleException("无效枚举值"); |
| | | } |
| | | |
| | | |
| | | public Integer getValue() { |
| | | return value; |
| | | } |