refactor(APP): APP 装修配置优化

This commit is contained in:
冷冷 committed 2025-03-09 20:57:06 +08:00
1 parent fcb8003f21
commit 40359afcd1
4 files changed
+147 -65

No files matched your search

@@ -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;
}
}