提交 bbdbbcab 编写于 作者: S sanluan

登录跳转rest风格页面路径错误修复

上级 049000c8
......@@ -166,6 +166,16 @@ public class IndexController {
String loginPath = config.get(LoginConfigComponent.CONFIG_LOGIN_PATH);
StringBuilder sb = new StringBuilder(UrlBasedViewResolver.REDIRECT_URL_PREFIX);
if (CommonUtils.notEmpty(loginPath)) {
if (null != id) {
int index = requestPath.lastIndexOf(CommonConstants.DOT);
if (0 < index) {
requestPath = requestPath.substring(0, index);
}
requestPath = requestPath + CommonConstants.SEPARATOR + id;
if (null != pageIndex) {
requestPath = requestPath + CommonConstants.UNDERLINE + pageIndex;
}
}
return sb.append(loginPath).append("?returnUrl=")
.append(RequestUtils.getEncodePath(requestPath, request.getQueryString())).toString();
} else {
......
......@@ -226,8 +226,12 @@ public class CmsContentDao extends BaseDao<CmsContent> {
} else if (CommonUtils.notEmpty(queryEntitry.getCategoryId())) {
queryHandler.condition("bean.categoryId = :categoryId").setParameter("categoryId", queryEntitry.getCategoryId());
}
if (null != queryEntitry.getEmptyParent() && queryEntitry.getEmptyParent()) {
queryHandler.condition("bean.parentId is null");
if (null != queryEntitry.getEmptyParent()) {
if(queryEntitry.getEmptyParent()) {
queryHandler.condition("bean.parentId is null");
}else {
queryHandler.condition("bean.parentId is not null");
}
}
}
if (null != queryEntitry.getDisabled()) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册