From 7077b8431778b5b42553a64493e3269926be5295 Mon Sep 17 00:00:00 2001 From: ZhouXY108 Date: Thu, 29 Jun 2023 01:44:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20MenuType=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plusone/system/domain/model/menu/MenuRepositoryImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plusone-system/plusone-system-infrastructure/src/main/java/xyz/zhouxy/plusone/system/domain/model/menu/MenuRepositoryImpl.java b/plusone-system/plusone-system-infrastructure/src/main/java/xyz/zhouxy/plusone/system/domain/model/menu/MenuRepositoryImpl.java index e09fa0d..20c1be1 100644 --- a/plusone-system/plusone-system-infrastructure/src/main/java/xyz/zhouxy/plusone/system/domain/model/menu/MenuRepositoryImpl.java +++ b/plusone-system/plusone-system-infrastructure/src/main/java/xyz/zhouxy/plusone/system/domain/model/menu/MenuRepositoryImpl.java @@ -17,7 +17,6 @@ import org.springframework.stereotype.Repository; import org.springframework.util.CollectionUtils; import cn.hutool.core.util.IdUtil; -import xyz.zhouxy.plusone.commons.util.EnumUtil; import xyz.zhouxy.plusone.constant.EntityStatus; import xyz.zhouxy.plusone.exception.DataNotExistException; import xyz.zhouxy.plusone.jdbc.JdbcRepositorySupport; @@ -156,7 +155,7 @@ public class MenuRepositoryImpl extends JdbcRepositorySupport implem protected final Menu mapRow(ResultSet rs) throws SQLException { long menuId = rs.getLong("id"); return new Menu( - EnumUtil.valueOf(MenuType.class, rs.getInt("type")), + MenuType.valueOf(rs.getInt("type")), menuId, rs.getLong("parent_id"), rs.getString("name"), @@ -181,7 +180,7 @@ public class MenuRepositoryImpl extends JdbcRepositorySupport implem return new MapSqlParameterSource() .addValue("id", id) .addValue("parentId", entity.getParentId()) - .addValue("type", entity.getType().value()) + .addValue("type", entity.getType().getCode()) .addValue("name", entity.getName()) .addValue("path", entity.getPath()) .addValue("title", entity.getTitle())