|
- package com.iformall.enums;
-
- /**
- * app平台
- * @author alascor
- */
- public enum EnumAppPlat {
- WX(1,"微信"),ALI(2,"阿里"),TOUTIAO(3,"头条");
-
- EnumAppPlat(Integer code, String name) {
- this.code = code;
- this.name = name;
- }
-
- private Integer code;
- private String name;
- public Integer getCode() {
- return code;
- }
- public void setCode(Integer code) {
- this.code = code;
- }
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
-
- public static EnumAppPlat getByCode(Integer code) {
- for (EnumAppPlat e : EnumAppPlat.values()) {
- if (e.getCode().intValue() == code.intValue()) {
- return e;
- }
- }
- return null;
- }
- }
|