페이지 타이틀 쿼리 오류 수정.
parent
8313c57024
commit
aa4c298b14
|
|
@ -52,11 +52,9 @@ public class CommonAop {
|
||||||
LogService logService;
|
LogService logService;
|
||||||
|
|
||||||
@Around("execution(* kcg.faics..*Controller.*(..))")
|
@Around("execution(* kcg.faics..*Controller.*(..))")
|
||||||
public Object menuGenerator(final ProceedingJoinPoint thisJoinPoint)
|
public Object menuGenerator(final ProceedingJoinPoint thisJoinPoint) throws Throwable {
|
||||||
throws Throwable {
|
|
||||||
|
|
||||||
HttpServletRequest req = ((ServletRequestAttributes) RequestContextHolder
|
HttpServletRequest req = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
||||||
.getRequestAttributes()).getRequest();
|
|
||||||
String loginUrl = "/loginView.do";
|
String loginUrl = "/loginView.do";
|
||||||
String url = req.getRequestURI();
|
String url = req.getRequestURI();
|
||||||
|
|
||||||
|
|
@ -125,7 +123,7 @@ public class CommonAop {
|
||||||
menu.put("query", qryCate);
|
menu.put("query", qryCate);
|
||||||
|
|
||||||
HashMap<String, Object> menuInfo = menuService.getMenuInfo(menu);
|
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());
|
menuInfo.put("userId", loginUserVO.getUserid());
|
||||||
|
|
||||||
List<MenuVO> currAndHigherMenuList = menuService.selectListWithHigher(menuVO);
|
List<MenuVO> currAndHigherMenuList = menuService.selectListWithHigher(menuVO);
|
||||||
|
|
@ -140,8 +138,7 @@ public class CommonAop {
|
||||||
// e.printStackTrace();
|
// e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
Object proc = thisJoinPoint.proceed();
|
return thisJoinPoint.proceed();
|
||||||
return proc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -84,12 +84,11 @@ public class MenuServiceImpl implements MenuService {
|
||||||
public HashMap<String, Object> getMenuInfo(final HashMap<String, Object> menu) {
|
public HashMap<String, Object> getMenuInfo(final HashMap<String, Object> menu) {
|
||||||
|
|
||||||
HashMap<String, Object> paramMenu = menuMapper.getMenuInfo(menu);
|
HashMap<String, Object> paramMenu = menuMapper.getMenuInfo(menu);
|
||||||
|
|
||||||
int depth = ((BigDecimal) paramMenu.get("DEPTH")).intValue();
|
if ((Double)paramMenu.get("depth") < 3.0d) {
|
||||||
if (depth < 3) {
|
|
||||||
return paramMenu;
|
return paramMenu;
|
||||||
} else {
|
} else {
|
||||||
menu.put("id", ((BigDecimal) paramMenu.get("PARENT")).intValue());
|
menu.put("id", ((BigDecimal) paramMenu.get("parent")).intValue());
|
||||||
return menuMapper.getMenuInfoById(menu);
|
return menuMapper.getMenuInfoById(menu);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -97,25 +97,17 @@
|
||||||
</select>
|
</select>
|
||||||
<!---->
|
<!---->
|
||||||
<select id="Menu.getMenuInfo" parameterType="map" resultType="map">
|
<select id="Menu.getMenuInfo" parameterType="map" resultType="map">
|
||||||
<![CDATA[
|
SELECT *
|
||||||
SELECT * FROM (
|
FROM T_MENU
|
||||||
SELECT
|
WHERE URL_GROUP = #{group}
|
||||||
*
|
AND URL = #{url}
|
||||||
FROM
|
<if test="boardId != null and boardId != ''">
|
||||||
T_MENU
|
AND BOARD_ID = #{boardId}
|
||||||
WHERE
|
</if>
|
||||||
URL_GROUP = #{group} AND
|
<if test="query != null and query != ''">
|
||||||
URL = #{url}
|
AND URL_QUERY = #{query}
|
||||||
]]>
|
</if>
|
||||||
<if test="boardId != null and boardId != ''"><![CDATA[
|
limit 1
|
||||||
AND BOARD_ID = #{boardId}
|
|
||||||
]]></if>
|
|
||||||
<if test="query != null and query != ''"><![CDATA[
|
|
||||||
AND URL_QUERY = #{query}
|
|
||||||
]]></if>
|
|
||||||
<![CDATA[
|
|
||||||
) WHERE ROWNUM = 1
|
|
||||||
]]>
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="Menu.getMenuInfoById" parameterType="map" resultType="map">
|
<select id="Menu.getMenuInfoById" parameterType="map" resultType="map">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue