瀏覽代碼

获取登录用户的信息

wanggaokun 1 月之前
父節點
當前提交
03d157809f

+ 10 - 0
eco-common/com-core/src/main/java/org/eco/vip/orm/constant/Constants.java

@@ -24,6 +24,16 @@ public class Constants {
      */
     public static final String DISABLE = "0";
 
+    /**
+     * 是
+     */
+    public static final String YES = "1";
+
+    /**
+     * 否
+     */
+    public static final String NO = "0";
+
     /**
      * 校验是否唯一的返回标识
      */

+ 5 - 4
eco-nexus-core/auth-biz/src/main/java/org/eco/vip/auth/service/menu/MenuService.java

@@ -21,6 +21,7 @@ import org.eco.vip.auth.mapper.MenuMapper;
 import org.eco.vip.auth.mapper.RoleMenuMapper;
 import org.eco.vip.auth.service.role.IRoleService;
 import org.eco.vip.auth.service.user.IUserService;
+import org.eco.vip.orm.constant.Constants;
 import org.eco.vip.orm.enums.MenuTypeEnum;
 import org.eco.vip.orm.pojo.PageResult;
 import org.eco.vip.orm.service.BaseService;
@@ -135,10 +136,10 @@ public class MenuService extends BaseService<MenuMapper, Menu> implements IMenuS
             JSONObject meta = JsonUtils.createObj();
             meta.set("icon", menuVO.getIcon());
             meta.set("isLink", StrUtils.equals(MenuTypeEnum.LINK.getValue(), menuVO.getMenuType()));
-            meta.set("isHidden", menuVO.getVisible());
-            meta.set("isFull", menuVO.getDisplayLayout());
-            meta.set("isAffix", menuVO.getAffix());
-            meta.set("isKeepAlive", menuVO.getKeepLive());
+            meta.set("isHidden", StrUtils.equals(Constants.YES, menuVO.getVisible()));
+            meta.set("isFull", !StrUtils.equals(Constants.YES, menuVO.getDisplayLayout()));
+            meta.set("isAffix", StrUtils.equals(Constants.YES, menuVO.getAffix()));
+            meta.set("isKeepAlive", StrUtils.equals(Constants.YES, menuVO.getKeepLive()));
             meta.set("title", menuVO.getTitle());
             menu.set("meta", meta);
             return menu;

+ 1 - 1
eco-start/src/main/resources/db/mysql/V1_0_0_1__sys-init-ddl.sql

@@ -87,7 +87,7 @@ CREATE TABLE `system_menu_t`
 -- Records of system_menu_t
 -- ----------------------------
 INSERT INTO `system_menu_t`
-VALUES ('71807970486000184', '0', '首页', 'Heme', 'M', '/system/home/index', '/system/home/index', '', 'home', '1', '1',
+VALUES ('71807970486000184', '0', '首页', 'Heme', 'M', '/home', '/home/index', '', 'home', '1', '1',
         '1', '1', 0, '1', '1', 0, '0', '1', '2025-07-11 15:40:30', '1', '2025-07-11 15:40:30', NULL);
 INSERT INTO `system_menu_t`
 VALUES ('71808051400000125', '0', '权限控制', 'Auth', 'C', '', '', '', 'auth', '1', '1', '', '1', 1, '1', '1', 0, '0',