Commit 6ec0df95 authored by 他是超人他会飞's avatar 他是超人他会飞 Committed by 铭飞

!151 sql 更新

Merge pull request !151 from 他是超人他会飞/4.7.0
parents 98cde83d 31f44a51
This diff is collapsed.
This diff is collapsed.
...@@ -234,8 +234,8 @@ public class SearchAction extends BaseAction { ...@@ -234,8 +234,8 @@ public class SearchAction extends BaseAction {
map.put(ParserUtil.RCOUNT, size); map.put(ParserUtil.RCOUNT, size);
map.put(ParserUtil.SIZE, size); map.put(ParserUtil.SIZE, size);
//设置列表当前页 //设置列表当前页
map.put(ParserUtil.PAGE_NO, BasicUtil.getInt(ParserUtil.PAGE_NO,1)); int pageNo = BasicUtil.getInt(ParserUtil.PAGE_NO,1);
int pageNo = (int) map.get(ParserUtil.PAGE_NO); map.put(ParserUtil.PAGE_NO, pageNo);
int next ,pre; int next ,pre;
if(StringUtil.isBlank(pageNo) || pageNo==1){ if(StringUtil.isBlank(pageNo) || pageNo==1){
//如果总页数等于1,下一页就是第一页,不等于就有第二页 //如果总页数等于1,下一页就是第一页,不等于就有第二页
......
...@@ -75,7 +75,9 @@ public class CmsParserUtil extends ParserUtil { ...@@ -75,7 +75,9 @@ public class CmsParserUtil extends ParserUtil {
BasicUtil.getApp().getAppMobileStyle() + File.separator + column.getColumnListUrl(), Const.UTF8); BasicUtil.getApp().getAppMobileStyle() + File.separator + column.getColumnListUrl(), Const.UTF8);
// pc端模板 // pc端模板
Template template = cfg.getTemplate(File.separator + column.getColumnListUrl(), Const.UTF8); Template template = cfg.getTemplate(File.separator + column.getColumnListUrl(), Const.UTF8);
// 文章的栏目模型编号
int columnContentModelId = column.getColumnContentModelId();
StringWriter writer = new StringWriter(); StringWriter writer = new StringWriter();
try { try {
...@@ -91,7 +93,12 @@ public class CmsParserUtil extends ParserUtil { ...@@ -91,7 +93,12 @@ public class CmsParserUtil extends ParserUtil {
String columnListPath; String columnListPath;
String mobilePath; String mobilePath;
ContentModelEntity contentModel = null;
// 判断当前栏目是否有自定义模型
if (columnContentModelId > 0) {
// 通过栏目模型编号获取自定义模型实体
contentModel = (ContentModelEntity) SpringUtil.getBean(IContentModelBiz.class).getEntity(columnContentModelId);
}
int pageNo = 1; int pageNo = 1;
// 遍历分页 // 遍历分页
for (int i = 0; i < totalPageSize; i++) { for (int i = 0; i < totalPageSize; i++) {
...@@ -102,6 +109,10 @@ public class CmsParserUtil extends ParserUtil { ...@@ -102,6 +109,10 @@ public class CmsParserUtil extends ParserUtil {
parserParams.put(TYPE_ID, column.getCategoryId()); parserParams.put(TYPE_ID, column.getCategoryId());
parserParams.put(IS_DO, false); parserParams.put(IS_DO, false);
parserParams.put(HTML, HTML); parserParams.put(HTML, HTML);
if (contentModel!=null) {
// 将自定义模型编号设置为key值
parserParams.put(TABLE_NAME, contentModel.getCmTableName());
}
//如果单站点,就废弃站点地址 //如果单站点,就废弃站点地址
if(ParserUtil.IS_SINGLE) { if(ParserUtil.IS_SINGLE) {
parserParams.put(ParserUtil.URL, BasicUtil.getUrl()); parserParams.put(ParserUtil.URL, BasicUtil.getUrl());
......
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