13 changed files with 21 additions and 174 deletions
@ -1,65 +0,0 @@ |
|||
package com.elink.esua.epdc.enums; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.NumConstant; |
|||
|
|||
/** |
|||
* 模块分类枚举 |
|||
* |
|||
* @author zhangyong |
|||
* @date 09:46 2020-05-19 |
|||
*/ |
|||
public enum ModuleCategoryEnum { |
|||
/** |
|||
* 0 政策导航 |
|||
*/ |
|||
MODULE_NAVIGATION("module_navigation", NumConstant.ZERO_STR), |
|||
/** |
|||
* 1 印象 |
|||
*/ |
|||
MODULE_IMPRESSION("module_impression", NumConstant.ONE_STR), |
|||
/** |
|||
* 2 味道 |
|||
*/ |
|||
MODULE_TASTE("module_taste", NumConstant.TWO_STR), |
|||
/** |
|||
* 3 硬核 |
|||
*/ |
|||
MODULE_HARDCORE("module_hardcore", NumConstant.THREE_STR), |
|||
/** |
|||
* 4 档案 |
|||
*/ |
|||
MODULE_FILE("module_file", NumConstant.FOUR_STR); |
|||
|
|||
private String name; |
|||
private String index; |
|||
|
|||
ModuleCategoryEnum(String name, String index) { |
|||
this.name = name; |
|||
this.index = index; |
|||
} |
|||
|
|||
public static String getName(String index) { |
|||
for (ModuleCategoryEnum c : ModuleCategoryEnum.values()) { |
|||
if (c.getIndex().equals(index)) { |
|||
return c.name; |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
public static String getIndex(String name) { |
|||
for (ModuleCategoryEnum c : ModuleCategoryEnum.values()) { |
|||
if (c.getName().equals(name)) { |
|||
return c.index; |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
public String getIndex() { |
|||
return index; |
|||
} |
|||
} |
@ -1,72 +0,0 @@ |
|||
package com.elink.esua.epdc.enums; |
|||
|
|||
import com.elink.esua.epdc.commons.tools.constant.NumConstant; |
|||
|
|||
/** |
|||
* 消息通知分类枚举 |
|||
* |
|||
* @author zhangyong |
|||
* @date 09:46 2020-05-19 |
|||
*/ |
|||
public enum AppNoticeCategoryEnum { |
|||
|
|||
/** |
|||
* 1 印象 |
|||
*/ |
|||
NOTICE_IMPRESSION("notice_impression", NumConstant.ONE_STR), |
|||
/** |
|||
* 2 味道 |
|||
*/ |
|||
NOTICE_TASTE("notice_taste", NumConstant.TWO_STR), |
|||
/** |
|||
* 3 硬核 |
|||
*/ |
|||
NOTICE_HARDCORE("notice_hardcore", NumConstant.THREE_STR), |
|||
/** |
|||
* 4 档案 |
|||
*/ |
|||
NOTICE_FILE("notice_file", NumConstant.FOUR_STR), |
|||
|
|||
/** |
|||
* 5 政策导航-最新通知 |
|||
*/ |
|||
NOTICE_NAVIGATION_NEW("notice_navigation_new", NumConstant.FIVE_STR), |
|||
|
|||
/** |
|||
* 6 政策导航-最热政策 |
|||
*/ |
|||
NOTICE_NAVIGATION_HOT("notice_navigation_hot", NumConstant.SIX_STR); |
|||
|
|||
private String name; |
|||
private String index; |
|||
|
|||
AppNoticeCategoryEnum(String name, String index) { |
|||
this.name = name; |
|||
this.index = index; |
|||
} |
|||
|
|||
public static String getName(String index) { |
|||
for (AppNoticeCategoryEnum c : AppNoticeCategoryEnum.values()) { |
|||
if (c.getIndex().equals(index)) { |
|||
return c.name; |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
public static String getIndex(String name) { |
|||
for (AppNoticeCategoryEnum c : AppNoticeCategoryEnum.values()) { |
|||
if (c.getName().equals(name)) { |
|||
return c.index; |
|||
} |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
public String getName() { |
|||
return name; |
|||
} |
|||
public String getIndex() { |
|||
return index; |
|||
} |
|||
} |
Loading…
Reference in new issue