Commit 72a69964 authored by 铭飞's avatar 铭飞 Committed by Gitee

!228 修复bug

Merge pull request !228 from 灰色DT/5.0.1
parents db98d5aa 0a2f344b
This diff is collapsed.
...@@ -139,6 +139,7 @@ public class CmsParserUtil extends ParserUtil { ...@@ -139,6 +139,7 @@ public class CmsParserUtil extends ParserUtil {
if (ParserUtil.hasMobileFile(column.getCategoryListUrl())) { if (ParserUtil.hasMobileFile(column.getCategoryListUrl())) {
writer = new StringWriter(); writer = new StringWriter();
mobileTemplate.process(null, writer); mobileTemplate.process(null, writer);
parserParams.put(ParserUtil.MOBILE, BasicUtil.getApp().getAppMobileStyle());
tag = new TagParser(writer.toString(), parserParams); tag = new TagParser(writer.toString(), parserParams);
// 将tag.getContent()写入路径 // 将tag.getContent()写入路径
FileUtil.writeString(tag.rendering(), mobilePath, Const.UTF8); FileUtil.writeString(tag.rendering(), mobilePath, Const.UTF8);
...@@ -170,6 +171,7 @@ public class CmsParserUtil extends ParserUtil { ...@@ -170,6 +171,7 @@ public class CmsParserUtil extends ParserUtil {
if (ParserUtil.hasMobileFile(column.getCategoryListUrl())) { if (ParserUtil.hasMobileFile(column.getCategoryListUrl())) {
writer = new StringWriter(); writer = new StringWriter();
mobileTemplate.process(null, writer); mobileTemplate.process(null, writer);
parserParams.put(ParserUtil.MOBILE, BasicUtil.getApp().getAppMobileStyle());
tag = new TagParser(writer.toString(),parserParams); tag = new TagParser(writer.toString(),parserParams);
// 将tag.getContent()写入路径 // 将tag.getContent()写入路径
FileUtil.writeString(tag.rendering(), mobilePath, Const.UTF8); FileUtil.writeString(tag.rendering(), mobilePath, Const.UTF8);
...@@ -227,7 +229,7 @@ public class CmsParserUtil extends ParserUtil { ...@@ -227,7 +229,7 @@ public class CmsParserUtil extends ParserUtil {
} }
// 判断文件是否存在,若不存在弹出返回信息 // 判断文件是否存在,若不存在弹出返回信息
if (!FileUtil.exist(ParserUtil.buildTempletPath(columnUrl))||StringUtils.isBlank(articleIdList.get(artId).getCategoryId())||articleIdList.get(artId).getCategoryType()==null) { if (!FileUtil.exist(ParserUtil.buildTempletPath(columnUrl))||articleIdList.get(artId).getCategoryId()==null||articleIdList.get(artId).getCategoryType()==null) {
artId++; artId++;
continue; continue;
} }
......
...@@ -42,6 +42,21 @@ public class ShiroConfig { ...@@ -42,6 +42,21 @@ public class ShiroConfig {
return authorizationAttributeSourceAdvisor; return authorizationAttributeSourceAdvisor;
} }
@Bean
public AuthorizationAttributeSourceAdvisor getAuthorizationAttributeSourceAdvisor(
DefaultWebSecurityManager securityManager) {
AuthorizationAttributeSourceAdvisor advisor = new AuthorizationAttributeSourceAdvisor();
advisor.setSecurityManager(securityManager);
return advisor;
}
@Bean
public DefaultAdvisorAutoProxyCreator getDefaultAdvisorAutoProxyCreator() {
DefaultAdvisorAutoProxyCreator autoProxyCreator = new DefaultAdvisorAutoProxyCreator();
autoProxyCreator.setProxyTargetClass(true);
return autoProxyCreator;
}
@Bean @Bean
public ShiroFilterFactoryBean shirFilter(SecurityManager securityManager) { public ShiroFilterFactoryBean shirFilter(SecurityManager securityManager) {
ShiroFilterFactoryBean shiroFilterFactoryBean = new ShiroFilterFactoryBean(); ShiroFilterFactoryBean shiroFilterFactoryBean = new ShiroFilterFactoryBean();
......
...@@ -2,6 +2,6 @@ spring: ...@@ -2,6 +2,6 @@ spring:
datasource: datasource:
url: jdbc:mysql://localhost:3306/db-mcms-open?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai url: jdbc:mysql://localhost:3306/db-mcms-open?autoReconnect=true&useUnicode=true&characterEncoding=utf8&useSSL=false&allowMultiQueries=true&serverTimezone=Asia/Shanghai
username: root username: root
password: root password: 123456
filters: wall,mergeStat filters: wall,mergeStat
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
...@@ -479,7 +479,7 @@ ...@@ -479,7 +479,7 @@
"id": id "id": id
}).then(function (res) { }).then(function (res) {
if (res.result && res.data) { if (res.result && res.data) {
if (res.data.contentType) { if (res.data.contentType&&res.data.contentType!='') {
res.data.contentType = res.data.contentType.split(','); res.data.contentType = res.data.contentType.split(',');
} else { } else {
res.data.contentType = []; res.data.contentType = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment