mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-14 14:19:08 +08:00
refactor(APP): APP 装修配置优化
This commit is contained in:
1 parent
fcb8003f21
commit
40359afcd1
4 files changed
+147
-65
No files matched your search
+54
@@ -0,0 +1,54 @@
|
||||
package com.pig4cloud.pigx.app.api.enums;
|
||||
|
||||
/**
|
||||
* 页面类型枚举
|
||||
*
|
||||
* @author lengleng
|
||||
* @date 2024/12/22
|
||||
*/
|
||||
public enum PageTypeEnums {
|
||||
/**
|
||||
* 首页
|
||||
*/
|
||||
HOME(1, "首页装修"),
|
||||
/**
|
||||
* 个人中心
|
||||
*/
|
||||
USER(2, "个人中心"),
|
||||
/**
|
||||
* 客服设置
|
||||
*/
|
||||
SERVICE(3, "客服设置");
|
||||
|
||||
private final Integer pageType;
|
||||
|
||||
private final String name;
|
||||
|
||||
PageTypeEnums(Integer pageType, String name) {
|
||||
this.pageType = pageType;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* 按类型获取名称
|
||||
*
|
||||
* @param pageType 页面类型
|
||||
* @return {@link String }
|
||||
*/
|
||||
public static String getNameByType(Integer pageType) {
|
||||
for (PageTypeEnums value : PageTypeEnums.values()) {
|
||||
if (value.pageType.equals(pageType)) {
|
||||
return value.name;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public Integer getPageType() {
|
||||
return pageType;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user