Commit de1c2d2f authored by sunxin's avatar sunxin
Browse files

mysql 提交

parent eaa1c4b3
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -114,7 +114,7 @@ public class SearchAction extends BaseAction { ...@@ -114,7 +114,7 @@ public class SearchAction extends BaseAction {
if (ObjectUtil.isNull(search)) { if (ObjectUtil.isNull(search)) {
this.outJson(response, false); this.outJson(response, false);
} }
Map map = BasicUtil.assemblyRequestMap(); Map<String, Object> map = BasicUtil.assemblyRequestMap();
// 读取请求字段 // 读取请求字段
Map<String, String[]> field = request.getParameterMap(); Map<String, String[]> field = request.getParameterMap();
Map<String, String> basicField = getMapByProperties(net.mingsoft.mdiy.constant.Const.BASIC_FIELD); Map<String, String> basicField = getMapByProperties(net.mingsoft.mdiy.constant.Const.BASIC_FIELD);
...@@ -158,15 +158,17 @@ public class SearchAction extends BaseAction { ...@@ -158,15 +158,17 @@ public class SearchAction extends BaseAction {
map.put(ParserUtil.TOTAL, PageUtil.totalPage(count, size)); map.put(ParserUtil.TOTAL, PageUtil.totalPage(count, size));
//设置页面显示数量 //设置页面显示数量
map.put(ParserUtil.RCOUNT, size); map.put(ParserUtil.RCOUNT, size);
map.put(ParserUtil.SIZE, size);
//设置列表当前页 //设置列表当前页
map.put(ParserUtil.PAGE_NO, BasicUtil.getInt(ParserUtil.PAGE_NO,1)); map.put(ParserUtil.PAGE_NO, BasicUtil.getInt(ParserUtil.PAGE_NO,1));
map.put(ParserUtil.URL, BasicUtil.getUrl()); map.put(ParserUtil.URL, BasicUtil.getUrl());
Map searchMap = new HashMap<>(); Map searchMap = new HashMap<>();
searchMap.put(BASIC_TITLE, BasicUtil.getString(BASIC_TITLE)); searchMap.put(BASIC_TITLE, BasicUtil.getString(BASIC_TITLE));
searchMap.put(ParserUtil.PAGE_NO, BasicUtil.getInt(ParserUtil.PAGE_NO,1));
map.put(SEARCH, searchMap); map.put(SEARCH, searchMap);
//动态解析 //动态解析
map.put(ParserUtil.IS_DO,true); map.put(ParserUtil.IS_DO,false);
//设置动态请求的模块路径 //设置动态请求的模块路径
map.put(ParserUtil.MODEL_NAME, "mcms"); map.put(ParserUtil.MODEL_NAME, "mcms");
//解析后的内容 //解析后的内容
......
...@@ -23,6 +23,7 @@ import net.mingsoft.base.constant.Const; ...@@ -23,6 +23,7 @@ import net.mingsoft.base.constant.Const;
import net.mingsoft.basic.entity.ColumnEntity; import net.mingsoft.basic.entity.ColumnEntity;
import net.mingsoft.basic.util.BasicUtil; import net.mingsoft.basic.util.BasicUtil;
import net.mingsoft.basic.util.SpringUtil; import net.mingsoft.basic.util.SpringUtil;
import net.mingsoft.basic.util.StringUtil;
import net.mingsoft.cms.bean.ColumnArticleIdBean; import net.mingsoft.cms.bean.ColumnArticleIdBean;
import net.mingsoft.cms.constant.e.ColumnTypeEnum; import net.mingsoft.cms.constant.e.ColumnTypeEnum;
import net.mingsoft.mdiy.biz.IContentModelBiz; import net.mingsoft.mdiy.biz.IContentModelBiz;
...@@ -42,13 +43,18 @@ public class CmsParserUtil extends ParserUtil { ...@@ -42,13 +43,18 @@ public class CmsParserUtil extends ParserUtil {
* @throws IOException * @throws IOException
*/ */
public static void generate(String templatePath, String targetPath) throws IOException { public static void generate(String templatePath, String targetPath) throws IOException {
Map map = new HashMap(); Map<String, Object> map = new HashMap<String, Object>();
map.put(IS_DO, false); map.put(IS_DO, false);
String content = CmsParserUtil.generate(templatePath, map, false); boolean mobileStyle = false;
//判断是否有移动端
if (!StringUtil.isBlank(BasicUtil.getApp().getAppMobileStyle())) {
mobileStyle = true;
}
String content = CmsParserUtil.generate(templatePath, map, mobileStyle);
FileUtil.writeString(content, ParserUtil.buildHtmlPath(targetPath), Const.UTF8); FileUtil.writeString(content, ParserUtil.buildHtmlPath(targetPath), Const.UTF8);
// 生成移动页面 // 生成移动页面
if (ObjectUtil.isNotNull(BasicUtil.getApp().getAppMobileStyle())) { if (mobileStyle) {
// 手机端m // 手机端m
map.put(ParserUtil.MOBILE, BasicUtil.getApp().getAppMobileStyle()); map.put(ParserUtil.MOBILE, BasicUtil.getApp().getAppMobileStyle());
content = CmsParserUtil.generate(templatePath, map, true); content = CmsParserUtil.generate(templatePath, map, true);
......
Supports Markdown
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