페이지 타이틀 쿼리 오류 수정.

master
강석 최 2022-04-05 10:11:52 +09:00
parent 8313c57024
commit aa4c298b14
3 changed files with 18 additions and 30 deletions

View File

@ -52,11 +52,9 @@ public class CommonAop {
LogService logService;
@Around("execution(* kcg.faics..*Controller.*(..))")
public Object menuGenerator(final ProceedingJoinPoint thisJoinPoint)
throws Throwable {
public Object menuGenerator(final ProceedingJoinPoint thisJoinPoint) throws Throwable {
HttpServletRequest req = ((ServletRequestAttributes) RequestContextHolder
.getRequestAttributes()).getRequest();
HttpServletRequest req = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String loginUrl = "/loginView.do";
String url = req.getRequestURI();
@ -125,7 +123,7 @@ public class CommonAop {
menu.put("query", qryCate);
HashMap<String, Object> menuInfo = menuService.getMenuInfo(menu);
menuVO.setId(Integer.parseInt(menuInfo.get("ID").toString()));
menuVO.setId(((Double)menuInfo.get("id")).intValue());
menuInfo.put("userId", loginUserVO.getUserid());
List<MenuVO> currAndHigherMenuList = menuService.selectListWithHigher(menuVO);
@ -140,8 +138,7 @@ public class CommonAop {
// e.printStackTrace();
}
Object proc = thisJoinPoint.proceed();
return proc;
return thisJoinPoint.proceed();
}
/**

View File

@ -84,12 +84,11 @@ public class MenuServiceImpl implements MenuService {
public HashMap<String, Object> getMenuInfo(final HashMap<String, Object> menu) {
HashMap<String, Object> paramMenu = menuMapper.getMenuInfo(menu);
int depth = ((BigDecimal) paramMenu.get("DEPTH")).intValue();
if (depth < 3) {
if ((Double)paramMenu.get("depth") < 3.0d) {
return paramMenu;
} else {
menu.put("id", ((BigDecimal) paramMenu.get("PARENT")).intValue());
menu.put("id", ((BigDecimal) paramMenu.get("parent")).intValue());
return menuMapper.getMenuInfoById(menu);
}
}

View File

@ -97,25 +97,17 @@
</select>
<!---->
<select id="Menu.getMenuInfo" parameterType="map" resultType="map">
<![CDATA[
SELECT * FROM (
SELECT
*
FROM
T_MENU
WHERE
URL_GROUP = #{group} AND
URL = #{url}
]]>
<if test="boardId != null and boardId != ''"><![CDATA[
AND BOARD_ID = #{boardId}
]]></if>
<if test="query != null and query != ''"><![CDATA[
AND URL_QUERY = #{query}
]]></if>
<![CDATA[
) WHERE ROWNUM = 1
]]>
SELECT *
FROM T_MENU
WHERE URL_GROUP = #{group}
AND URL = #{url}
<if test="boardId != null and boardId != ''">
AND BOARD_ID = #{boardId}
</if>
<if test="query != null and query != ''">
AND URL_QUERY = #{query}
</if>
limit 1
</select>
<select id="Menu.getMenuInfoById" parameterType="map" resultType="map">