sgjj 6 rokov pred
rodič
commit
b03361cda5

+ 4 - 0
src/main/java/net/mingsoft/cms/action/CategoryAction.java

@@ -102,6 +102,7 @@ public class CategoryAction extends BaseAction{
 	@RequestMapping("/list")
 	@ResponseBody
 	public ResultData list(@ModelAttribute @ApiIgnore CategoryEntity category,HttpServletResponse response, HttpServletRequest request,@ApiIgnore ModelMap model,BindingResult result) {
+		category.setAppId(BasicUtil.getAppId());
 		BasicUtil.startPage();
 		List categoryList = categoryBiz.query(category);
 		return ResultData.build().success(new EUListBean(categoryList,(int)BasicUtil.endPage(categoryList).getTotal()));
@@ -131,6 +132,7 @@ public class CategoryAction extends BaseAction{
 		if(category.getId()==null) {
 			return ResultData.build().error();
 		}
+		category.setAppId(BasicUtil.getAppId());
 		CategoryEntity _category = (CategoryEntity)categoryBiz.getEntity(Integer.parseInt(category.getId()));
 		return ResultData.build().success(_category);
 	}
@@ -188,6 +190,7 @@ public class CategoryAction extends BaseAction{
 		if(!StringUtil.checkLength(category.getCategoryParentId()+"", 1, 100)){
 			return ResultData.build().error(getResString("err.length", this.getResString("category.parent.id"), "1", "100"));
 		}
+		category.setAppId(BasicUtil.getAppId());
 		categoryBiz.saveEntity(category);
 		return ResultData.build().success(category);
 	}
@@ -262,6 +265,7 @@ public class CategoryAction extends BaseAction{
 		if(!StringUtil.checkLength(category.getCategoryParentId()+"", 0, 100)){
 			return ResultData.build().error(getResString("err.length", this.getResString("category.parent.id"), "1", "100"));
 		}
+		 category.setAppId(BasicUtil.getAppId());
 		categoryBiz.updateEntity(category);
 		return ResultData.build().success(category);
 	}

+ 4 - 11
src/main/java/net/mingsoft/cms/action/ContentAction.java

@@ -1,17 +1,10 @@
 package net.mingsoft.cms.action;
 
 import java.util.List;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import com.alibaba.fastjson.JSON;
 import net.mingsoft.base.entity.ResultData;
-import org.apache.commons.lang3.StringUtils;
 import org.springframework.validation.BindingResult;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.ui.ModelMap;
@@ -20,19 +13,15 @@ import org.springframework.stereotype.Controller;
 import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.bind.annotation.ModelAttribute;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 
 import net.mingsoft.cms.biz.IContentBiz;
 import net.mingsoft.cms.entity.ContentEntity;
-import net.mingsoft.base.util.JSONObject;
 import net.mingsoft.base.entity.BaseEntity;
 import net.mingsoft.basic.util.BasicUtil;
 import net.mingsoft.basic.util.StringUtil;
-import net.mingsoft.base.filter.DateValueFilter;
-import net.mingsoft.base.filter.DoubleValueFilter;
 import net.mingsoft.basic.bean.EUListBean;
 import net.mingsoft.basic.annotation.LogAnn;
 import net.mingsoft.basic.constant.e.BusinessTypeEnum;
@@ -105,6 +94,7 @@ public class ContentAction extends BaseAction{
 	@RequestMapping("/list")
 	@ResponseBody
 	public ResultData list(@ModelAttribute @ApiIgnore ContentEntity content,HttpServletResponse response, HttpServletRequest request,@ApiIgnore ModelMap model,BindingResult result) {
+		content.setAppId(BasicUtil.getAppId());
 		BasicUtil.startPage();
 		List contentList = contentBiz.query(content);
 		return ResultData.build().success(new EUListBean(contentList,(int)BasicUtil.endPage(contentList).getTotal()));
@@ -134,6 +124,7 @@ public class ContentAction extends BaseAction{
 		if(content.getId()==null) {
 			return ResultData.build().error();
 		}
+		content.setAppId(BasicUtil.getAppId());
 		ContentEntity _content = (ContentEntity)contentBiz.getEntity(Integer.parseInt(content.getId()));
 		return ResultData.build().success(_content);
 	}
@@ -191,6 +182,7 @@ public class ContentAction extends BaseAction{
 		if(!StringUtil.checkLength(content.getContentUrl()+"", 0, 200)){
 			return ResultData.build().error(getResString("err.length", this.getResString("content.url"), "0", "200"));
 		}
+		content.setAppId(BasicUtil.getAppId());
 		contentBiz.saveEntity(content);
 		return ResultData.build().success(content);
 	}
@@ -265,6 +257,7 @@ public class ContentAction extends BaseAction{
 		if(!StringUtil.checkLength(content.getContentUrl()+"", 0, 200)){
 			return ResultData.build().error(getResString("err.length", this.getResString("content.url"), "0", "200"));
 		}
+		content.setAppId(BasicUtil.getAppId());
 		contentBiz.updateEntity(content);
 		return ResultData.build().success(content);
 	}

+ 22 - 24
src/main/java/net/mingsoft/cms/action/GeneraterAction.java

@@ -24,7 +24,6 @@ package net.mingsoft.cms.action;
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Date;
 import java.util.List;
 
 import javax.servlet.http.HttpServletRequest;
@@ -32,6 +31,9 @@ import javax.servlet.http.HttpServletResponse;
 
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.bean.copier.CopyOptions;
+import net.mingsoft.cms.biz.ICategoryBiz;
+import net.mingsoft.cms.entity.CategoryEntity;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -42,13 +44,9 @@ import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.ResponseBody;
 
-import com.alibaba.fastjson.JSONArray;
 import net.mingsoft.basic.action.BaseAction;
-import net.mingsoft.basic.biz.IColumnBiz;
 import net.mingsoft.basic.biz.IModelBiz;
 import net.mingsoft.basic.entity.AppEntity;
-import net.mingsoft.basic.entity.CategoryEntity;
-import net.mingsoft.basic.entity.ColumnEntity;
 import net.mingsoft.cms.bean.ColumnArticleIdBean;
 import net.mingsoft.cms.biz.IArticleBiz;
 import net.mingsoft.cms.constant.ModelCode;
@@ -84,7 +82,7 @@ public class GeneraterAction extends BaseAction {
 	 * 栏目管理业务层
 	 */
 	@Autowired
-	private IColumnBiz columnBiz;
+	private ICategoryBiz categoryBiz;
 
 	/**
 	 * 模块管理业务层
@@ -155,40 +153,42 @@ public class GeneraterAction extends BaseAction {
 	 * @param response
 	 * @param columnId
 	 */
-	@RequestMapping("/{columnId}/genernateColumn")
+	@RequestMapping("/{CategoryId}/genernateColumn")
 	@RequiresPermissions("cms:generate:column")
 	@ResponseBody
-	public void genernateColumn(HttpServletRequest request, HttpServletResponse response, @PathVariable int columnId) {
+	public void genernateColumn(HttpServletRequest request, HttpServletResponse response, @PathVariable String CategoryId) {
 		// 获取站点id
 		AppEntity app = BasicUtil.getApp();
-		List<ColumnEntity> columns = new ArrayList<ColumnEntity>();
+		List<CategoryEntity> columns = new ArrayList<CategoryEntity>();
 		// 如果栏目id小于0则更新所有的栏目,否则只更新选中的栏目
-		int modelId = BasicUtil.getModelCodeId(ModelCode.CMS_COLUMN); // 查询当前模块编号
-		if (columnId > 0) {
-			List<CategoryEntity> categorys = columnBiz.queryChildrenCategory(columnId, app.getAppId(), modelId);
-			for (CategoryEntity c : categorys) {
-				columns.add((ColumnEntity) columnBiz.getEntity(c.getCategoryId()));
-			}
+		if (StringUtils.isNotBlank(CategoryId)) {
+			CategoryEntity categoryEntity = new CategoryEntity();
+			categoryEntity.setId(CategoryId);
+			categoryEntity.setAppId(app.getAppId());
+			columns = categoryBiz.queryChilds(categoryEntity);
 		} else {
 			// 获取所有的内容管理栏目
-			columns = columnBiz.queryAll(app.getAppId(), modelId);
+            CategoryEntity categoryEntity=new CategoryEntity();
+            categoryEntity.setAppId(app.getAppId());
+			columns = categoryBiz.query(categoryEntity);
 		}
 		List<ColumnArticleIdBean> articleIdList = null;
 		try {
 			// 1、设置模板文件夹路径
 			// 获取栏目列表模版
-			for (ColumnEntity column : columns) {
+			for (CategoryEntity column : columns) {
 				// 判断模板文件是否存在
-				if (!FileUtil.exist(ParserUtil.buildTempletPath(column.getColumnUrl()))) {
+				if (!FileUtil.exist(ParserUtil.buildTempletPath(column.getCategoryUrl()))) {
 					continue;
 				}
-				articleIdList = articleBiz.queryIdsByCategoryIdForParser(column.getCategoryId(), null, null);
+				articleIdList = articleBiz.queryIdsByCategoryIdForParser(Integer.parseInt(column.getCategoryId()), null, null);
 				// 判断列表类型
-				switch (column.getColumnType()) {
-				case ColumnEntity.COLUMN_TYPE_LIST: // 列表
+				switch (column.getCategoryType()) {
+					//TODO 暂时先用字符串代替
+				case "1": // 列表
 					CmsParserUtil.generateList(column, articleIdList.size());
 					break;
-				case ColumnEntity.COLUMN_TYPE_COVER:// 单页
+				case "2":// 单页
 					if(articleIdList.size()==0){
 						ColumnArticleIdBean columnArticleIdBean=new ColumnArticleIdBean();
 						CopyOptions copyOptions=CopyOptions.create();
@@ -198,8 +198,6 @@ public class GeneraterAction extends BaseAction {
 					}
 					CmsParserUtil.generateBasic(articleIdList);
 					break;
-					default:
-						throw new IllegalStateException("Unexpected value: " + column.getColumnType());
 				}
 			}
 		} catch (IOException e) {

+ 5 - 5
src/main/java/net/mingsoft/cms/action/web/MCmsAction.java

@@ -196,7 +196,7 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
 		String content = "";
 		try {
 			//根据模板路径,参数生成
-			content = CmsParserUtil.generate(columnArticles.get(0).getColumnListUrl(),map, isMobileDevice(req));
+			content = CmsParserUtil.generate(columnArticles.get(0).getCategoryListUrl(),map, isMobileDevice(req));
 		} catch (TemplateNotFoundException e) {
 			e.printStackTrace();
 		} catch (MalformedTemplateNameException e) {
@@ -251,20 +251,20 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
 				continue;
 			}
 			// 文章的栏目路径
-			String articleColumnPath = articleIdList.get(artId).getColumnPath();
+			String articleColumnPath = articleIdList.get(artId).getCategoryPath();
 			// 文章的栏目模型编号
-			int columnContentModelId = articleIdList.get(artId).getColumnContentModelId();
+			String columnContentModelId = articleIdList.get(artId).getMdiyModelId();
 			Map<String, Object> parserParams = new HashMap<String, Object>();
 			parserParams.put(ParserUtil.COLUMN, articleIdList.get(artId));
 			// 判断当前栏目是否有自定义模型
-			if (columnContentModelId > 0) {
+			if ( StringUtils.isNotBlank(columnContentModelId)) {
 				// 通过当前栏目的模型编号获取,自定义模型表名
 				if (contentModelMap.containsKey(columnContentModelId)) {
 					parserParams.put(ParserUtil.TABLE_NAME, contentModel.getCmTableName());
 				} else {
 					// 通过栏目模型编号获取自定义模型实体
 					contentModel = (ContentModelEntity) SpringUtil.getBean(IContentModelBiz.class)
-							.getEntity(columnContentModelId);
+							.getEntity(Integer.parseInt(columnContentModelId));
 					// 将自定义模型编号设置为key值
 					contentModelMap.put(columnContentModelId, contentModel.getCmTableName());
 					parserParams.put(ParserUtil.TABLE_NAME, contentModel.getCmTableName());

+ 2 - 1
src/main/java/net/mingsoft/cms/bean/ColumnArticleIdBean.java

@@ -22,13 +22,14 @@ The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
 package net.mingsoft.cms.bean;
 
 import net.mingsoft.basic.entity.ColumnEntity;
+import net.mingsoft.cms.entity.CategoryEntity;
 
 /**
  * 文章解析生成
  * @author 铭飞开源团队  
  * @date 2018年12月13日
  */
-public class ColumnArticleIdBean extends ColumnEntity{
+public class ColumnArticleIdBean extends CategoryEntity {
 	/**
 	 * 文章编号
 	 */

+ 13 - 0
src/main/java/net/mingsoft/cms/biz/ICategoryBiz.java

@@ -1,6 +1,9 @@
 package net.mingsoft.cms.biz;
 
 import net.mingsoft.base.biz.IBaseBiz;
+import net.mingsoft.cms.entity.CategoryEntity;
+
+import java.util.List;
 
 
 /**
@@ -11,4 +14,14 @@ import net.mingsoft.base.biz.IBaseBiz;
  */
 public interface ICategoryBiz extends IBaseBiz {
 
+    /**
+     * 查询当前分类下的所有子分类
+     * @param category
+     * @return
+     */
+    List<CategoryEntity> queryChilds(CategoryEntity category);
+
+    int saveEntity(CategoryEntity entity);
+
+    void updateEntity(CategoryEntity entity);
 }

+ 42 - 2
src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java

@@ -21,12 +21,15 @@ The MIT License (MIT) * Copyright (c) 2019 铭飞科技
 
 package net.mingsoft.cms.biz.impl;
 
+import net.mingsoft.base.entity.BaseEntity;
+import net.mingsoft.cms.entity.CategoryEntity;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import net.mingsoft.base.biz.impl.BaseBizImpl;
 import net.mingsoft.base.dao.IBaseDao;
 import java.util.*;
-import net.mingsoft.cms.entity.CategoryEntity;
+
 import net.mingsoft.cms.biz.ICategoryBiz;
 import net.mingsoft.cms.dao.ICategoryDao;
 
@@ -48,5 +51,42 @@ public class CategoryBizImpl extends BaseBizImpl implements ICategoryBiz {
 	protected IBaseDao getDao() {
 		// TODO Auto-generated method stub
 		return categoryDao;
-	} 
+	}
+
+	@Override
+	public List<CategoryEntity> queryChilds(CategoryEntity category) {
+		// TODO Auto-generated method stub
+		return categoryDao.queryChildren(category);
+	}
+	@Override
+	public int saveEntity(CategoryEntity categoryEntity) {
+		// TODO Auto-generated method stub
+		setParentId(categoryEntity);
+		return super.saveEntity(categoryEntity);
+	}
+
+	private void setParentId(CategoryEntity categoryEntity) {
+		if(StringUtils.isNotEmpty(categoryEntity.getCategoryId())&&Integer.parseInt(categoryEntity.getCategoryId())>0) {
+			CategoryEntity category = (CategoryEntity)categoryDao.getEntity(Integer.parseInt(categoryEntity.getCategoryId()));
+			if(StringUtils.isEmpty(category.getCategoryParentId())) {
+				categoryEntity.setCategoryParentId(categoryEntity.getCategoryId());
+			} else {
+				categoryEntity.setCategoryParentId(category.getCategoryParentId()+","+categoryEntity.getCategoryParentId());
+			}
+		}
+	}
+
+	@Override
+	public void updateEntity(CategoryEntity entity) {
+		List<CategoryEntity> categoryEntities = queryChilds(entity);
+		setParentId(entity);
+		super.updateEntity(entity);
+		categoryEntities.forEach(x->{
+			setParentId(x);
+			if(!x.getId().equals(entity.getId())){
+				super.updateEntity(x);
+			}
+		});
+
+	}
 }

+ 10 - 0
src/main/java/net/mingsoft/cms/dao/ICategoryDao.java

@@ -2,7 +2,9 @@ package net.mingsoft.cms.dao;
 
 import net.mingsoft.base.dao.IBaseDao;
 import java.util.*;
+
 import net.mingsoft.cms.entity.CategoryEntity;
+import org.apache.ibatis.annotations.Param;
 import org.springframework.stereotype.Component;
 
 /**
@@ -13,4 +15,12 @@ import org.springframework.stereotype.Component;
  */
 @Component("cmsCategoryDao")
 public interface ICategoryDao extends IBaseDao {
+
+    /**
+     * 查询当前分类下面的所有子分类
+     * @param category 必须存在categoryId categoryParentId
+     * @return
+     */
+    public List<net.mingsoft.cms.entity.CategoryEntity> queryChildren(CategoryEntity category);
+
 }

+ 37 - 2
src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml

@@ -90,7 +90,7 @@
 			update cms_category
 			<set>
 				<if test="categoryTitle != null and categoryTitle != ''">category_title=#{categoryTitle},</if>
-				<if test="categoryId != null and categoryId != ''">category_id=#{categoryId},</if>
+				category_id=#{categoryId},
 				<if test="categoryType != null and categoryType != ''">category_type=#{categoryType},</if>
 				<if test="categorySort != null">category_sort=#{categorySort},</if>
 				<if test="categoryListUrl != null and categoryListUrl != ''">category_list_url=#{categoryListUrl},</if>
@@ -116,7 +116,7 @@
 			where id = #{id}
 		</update>
 
-		<!--根据id获取-->
+	<!--根据id获取-->
 		<select id="getEntity" resultMap="resultMap" parameterType="int">
 			select * from cms_category where id=#{id}
 		</select>
@@ -151,6 +151,41 @@
 			</where>
 			limit 0,1
 		</select>
+	<sql id="queryWhereCategoryId" databaseId="mysql">
+		find_in_set('${id}',CATEGORY_PARENT_ID)
+	</sql>
+	<sql id="queryWhereCategoryId" databaseId="oracle" >
+		instr(','||'${id}'||',', ','||CATEGORY_PARENT_ID||',')>0
+	</sql>
+	<sql id="queryWhereCategoryId" databaseId="sqlServer">
+		CHARINDEX(','+'${id}'+',' , ','+CATEGORY_PARENT_ID +',')>0
+	</sql>
+
+	<!-- 模糊查询开始 -->
+	<select id="queryChildren" resultMap="resultMap">
+		select * from cms_category
+		<where>
+			<if test="appId &gt; 0">
+				and app_id=#{appId}
+			</if>
+			<if test="dictId &gt; 0">
+				and dict_id=#{dictId}
+			</if>
+			and
+			(
+			<if test="categoryParentId != null and categoryParentId!=''">
+				CATEGORY_PARENT_ID like '%${categoryParentId}%'
+			</if>
+			<if test="categoryParentId == null or  categoryParentId ==''">
+				<include refid="queryWhereCategoryId"></include>
+			</if>
+			<if test="id != null">
+				or id=#{id}
+			</if>
+			)
+			and del=0
+		</where>
+	</select>
 
 
 		<!--删除-->

+ 6 - 6
src/main/java/net/mingsoft/cms/dao/IContentDao.xml

@@ -18,7 +18,7 @@
 				<result column="content_details" property="contentDetails" /><!--文章内容 -->
 				<result column="content_url" property="contentUrl" /><!--文章跳转链接地址 -->
 				<result column="content_hit" property="contentHit" /><!--点击次数 -->
-				<result column="appid" property="appid" /><!--文章管理的应用id -->
+				<result column="app_id" property="appId" /><!--文章管理的应用id -->
 				<result column="create_by" property="createBy" /><!--创建人 -->
 				<result column="create_date" property="createDate" /><!--创建时间 -->
 				<result column="update_by" property="updateBy" /><!--修改人 -->
@@ -45,7 +45,7 @@
 				<if test="contentDetails != null and contentDetails != ''">content_details,</if>
 				<if test="contentUrl != null and contentUrl != ''">content_url,</if>
 				<if test="contentHit != null">content_hit,</if>
-				<if test="appid != null">appid,</if>
+				<if test="appId != null">app_id,</if>
 				<if test="createBy &gt; 0">create_by,</if>
 				<if test="createDate != null">create_date,</if>
 				<if test="updateBy &gt; 0">update_by,</if>
@@ -67,7 +67,7 @@
 				<if test="contentDetails != null and contentDetails != ''">#{contentDetails},</if>
 				<if test="contentUrl != null and contentUrl != ''">#{contentUrl},</if>
 				<if test="contentHit != null">#{contentHit},</if>
-				<if test="appid != null">#{appid},</if>
+				<if test="appId != null">#{appId},</if>
 				<if test="createBy &gt; 0">#{createBy},</if>
 				<if test="createDate != null">#{createDate},</if>
 				<if test="updateBy &gt; 0">#{updateBy},</if>
@@ -94,7 +94,7 @@
 				<if test="contentDetails != null and contentDetails != ''">content_details=#{contentDetails},</if>
 				<if test="contentUrl != null and contentUrl != ''">content_url=#{contentUrl},</if>
 				<if test="contentHit != null">content_hit=#{contentHit},</if>
-				<if test="appid != null">appid=#{appid},</if>
+				<if test="appId != null">app_id=#{appId},</if>
 				<if test="createBy &gt; 0">create_by=#{createBy},</if>
 				<if test="createDate != null">create_date=#{createDate},</if>
 				<if test="updateBy &gt; 0">update_by=#{updateBy},</if>
@@ -127,7 +127,7 @@
 				<if test="contentDetails != null and contentDetails != ''">and content_details=#{contentDetails}</if>
 				<if test="contentUrl != null and contentUrl != ''">and content_url=#{contentUrl}</if>
 				<if test="contentHit != null">and content_hit=#{contentHit}</if>
-				<if test="appid != null"> and appid=#{appid} </if>
+				<if test="appId != null"> and app_id=#{appId} </if>
 				<if test="createBy &gt; 0"> and create_by=#{createBy} </if>
 				<if test="createDate != null"> and create_date=#{createDate} </if>
 				<if test="updateBy &gt; 0"> and update_by=#{updateBy} </if>
@@ -173,7 +173,7 @@
 			<if test="contentDetails != null and contentDetails != ''"> and content_details=#{contentDetails}</if>
 			<if test="contentUrl != null and contentUrl != ''"> and content_url=#{contentUrl}</if>
 			<if test="contentHit != null"> and content_hit=#{contentHit}</if>
-			<if test="appid != null"> and appid=#{appid} </if>
+			<if test="appId != null"> and app_id=#{appId} </if>
 			<if test="createBy &gt; 0"> and create_by=#{createBy} </if>
 			<if test="createDate != null"> and create_date=#{createDate} </if>
 			<if test="updateBy &gt; 0"> and update_by=#{updateBy} </if>

+ 5 - 5
src/main/java/net/mingsoft/cms/entity/ContentEntity.java

@@ -73,7 +73,7 @@ private static final long serialVersionUID = 1574925152617L;
 	/**
 	* 文章管理的应用id
 	*/
-	private Integer appid;
+	private Integer appId;
 	/**
 	* 点击次数
 	*/
@@ -259,14 +259,14 @@ private static final long serialVersionUID = 1574925152617L;
 	/**
 	* 设置文章管理的应用id
 	*/
-	public void setAppid(Integer appid) {
-	this.appid = appid;
+	public void setAppId(Integer appId) {
+	this.appId = appId;
 	}
 
 	/**
 	* 获取文章管理的应用id
 	*/
-	public Integer getAppid() {
-	return this.appid;
+	public Integer getAppId() {
+	return this.appId;
 	}
 }

+ 30 - 27
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java

@@ -22,11 +22,15 @@ import net.mingsoft.basic.util.BasicUtil;
 import net.mingsoft.basic.util.SpringUtil;
 import net.mingsoft.cms.bean.ColumnArticleIdBean;
 import net.mingsoft.cms.constant.e.ColumnTypeEnum;
+import net.mingsoft.cms.entity.CategoryEntity;
 import net.mingsoft.mdiy.bean.PageBean;
 import net.mingsoft.mdiy.biz.IContentModelBiz;
+import net.mingsoft.mdiy.biz.impl.ModelBizImpl;
 import net.mingsoft.mdiy.entity.ContentModelEntity;
+import net.mingsoft.mdiy.entity.ModelEntity;
 import net.mingsoft.mdiy.parser.TagParser;
 import net.mingsoft.mdiy.util.ParserUtil;
+import org.apache.commons.lang3.StringUtils;
 
 public class CmsParserUtil extends ParserUtil {
 
@@ -42,9 +46,8 @@ public class CmsParserUtil extends ParserUtil {
 	public static void generate(String templatePath, String targetPath) throws IOException {
 		Map<String, Object> map = new HashMap<String, Object>();
 		map.put(IS_DO, false);
-		ColumnEntity column = new ColumnEntity();
+		CategoryEntity column = new CategoryEntity();
 		//内容管理栏目编码
-		column.setCategoryModelId(BasicUtil.getModelCodeId("02990000"));
 		map.put(COLUMN, column);
 		String content = CmsParserUtil.generate(templatePath, map, false);
 		FileUtil.writeString(content, ParserUtil.buildHtmlPath(targetPath), Const.UTF8);
@@ -67,7 +70,7 @@ public class CmsParserUtil extends ParserUtil {
 	 * @throws ParseException
 	 * @throws IOException
 	 */
-	public static void generateList(ColumnEntity column, int articleIdTotal)
+	public static void generateList(CategoryEntity column, int articleIdTotal)
 			throws TemplateNotFoundException, MalformedTemplateNameException, ParseException, IOException {
 		// 只初始化一次cfg
 		if (ftl == null) {
@@ -76,12 +79,12 @@ public class CmsParserUtil extends ParserUtil {
 		}
 		// 移动端模板
 		Template mobileTemplate = cfg.getTemplate(
-				BasicUtil.getApp().getAppMobileStyle() + File.separator + column.getColumnListUrl(), Const.UTF8);
+				BasicUtil.getApp().getAppMobileStyle() + File.separator + column.getCategoryListUrl(), Const.UTF8);
 		// pc端模板
-		Template template = cfg.getTemplate(File.separator + column.getColumnListUrl(), Const.UTF8);
+		Template template = cfg.getTemplate(File.separator + column.getCategoryListUrl(), Const.UTF8);
 
 		// 文章的栏目模型编号
-		int columnContentModelId = column.getColumnContentModelId();
+		String columnContentModelId = column.getMdiyModelId();
 		StringWriter writer = new StringWriter();
 		try {
 			// 为了分页添加column,判断栏目是否为父栏目
@@ -94,11 +97,11 @@ public class CmsParserUtil extends ParserUtil {
 			
 			String columnListPath;
 			String mobilePath;
-			ContentModelEntity contentModel = null;
+			ModelEntity contentModel = null;
 			// 判断当前栏目是否有自定义模型
-			if (columnContentModelId > 0) {
+			if (StringUtils.isNotBlank(columnContentModelId)) {
 				// 通过栏目模型编号获取自定义模型实体
-				contentModel = (ContentModelEntity) SpringUtil.getBean(IContentModelBiz.class).getEntity(columnContentModelId);
+				contentModel = (ModelEntity) SpringUtil.getBean(ModelBizImpl.class).getEntity(Integer.parseInt(columnContentModelId));
 			}
 			int pageNo = 1;
 			PageBean page = new PageBean();
@@ -112,7 +115,7 @@ public class CmsParserUtil extends ParserUtil {
 			parserParams.put(APP_ID, BasicUtil.getAppId());
 			if (contentModel!=null) {
 				// 将自定义模型编号设置为key值
-				parserParams.put(TABLE_NAME, contentModel.getCmTableName());
+				parserParams.put(TABLE_NAME, contentModel.getModelTableName());
 			}
 			//如果单站点,就废弃站点地址
 			if(ParserUtil.IS_SINGLE) {
@@ -123,15 +126,15 @@ public class CmsParserUtil extends ParserUtil {
 			if (totalPageSize <= 0) {
 	            // 数据库中第一页是从开始0*size
 	            // 首页路径index.html
-	            mobilePath = ParserUtil.buildMobileHtmlPath(column.getColumnPath() + File.separator + ParserUtil.INDEX);
-	            columnListPath = ParserUtil.buildHtmlPath(column.getColumnPath() + File.separator + ParserUtil.INDEX);
+	            mobilePath = ParserUtil.buildMobileHtmlPath(column.getCategoryPath() + File.separator + ParserUtil.INDEX);
+	            columnListPath = ParserUtil.buildHtmlPath(column.getCategoryPath() + File.separator + ParserUtil.INDEX);
 	            // 设置分页的起始位置
 				page.setPageNo(pageNo);
 				parserParams.put(ParserUtil.PAGE, page);
 				TagParser tag = new TagParser(content,parserParams);
 	            FileUtil.writeString(tag.rendering(), columnListPath, Const.UTF8);
 	            // 判断是手机端生成还是pc端,防止重复生成
-	            if (ParserUtil.hasMobileFile(column.getColumnListUrl())) {
+	            if (ParserUtil.hasMobileFile(column.getCategoryListUrl())) {
 	               writer = new StringWriter();
 	               mobileTemplate.process(null, writer);
 	               tag = new TagParser(writer.toString(), parserParams);
@@ -146,15 +149,15 @@ public class CmsParserUtil extends ParserUtil {
 						// 数据库中第一页是从开始0*size
 						// 首页路径index.html
 						mobilePath = ParserUtil
-								.buildMobileHtmlPath(column.getColumnPath() + File.separator + ParserUtil.INDEX);
+								.buildMobileHtmlPath(column.getCategoryPath() + File.separator + ParserUtil.INDEX);
 						columnListPath = ParserUtil
-								.buildHtmlPath(column.getColumnPath() + File.separator + ParserUtil.INDEX);
+								.buildHtmlPath(column.getCategoryPath() + File.separator + ParserUtil.INDEX);
 					} else {
 						// 其他路径list-2.html
 						mobilePath = ParserUtil.buildMobileHtmlPath(
-								column.getColumnPath() + File.separator + ParserUtil.PAGE_LIST + pageNo);
+								column.getCategoryPath() + File.separator + ParserUtil.PAGE_LIST + pageNo);
 						columnListPath = ParserUtil
-								.buildHtmlPath(column.getColumnPath() + File.separator + ParserUtil.PAGE_LIST + pageNo);
+								.buildHtmlPath(column.getCategoryPath() + File.separator + ParserUtil.PAGE_LIST + pageNo);
 					}
 					// 设置分页的起始位置
 					page.setPageNo(pageNo);
@@ -162,7 +165,7 @@ public class CmsParserUtil extends ParserUtil {
 					TagParser tag = new TagParser(content,parserParams);
 					FileUtil.writeString(tag.rendering(), columnListPath, Const.UTF8);
 					// 判断是手机端生成还是pc端,防止重复生成
-					if (ParserUtil.hasMobileFile(column.getColumnListUrl())) {
+					if (ParserUtil.hasMobileFile(column.getCategoryListUrl())) {
 						writer = new StringWriter();
 						mobileTemplate.process(null, writer);
 						tag = new TagParser(writer.toString(),parserParams);
@@ -204,11 +207,11 @@ public class CmsParserUtil extends ParserUtil {
 			// 文章编号
 			int articleId = articleIdList.get(artId).getArticleId();
 			// 文章的栏目路径
-			String articleColumnPath = articleIdList.get(artId).getColumnPath();
+			String articleColumnPath = articleIdList.get(artId).getCategoryPath();
 			// 文章的模板路径
-			String columnUrl = articleIdList.get(artId).getColumnUrl();
+			String columnUrl = articleIdList.get(artId).getCategoryUrl();
 			// 文章的栏目模型编号
-			int columnContentModelId = articleIdList.get(artId).getColumnContentModelId();
+			String columnContentModelId = articleIdList.get(artId).getMdiyModelId();
 			// 文章是否已经生成了,生成了就跳过
 			if (generateIds.contains(articleId)) {
 				artId++;
@@ -225,20 +228,20 @@ public class CmsParserUtil extends ParserUtil {
 			// 组合文章路径如:html/站点id/栏目id/文章id.html
 			writePath = ParserUtil.buildHtmlPath(articleColumnPath + File.separator + articleId);
 			//如果是封面就生成index.html
-			if(articleIdList.get(artId).getColumnType() == ColumnTypeEnum.COLUMN_TYPE_COVER.toInt()) {
+			if(Integer.parseInt(articleIdList.get(artId).getCategoryType()) == ColumnTypeEnum.COLUMN_TYPE_COVER.toInt()) {
 				writePath = ParserUtil.buildHtmlPath(articleColumnPath + File.separator + ParserUtil.INDEX);
 			}
 			Map<String, Object> parserParams = new HashMap<String, Object>();
 			parserParams.put(ParserUtil.COLUMN, articleIdList.get(artId));
 			// 判断当前栏目是否有自定义模型
-			if (columnContentModelId > 0) {
+			if (StringUtils.isNotBlank(columnContentModelId)) {
 				// 通过当前栏目的模型编号获取,自定义模型表名
 				if (contentModelMap.containsKey(columnContentModelId)) {
 					parserParams.put(TABLE_NAME, contentModel.getCmTableName());
 				} else {
 					// 通过栏目模型编号获取自定义模型实体
 					contentModel = (ContentModelEntity) SpringUtil.getBean(IContentModelBiz.class)
-							.getEntity(columnContentModelId);
+							.getEntity(Integer.parseInt(columnContentModelId));
 					// 将自定义模型编号设置为key值
 					contentModelMap.put(columnContentModelId, contentModel.getCmTableName());
 					parserParams.put(TABLE_NAME, contentModel.getCmTableName());
@@ -265,13 +268,13 @@ public class CmsParserUtil extends ParserUtil {
 
 			parserParams.put(IS_DO, false);
 			parserParams.put(ParserUtil.PAGE, page);
-			String content = CmsParserUtil.generate(articleIdList.get(artId).getColumnUrl(), parserParams, false);
+			String content = CmsParserUtil.generate(articleIdList.get(artId).getCategoryUrl(), parserParams, false);
 			FileUtil.writeString(content, writePath, Const.UTF8);
 			// 手机端
 			if (ParserUtil.hasMobileFile(columnUrl)) {
 				writePath = ParserUtil.buildMobileHtmlPath(articleColumnPath + File.separator + articleId);
 				//如果是封面就生成index.html
-				if(articleIdList.get(artId).getColumnType() == ColumnTypeEnum.COLUMN_TYPE_COVER.toInt()) {
+				if(Integer.parseInt(articleIdList.get(artId).getCategoryType())  == ColumnTypeEnum.COLUMN_TYPE_COVER.toInt()) {
 					writePath = ParserUtil.buildMobileHtmlPath(articleColumnPath + File.separator + ParserUtil.INDEX);
 				}
 				// 判断文件是否存在,若不存在弹出返回信息
@@ -280,7 +283,7 @@ public class CmsParserUtil extends ParserUtil {
 					continue;
 				}
 				parserParams.put(MOBILE, BasicUtil.getApp().getAppMobileStyle());
-				content = CmsParserUtil.generate(articleIdList.get(artId).getColumnUrl(), parserParams, true);
+				content = CmsParserUtil.generate(articleIdList.get(artId).getCategoryUrl(), parserParams, true);
 				FileUtil.writeString(content, writePath, Const.UTF8);
 			}
 			artId++;

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 0 - 0
src/main/webapp/static/plugins/tree-select/tree.js


+ 7 - 286
src/main/webapp/templets/1/default/index.htm

@@ -1,286 +1,7 @@
-<!DOCTYPE html>
-<html>
-    <head>
-        <#include "head-file.htm">
-        <link rel="stylesheet" type="text/css" href="{ms:global.host/}/plugins/bootstrap/3.3.5/css/bootstrap.min.css">
-        <script type="text/javascript" src="{ms:global.host/}/plugins/bootstrap/3.3.5/js/bootstrap.min.js"></script>
-        <script>
-        	var ms = {
-        			base:"http://store.mingsoft.net"
-        	}
-        </script>
-        <script src="http://store.mingsoft.net/api/ms.web.mstore.js"></script>
-    </head>
-
-    <body>
-        <#include "head.htm">
-        <!-- <div class="ms-banner"> 
-            <img src="./images/banner.jpg">
-        </div> -->
-        <div id="indexVue">
-            <div id="banner_tabs" class="flexslider">
-                <ul class="slides">
-                    <template v-for="banner in bannerList">
-                        <li style="background:url({ms:global.host/}/{ms:global.style/}/images/03.jpg) no-repeat center;">
-                            <p class="banner_tit animated fadeInLeft">铭飞MS平台</p>
-                            <p class="banner_des animated fadeInRight">MCms系统永久完整开源</p>
-                        </li>
-                        <li style="background:url({ms:global.host/}/{ms:global.style/}/images/03.jpg) no-repeat center;">
-                            <p class="banner_tit animated fadeInLeft">MStore</p>
-                            <p class="banner_des animated fadeInRight">丰富强大的功能插件、海量精美的行业模板</p>
-                        </li>
-                        <li style="background:url({ms:global.host/}/{ms:global.style/}/images/03.jpg) no-repeat center;">
-                            <p class="banner_tit animated fadeInLeft">优质的服务体验</p>
-                            <p class="banner_des animated fadeInRight">人工远程协助服务、永久享受更新升级</p>
-                        </li>
-                    </template>
-                </ul>
-                <ul class="flex-direction-nav">
-                    <li>
-                        <a class="flex-prev" href="javascript:;">Previous</a>
-                    </li>
-                    <li>
-                        <a class="flex-next" href="javascript:;">Next</a>
-                    </li>
-                </ul>
-            </div>
-            <div class="ms-content-index">
-                <div class="ms-content-template">
-                    <div>
-                        <ul class="nav nav-tabs ms-index-tabs" role="tablist">
-                            <li role="presentation" class="active">
-                                <a href="#model" aria-controls="model" role="tab" data-toggle="tab">模板</a>
-                            </li>
-                            <li role="presentation">
-                                <a href="#plug" aria-controls="plug" role="tab" data-toggle="tab">插件</a>
-                            </li>
-                        </ul>
-                        <div class="ms-content-all">
-                            <div class="tab-content">
-                                <div role="tabpanel" class="tab-pane active" id="model">
-                                    <div style="display: none;" class="ms-loading" v-show="!loading">
-                                        <img src="{ms:global.host/}/{ms:global.style/}/images/loading.gif" />
-                                    </div>
-                                    <div class="ms-model-content" style="display: none;" v-show="loading">
-                                        <template v-for="model in modelList">
-                                            <div class="ms-model-list">
-                                                <a class="ms-model-img" :href="model.upgraderVersionUrl" target="_blank">
-                                                    <img @mouseout="imgMout()" @mouseover="imgMover()" :src="'http://store.mingsoft.net/'+model.upgraderVersionImg" onerror="this.src='{ms:global.host/}/{ms:global.style/}/images/no-data.png'" />
-                                                </a>
-                                                <div class="ms-model-mobile-img" v-if="model.upgraderVersionMobileImg != '' && model.upgraderVersionMobileImg != undefined" style="background: url({ms:global.host/}/{ms:global.style/}/images/mobile.png)">
-                                                    <div>
-                                                        <img @mouseout="imgMout()" @mouseover="imgMover()" :src="'http://store.mingsoft.net/'+model.upgraderVersionMobileImg" onerror="this.src='{ms:global.host/}/{ms:global.style/}/images/no-data.png'" />
-                                                    </div>
-                                                </div>
-                                                <div class="ms-model-info">
-                                                    <span v-text="model.upgraderVersionName"></span>
-                                                    <img class="ms-model-info-img" :src="model.upgraderVersionPeopleIcon" onerror="this.src='http://cdn.mingsoft.net/global/images/msheader.png'" />
-                                                    <img :src="'{ms:global.host/}/{ms:global.style/}/images/level-'+model.upgraderVersionStart+'.png'" />
-                                                    <div class="ms-model-type">模板</div>
-                                                </div>
-                                            </div>
-                                        </template>
-                                        <div class="ms-model-list" style="display: none;" v-show="loading">
-                                            <div class="ms-model-more">
-                                                <div onclick="window.open('http://store.mingsoft.net/mstoreShow.do')">查看更多</div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                                <div role="tabpanel" class="tab-pane" id="plug">
-                                    <div class="ms-model-content" style="display: none;" v-show="loading">
-                                        <template v-for="pulg in pulgList">
-                                            <div class="ms-model-list">
-                                                <a class="ms-model-img" :href="pulg.upgraderVersionUrl" target="_blank">
-                                                    <img :src="'http://store.mingsoft.net/'+pulg.upgraderVersionImg" onerror="this.src='{ms:global.host/}/{ms:global.style/}/images/no-data.png'" />
-                                                </a>
-                                                <div class="ms-model-info">
-                                                    <span v-text="pulg.upgraderVersionName"></span>
-                                                    <img class="ms-model-info-img" :src="pulg.upgraderVersionPeopleIcon" onerror="this.src='http://cdn.mingsoft.net/global/images/msheader.png'" />
-                                                    <img :src="'{ms:global.host/}/{ms:global.style/}/images/level-'+pulg.upgraderVersionStart+'.png'" />
-                                                    <div class="ms-model-type">插件</div>
-                                                </div>
-                                            </div>
-                                        </template>
-                                        <div class="ms-model-list" style="display: none;" v-show="loading">
-                                            <div class="ms-model-more">
-                                                <div onclick="window.open('http://store.mingsoft.net/mstoreShow.do')">查看更多</div>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-                <div class="ms-content-case">
-                    <div class="ms-content-case-mian">
-                        <div class="ms-content-case-title">
-                            <div class="ms-content-case-title-words">网站案例</div>
-                            <div class="ms-content-case-more">
-                                <a href='{ms:global.url/}/149/index.html'>MORE>></a>
-                            </div>
-                        </div>
-                        <div class="ms-content-case-list">
-                            {ms:arclist typeid=149 size=6}
-                            <div class="ms-content-main-case">
-                                <div class="ms-content-main-case-img">
-                                    <img src="{ms:global.host/}[field.litpic/]">
-                                </div>
-                                <div class="ms-content-main-case-explain">
-                                    <div class="ms-content-main-case-title">[field.title/]</div>
-                                    <div class="ms-content-main-case-content">
-
-                                        <p class="ms-content-main-case-written">
-                                            [field.content/]
-                                        </p>
-                                    </div>
-                                    <div class="ms-content-main-case-click">
-                                        <a target="_blank" href="[field.source/]">点击查看</a>
-                                    </div>
-                                </div>
-                            </div>
-                            {/ms:arclist}
-                        </div>
-                    </div>
-                </div>
-                <div class="ms-content-product">
-                    <div class="ms-content-product-main">
-                        <div class="ms-content-product-title">
-                            <div class="ms-content-product-title-words">产品方向</div>
-                        </div>
-                        <div class="ms-content-product-list">
-                            <ul class="ms-content-product-list-ul">
-							    <li>
-							        <div class="ms-content-product-list-img">
-							            <a target="_blank" href="http://www.mingsoft.net/html/1/5523/index.html">
-							                <img src="http://www.mingsoft.net/templets/1/ming-soft//images/hu1.png"></a>
-							        </div>
-							        <div class="ms-content-product-list-content">
-							            <div class="ms-content-product-list-content-title">
-							                <a target="_blank" href="http://www.mingsoft.net/html/1/5523/index.html">铭飞建站系统MCMS</a></div>
-							            <div class="ms-content-product-list-content-describe">纯Java开发,MCMS支持PC与MOBILE皮肤定制,同时使用MS团队移动JS插件,支持站群。</div></div>
-							    </li>
-							    <li>
-							        <div class="ms-content-product-list-img">
-							            <a target="_blank" href="http://www.mingsoft.net/html/1/5524/index.html">
-							                <img src="http://www.mingsoft.net/templets/1/ming-soft//images/hu2.jpg"></a>
-							        </div>
-							        <div class="ms-content-product-list-content">
-							            <div class="ms-content-product-list-content-title">
-							                <a target="_blank" href="http://www.mingsoft.net/html/1/5524/index.html">移动互联网</a></div>
-							            <div class="ms-content-product-list-content-describe">重新定义移动开发,快速、开放、高性能,数据无缝对接,超过500个模块api 接口,方便实现各种应用。</div></div>
-							    </li>
-							    <li>
-							        <div class="ms-content-product-list-img">
-							            <a target="_blank" href="http://www.mingsoft.net/html/1/5526/index.html">
-							                <img src="http://www.mingsoft.net/templets/1/ming-soft//images/hu3.jpg"></a>
-							        </div>
-							        <div class="ms-content-product-list-content">
-							            <div class="ms-content-product-list-content-title">
-							                <a target="_blank" href="http://www.mingsoft.net/html/1/5526/index.html">铭飞物联网</a></div>
-							            <div class="ms-content-product-list-content-describe">MS+物联网,让生产企业真正掌握企业命脉,实现互联网+生产,给企业插上信息化翅膀,共享、共荣大数据时代</div></div>
-							    </li>
-							</ul>
-                        </div>
-                    </div>
-                </div>
-                <div class="ms-content-news">
-                    <div class="ms-content-news-main">
-                        <div class="ms-content-news-main-title">
-                            <div class="ms-content-news-main-title-words">公司动态</div>
-                            <div class="ms-content-news-main-title-more">
-                                <a href='{ms:global.url/}/59/index.html'>MORE>></a>
-                            </div>
-                        </div>
-                        <div class="ms-content-news-main-img-text">
-	                        {ms:arclist typeid=59 size=1}
-	                            <img src="{ms:global.host/}[field.litpic/]">
-                            {/ms:arclist}
-                            <ul class="ms-content-news-main-ul">
-                                {ms:arclist typeid=59 size=6}
-                                <li>
-                                    <a href="{ms:global.url/}[field.link/]">
-                                        <div class="ms-content-news-main-li-title">
-                                            <!-- <span class="ms-content-news-main-li-span">·</span> -->
-                                            <span class="">[field.title/]</span>
-                                        </div>
-                                        <div class="ms-content-news-main-li-time">[field.date?string("yyyy-mm-dd")/]</div>
-                                    </a>
-                                </li>
-                                {/ms:arclist}
-                            </ul>
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </div>
-        <#include "footer.htm">
-    </body>
-</html>
-<script type="text/javascript">
-        var index = new Vue({
-            el: "#indexVue",
-            data: {
-                bannerList: ['01', '02', '03', '04', '05'], //幻灯片列表
-                modelList: [], //模板列表
-                pulgList: [], //插件列表
-                loading: false, //加载状态
-            },
-            methods: {
-                query: function(data, type) {
-                    var target = this;
-                    ms.web.mstore.list(data, function(json) {
-                        if(type == 'model') {
-                            target.modelList = json.list;
-                        } else {
-                            target.pulgList = json.list;
-                            target.loading = true;
-                        }
-                    });
-                },
-                imgMover: function() {
-                    var _this = event.target;
-                    var ms_top = ($(_this).height()) - 275;
-                    if(ms_top < 0) {
-                        ms_top = 0;
-                    }
-                    $(_this).stop(true);
-                    $(_this).animate({
-                        "top": -(ms_top)
-                    }, 2500);
-                },
-                imgMout: function() {
-                    var _this = event.target;
-                    $(_this).stop(true);
-                    $(_this).animate({
-                        "top": 0
-                    }, 2500);
-                },
-            },
-            mounted: function() {
-                var data = "upgraderVersionType=2&upgraderVersionIndustry=0&orderBy=uv_id&pageSize=5&pageNo=1";
-                this.query(data, 'model');
-                var data = "upgraderVersionType=1&upgraderVersionIndustry=0&orderBy=uv_id&pageSize=5&pageNo=1";
-                this.query(data, 'pulg');
-                /*幻灯*/
-                setTimeout(function() {
-                    var bannerSlider = new Slider($('#banner_tabs'), {
-                        time: 5000,
-                        delay: 400,
-                        event: 'hover',
-                        auto: true,
-                        mode: 'fade',
-                        controller: $('#bannerCtrl'),
-                        activeControllerCls: 'active'
-                    });
-                    $('#banner_tabs .flex-prev').click(function() {
-                        bannerSlider.prev()
-                    });
-                    $('#banner_tabs .flex-next').click(function() {
-                        bannerSlider.next()
-                    });
-                }, 300)
-            },
-        })
-</script>
+{ms:channel ref=one}
+[field.typetitle/]
+    {ms:arclist refs=one}
+        [field.title/]<br>
+        [field.author/]<br>
+    {/ms:arclist}
+{/ms:channel}

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov