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())