修改 MenuType。
parent
79466d180f
commit
7077b84317
|
@ -17,7 +17,6 @@ import org.springframework.stereotype.Repository;
|
||||||
import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
|
|
||||||
import cn.hutool.core.util.IdUtil;
|
import cn.hutool.core.util.IdUtil;
|
||||||
import xyz.zhouxy.plusone.commons.util.EnumUtil;
|
|
||||||
import xyz.zhouxy.plusone.constant.EntityStatus;
|
import xyz.zhouxy.plusone.constant.EntityStatus;
|
||||||
import xyz.zhouxy.plusone.exception.DataNotExistException;
|
import xyz.zhouxy.plusone.exception.DataNotExistException;
|
||||||
import xyz.zhouxy.plusone.jdbc.JdbcRepositorySupport;
|
import xyz.zhouxy.plusone.jdbc.JdbcRepositorySupport;
|
||||||
|
@ -156,7 +155,7 @@ public class MenuRepositoryImpl extends JdbcRepositorySupport<Menu, Long> implem
|
||||||
protected final Menu mapRow(ResultSet rs) throws SQLException {
|
protected final Menu mapRow(ResultSet rs) throws SQLException {
|
||||||
long menuId = rs.getLong("id");
|
long menuId = rs.getLong("id");
|
||||||
return new Menu(
|
return new Menu(
|
||||||
EnumUtil.valueOf(MenuType.class, rs.getInt("type")),
|
MenuType.valueOf(rs.getInt("type")),
|
||||||
menuId,
|
menuId,
|
||||||
rs.getLong("parent_id"),
|
rs.getLong("parent_id"),
|
||||||
rs.getString("name"),
|
rs.getString("name"),
|
||||||
|
@ -181,7 +180,7 @@ public class MenuRepositoryImpl extends JdbcRepositorySupport<Menu, Long> implem
|
||||||
return new MapSqlParameterSource()
|
return new MapSqlParameterSource()
|
||||||
.addValue("id", id)
|
.addValue("id", id)
|
||||||
.addValue("parentId", entity.getParentId())
|
.addValue("parentId", entity.getParentId())
|
||||||
.addValue("type", entity.getType().value())
|
.addValue("type", entity.getType().getCode())
|
||||||
.addValue("name", entity.getName())
|
.addValue("name", entity.getName())
|
||||||
.addValue("path", entity.getPath())
|
.addValue("path", entity.getPath())
|
||||||
.addValue("title", entity.getTitle())
|
.addValue("title", entity.getTitle())
|
||||||
|
|
Loading…
Reference in New Issue