This commit is contained in:
parent
70d83994c6
commit
bf18409b64
|
@ -1,47 +1,29 @@
|
|||
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;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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.ICategoryBiz;
|
||||
import net.mingsoft.cms.entity.CategoryEntity;
|
||||
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;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import net.mingsoft.base.entity.BaseEntity;
|
||||
import net.mingsoft.base.entity.ResultData;
|
||||
import net.mingsoft.basic.annotation.LogAnn;
|
||||
import net.mingsoft.basic.bean.EUListBean;
|
||||
import net.mingsoft.basic.constant.e.BusinessTypeEnum;
|
||||
import net.mingsoft.basic.util.BasicUtil;
|
||||
import net.mingsoft.basic.util.StringUtil;
|
||||
import net.mingsoft.cms.biz.ICategoryBiz;
|
||||
import net.mingsoft.cms.entity.CategoryEntity;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 分类管理控制层
|
||||
* @author 铭飞开发团队
|
||||
|
|
|
@ -1,36 +1,29 @@
|
|||
package net.mingsoft.cms.action;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import net.mingsoft.base.entity.ResultData;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
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.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.entity.BaseEntity;
|
||||
import net.mingsoft.basic.util.BasicUtil;
|
||||
import net.mingsoft.basic.util.StringUtil;
|
||||
import net.mingsoft.basic.bean.EUListBean;
|
||||
import net.mingsoft.basic.annotation.LogAnn;
|
||||
import net.mingsoft.basic.constant.e.BusinessTypeEnum;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import net.mingsoft.base.entity.BaseEntity;
|
||||
import net.mingsoft.base.entity.ResultData;
|
||||
import net.mingsoft.basic.annotation.LogAnn;
|
||||
import net.mingsoft.basic.bean.EUListBean;
|
||||
import net.mingsoft.basic.constant.e.BusinessTypeEnum;
|
||||
import net.mingsoft.basic.util.BasicUtil;
|
||||
import net.mingsoft.basic.util.StringUtil;
|
||||
import net.mingsoft.cms.biz.IContentBiz;
|
||||
import net.mingsoft.cms.entity.ContentEntity;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
/**
|
||||
* 文章管理控制层
|
||||
* @author 铭飞开发团队
|
||||
|
|
|
@ -49,9 +49,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|||
import net.mingsoft.basic.action.BaseAction;
|
||||
import net.mingsoft.basic.biz.IModelBiz;
|
||||
import net.mingsoft.basic.entity.AppEntity;
|
||||
import net.mingsoft.cms.bean.ColumnArticleIdBean;
|
||||
import net.mingsoft.cms.util.CmsParserUtil;
|
||||
import net.mingsoft.mdiy.biz.IContentModelBiz;
|
||||
import net.mingsoft.mdiy.biz.IContentModelFieldBiz;
|
||||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
|
|
|
@ -59,14 +59,6 @@ public class CategoryAction extends net.mingsoft.cms.action.BaseAction{
|
|||
@Autowired
|
||||
private ICategoryBiz categoryBiz;
|
||||
|
||||
/**
|
||||
* 返回主界面index
|
||||
*/
|
||||
@GetMapping("/index")
|
||||
public String index(HttpServletResponse response,HttpServletRequest request){
|
||||
return "/cms/category/index";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分类列表
|
||||
* @param category 分类实体
|
||||
|
@ -106,17 +98,6 @@ public class CategoryAction extends net.mingsoft.cms.action.BaseAction{
|
|||
return ResultData.build().success(new EUListBean(categoryList,(int)BasicUtil.endPage(categoryList).getTotal()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回编辑界面category_form
|
||||
*/
|
||||
@GetMapping("/form")
|
||||
public String form(@ModelAttribute CategoryEntity category,HttpServletResponse response,HttpServletRequest request,ModelMap model){
|
||||
if(category.getId()!=null){
|
||||
BaseEntity categoryEntity = categoryBiz.getEntity(Integer.parseInt(category.getId()));
|
||||
model.addAttribute("categoryEntity",categoryEntity);
|
||||
}
|
||||
return "/cms/category/form";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取分类
|
||||
|
@ -133,132 +114,5 @@ public class CategoryAction extends net.mingsoft.cms.action.BaseAction{
|
|||
CategoryEntity _category = (CategoryEntity)categoryBiz.getEntity(Integer.parseInt(category.getId()));
|
||||
return ResultData.build().success(_category);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "保存分类列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "categoryTitle", value = "栏目管理名称", required =true,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryId", value = "所属栏目", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryType", value = "栏目管理属性", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categorySort", value = "自定义顺序", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryListUrl", value = "列表模板", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryUrl", value = "内容模板", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryKeyword", value = "栏目管理关键字", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryDescrip", value = "栏目管理描述", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryImg", value = "缩略图", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryDiyUrl", value = "自定义链接", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "mdiyModelId", value = "栏目管理的内容模型id", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryDatetime", value = "类别发布时间", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryManagerId", value = "发布用户id", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "appId", value = "应用编号", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "dictId", value = "字典对应编号", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryFlag", value = "栏目属性", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryPath", value = "栏目路径", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryParentId", value = "父类型编号", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "createBy", value = "创建人", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "createDate", value = "创建时间", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "updateBy", value = "修改人", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "updateDate", value = "修改时间", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "del", value = "删除标记", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "id", value = "编号", required =false,paramType="query"),
|
||||
})
|
||||
|
||||
/**
|
||||
* 保存分类
|
||||
* @param category 分类实体
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ResponseBody
|
||||
public ResultData save(@ModelAttribute @ApiIgnore CategoryEntity category, HttpServletResponse response, HttpServletRequest request) {
|
||||
//验证栏目管理名称的值是否合法
|
||||
if(StringUtil.isBlank(category.getCategoryTitle())){
|
||||
return ResultData.build().error(getResString("err.empty", this.getResString("category.title")));
|
||||
}
|
||||
if(!StringUtil.checkLength(category.getCategoryTitle()+"", 1, 100)){
|
||||
return ResultData.build().error(getResString("err.length", this.getResString("category.title"), "1", "100"));
|
||||
}
|
||||
if(!StringUtil.checkLength(category.getCategoryFlag()+"", 1, 100)){
|
||||
return ResultData.build().error(getResString("err.length", this.getResString("category.flag"), "1", "100"));
|
||||
}
|
||||
if(!StringUtil.checkLength(category.getCategoryPath()+"", 1, 100)){
|
||||
return ResultData.build().error(getResString("err.length", this.getResString("category.path"), "1", "100"));
|
||||
}
|
||||
if(!StringUtil.checkLength(category.getCategoryParentId()+"", 1, 100)){
|
||||
return ResultData.build().error(getResString("err.length", this.getResString("category.parent.id"), "1", "100"));
|
||||
}
|
||||
categoryBiz.saveEntity(category);
|
||||
return ResultData.build().success(category);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param category 分类实体
|
||||
*/
|
||||
@ApiOperation(value = "批量删除分类列表接口")
|
||||
@PostMapping("/delete")
|
||||
@ResponseBody
|
||||
public ResultData delete(@RequestBody List<CategoryEntity> categorys,HttpServletResponse response, HttpServletRequest request) {
|
||||
int[] ids = new int[categorys.size()];
|
||||
for(int i = 0;i<categorys.size();i++){
|
||||
ids[i] =Integer.parseInt(categorys.get(i).getId()) ;
|
||||
}
|
||||
categoryBiz.delete(ids);
|
||||
return ResultData.build().success();
|
||||
}
|
||||
/**
|
||||
* 更新分类列表
|
||||
* @param category 分类实体
|
||||
*/
|
||||
@ApiOperation(value = "更新分类列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "编号", required =true,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryTitle", value = "栏目管理名称", required =true,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryId", value = "所属栏目", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryType", value = "栏目管理属性", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categorySort", value = "自定义顺序", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryListUrl", value = "列表模板", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryUrl", value = "内容模板", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryKeyword", value = "栏目管理关键字", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryDescrip", value = "栏目管理描述", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryImg", value = "缩略图", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryDiyUrl", value = "自定义链接", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "mdiyModelId", value = "栏目管理的内容模型id", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryDatetime", value = "类别发布时间", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryManagerId", value = "发布用户id", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "appId", value = "应用编号", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "dictId", value = "字典对应编号", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryFlag", value = "栏目属性", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryPath", value = "栏目路径", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "categoryParentId", value = "父类型编号", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "createBy", value = "创建人", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "createDate", value = "创建时间", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "updateBy", value = "修改人", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "updateDate", value = "修改时间", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "del", value = "删除标记", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "id", value = "编号", required =false,paramType="query"),
|
||||
})
|
||||
@PostMapping("/update")
|
||||
@ResponseBody
|
||||
public ResultData update(@ModelAttribute @ApiIgnore CategoryEntity category, HttpServletResponse response,
|
||||
HttpServletRequest request) {
|
||||
//验证栏目管理名称的值是否合法
|
||||
if(StringUtil.isBlank(category.getCategoryTitle())){
|
||||
return ResultData.build().error(getResString("err.empty", this.getResString("category.title")));
|
||||
}
|
||||
if(!StringUtil.checkLength(category.getCategoryTitle()+"", 1, 100)){
|
||||
return ResultData.build().error(getResString("err.length", this.getResString("category.title"), "1", "100"));
|
||||
}
|
||||
if(!StringUtil.checkLength(category.getCategoryFlag()+"", 1, 100)){
|
||||
return ResultData.build().error(getResString("err.length", this.getResString("category.flag"), "1", "100"));
|
||||
}
|
||||
if(!StringUtil.checkLength(category.getCategoryPath()+"", 1, 100)){
|
||||
return ResultData.build().error(getResString("err.length", this.getResString("category.path"), "1", "100"));
|
||||
}
|
||||
if(!StringUtil.checkLength(category.getCategoryParentId()+"", 1, 100)){
|
||||
return ResultData.build().error(getResString("err.length", this.getResString("category.parent.id"), "1", "100"));
|
||||
}
|
||||
categoryBiz.updateEntity(category);
|
||||
return ResultData.build().success(category);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -45,14 +45,6 @@ public class ContentAction extends net.mingsoft.cms.action.BaseAction{
|
|||
@Autowired
|
||||
private IContentBiz contentBiz;
|
||||
|
||||
/**
|
||||
* 返回主界面index
|
||||
*/
|
||||
@GetMapping("/index")
|
||||
public String index(HttpServletResponse response,HttpServletRequest request){
|
||||
return "/cms/content/index";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询文章列表
|
||||
* @param content 文章实体
|
||||
|
@ -88,17 +80,6 @@ public class ContentAction extends net.mingsoft.cms.action.BaseAction{
|
|||
return ResultData.build().success(new EUListBean(contentList,(int)BasicUtil.endPage(contentList).getTotal()));
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回编辑界面content_form
|
||||
*/
|
||||
@GetMapping("/form")
|
||||
public String form(@ModelAttribute ContentEntity content,HttpServletResponse response,HttpServletRequest request,ModelMap model){
|
||||
if(content.getId()!=null){
|
||||
BaseEntity contentEntity = contentBiz.getEntity(Integer.parseInt(content.getId()));
|
||||
model.addAttribute("contentEntity",contentEntity);
|
||||
}
|
||||
return "/cms/content/form";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取文章
|
||||
|
@ -115,131 +96,6 @@ public class ContentAction extends net.mingsoft.cms.action.BaseAction{
|
|||
ContentEntity _content = (ContentEntity)contentBiz.getEntity(Integer.parseInt(content.getId()));
|
||||
return ResultData.build().success(_content);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "保存文章列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "contentTitle", value = "文章标题", required =true,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentCategoryId", value = "所属栏目", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentType", value = "文章类型", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentDisplay", value = "是否显示", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentAuthor", value = "文章作者", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentSource", value = "文章来源", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentDatetime", value = "发布时间", required =true,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentSort", value = "自定义顺序", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentImg", value = "文章缩略图", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentDescription", value = "描述", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentKeyword", value = "关键字", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentDetails", value = "文章内容", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentUrl", value = "文章跳转链接地址", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "appid", value = "文章管理的应用id", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "createBy", value = "创建人", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "createDate", value = "创建时间", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "updateBy", value = "修改人", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "updateDate", value = "修改时间", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "del", value = "删除标记", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "id", value = "编号", required =false,paramType="query"),
|
||||
})
|
||||
|
||||
/**
|
||||
* 保存文章
|
||||
* @param content 文章实体
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
@ResponseBody
|
||||
public ResultData save(@ModelAttribute @ApiIgnore ContentEntity content, HttpServletResponse response, HttpServletRequest request) {
|
||||
//验证文章标题的值是否合法
|
||||
if(StringUtil.isBlank(content.getContentTitle())){
|
||||
return ResultData.build().error(getResString("err.empty", this.getResString("content.title")));
|
||||
}
|
||||
if(!StringUtil.checkLength(content.getContentTitle()+"", 0, 200)){
|
||||
return ResultData.build().error(getResString("err.length", this.getResString("content.title"), "0", "200"));
|
||||
}
|
||||
if(!StringUtil.checkLength(content.getContentAuthor()+"", 0, 200)){
|
||||
return ResultData.build().error(getResString("err.length", this.getResString("content.author"), "0", "200"));
|
||||
}
|
||||
if(!StringUtil.checkLength(content.getContentSource()+"", 0, 200)){
|
||||
return ResultData.build().error(getResString("err.length", this.getResString("content.source"), "0", "200"));
|
||||
}
|
||||
//验证发布时间的值是否合法
|
||||
if(StringUtil.isBlank(content.getContentDatetime())){
|
||||
return ResultData.build().error(getResString("err.empty", this.getResString("content.datetime")));
|
||||
}
|
||||
if(!StringUtil.checkLength(content.getContentUrl()+"", 0, 200)){
|
||||
return ResultData.build().error(getResString("err.length", this.getResString("content.url"), "0", "200"));
|
||||
}
|
||||
contentBiz.saveEntity(content);
|
||||
return ResultData.build().success(content);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param contents 文章实体
|
||||
*/
|
||||
@ApiOperation(value = "批量删除文章列表接口")
|
||||
@PostMapping("/delete")
|
||||
@ResponseBody
|
||||
public ResultData delete(@RequestBody List<ContentEntity> contents,HttpServletResponse response, HttpServletRequest request) {
|
||||
int[] ids = new int[contents.size()];
|
||||
for(int i = 0;i<contents.size();i++){
|
||||
ids[i] =Integer.parseInt(contents.get(i).getId()) ;
|
||||
}
|
||||
contentBiz.delete(ids);
|
||||
return ResultData.build().success();
|
||||
}
|
||||
/**
|
||||
* 更新文章列表
|
||||
* @param content 文章实体
|
||||
*/
|
||||
@ApiOperation(value = "更新文章列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "id", value = "编号", required =true,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentTitle", value = "文章标题", required =true,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentCategoryId", value = "所属栏目", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentType", value = "文章类型", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentDisplay", value = "是否显示", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentAuthor", value = "文章作者", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentSource", value = "文章来源", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentDatetime", value = "发布时间", required =true,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentSort", value = "自定义顺序", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentImg", value = "文章缩略图", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentDescription", value = "描述", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentKeyword", value = "关键字", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentDetails", value = "文章内容", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "contentUrl", value = "文章跳转链接地址", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "appid", value = "文章管理的应用id", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "createBy", value = "创建人", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "createDate", value = "创建时间", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "updateBy", value = "修改人", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "updateDate", value = "修改时间", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "del", value = "删除标记", required =false,paramType="query"),
|
||||
@ApiImplicitParam(name = "id", value = "编号", required =false,paramType="query"),
|
||||
})
|
||||
@PostMapping("/update")
|
||||
@ResponseBody
|
||||
public ResultData update(@ModelAttribute @ApiIgnore ContentEntity content, HttpServletResponse response,
|
||||
HttpServletRequest request) {
|
||||
//验证文章标题的值是否合法
|
||||
if(StringUtil.isBlank(content.getContentTitle())){
|
||||
return ResultData.build().error(getResString("err.empty", this.getResString("content.title")));
|
||||
}
|
||||
if(!StringUtil.checkLength(content.getContentTitle()+"", 0, 200)){
|
||||
return ResultData.build().error(getResString("err.length", this.getResString("content.title"), "0", "200"));
|
||||
}
|
||||
if(!StringUtil.checkLength(content.getContentAuthor()+"", 0, 200)){
|
||||
return ResultData.build().error(getResString("err.length", this.getResString("content.author"), "0", "200"));
|
||||
}
|
||||
if(!StringUtil.checkLength(content.getContentSource()+"", 0, 200)){
|
||||
return ResultData.build().error(getResString("err.length", this.getResString("content.source"), "0", "200"));
|
||||
}
|
||||
//验证发布时间的值是否合法
|
||||
if(StringUtil.isBlank(content.getContentDatetime())){
|
||||
return ResultData.build().error(getResString("err.empty", this.getResString("content.datetime")));
|
||||
}
|
||||
if(!StringUtil.checkLength(content.getContentUrl()+"", 0, 200)){
|
||||
return ResultData.build().error(getResString("err.length", this.getResString("content.url"), "0", "200"));
|
||||
}
|
||||
contentBiz.updateEntity(content);
|
||||
return ResultData.build().success(content);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "查看文章点击数")
|
||||
@ApiImplicitParam(name = "contentId", value = "文章编号", required = true,paramType="path")
|
||||
|
|
|
@ -21,51 +21,29 @@ The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
|
|||
|
||||
package net.mingsoft.cms.action.web;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import net.mingsoft.base.action.BaseAction;
|
||||
import net.mingsoft.basic.biz.IColumnBiz;
|
||||
import net.mingsoft.basic.entity.ColumnEntity;
|
||||
import net.mingsoft.mdiy.biz.IContentModelBiz;
|
||||
import net.mingsoft.mdiy.biz.IContentModelFieldBiz;
|
||||
import net.mingsoft.mdiy.entity.ContentModelEntity;
|
||||
import net.mingsoft.mdiy.entity.ContentModelFieldEntity;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
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.JSONObject;
|
||||
import net.mingsoft.basic.biz.IColumnBiz;
|
||||
import net.mingsoft.mdiy.biz.IContentModelBiz;
|
||||
import net.mingsoft.mdiy.biz.IContentModelFieldBiz;
|
||||
import net.mingsoft.basic.entity.ColumnEntity;
|
||||
import net.mingsoft.mdiy.entity.ContentModelEntity;
|
||||
import net.mingsoft.mdiy.entity.ContentModelFieldEntity;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import net.mingsoft.base.action.BaseAction;
|
||||
import net.mingsoft.basic.util.BasicUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
* <p>
|
||||
* <b>铭飞科技</b>
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* Copyright: Copyright (c) 2014 - 2015
|
||||
* </p>
|
||||
*
|
||||
* @author 史爱华
|
||||
*
|
||||
* <p>
|
||||
* Comments: 供前端页面获取自定义模型中字段实体信息
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* Create Date:2015-07-11
|
||||
* </p>
|
||||
*
|
||||
* <p>
|
||||
* Modification history:
|
||||
* </p>
|
||||
* 供前端页面获取自定义模型中字段实体信息
|
||||
* @author 铭飞开发团队
|
||||
* 创建日期:2019-11-28 15:12:32<br/>
|
||||
* 历史修订:<br/>
|
||||
*/
|
||||
@Controller("webField")
|
||||
@RequestMapping("/field")
|
||||
|
@ -98,9 +76,6 @@ public class FieldAction extends BaseAction{
|
|||
@RequestMapping("/{columId}/getEntity")
|
||||
@ResponseBody
|
||||
public void getEntity(@PathVariable int columId,HttpServletRequest request, HttpServletResponse response) {
|
||||
System.out.println("111");
|
||||
BasicUtil.setSession("xxx", "888");
|
||||
System.err.println("session:"+BasicUtil.getSession("xxx"));
|
||||
//获取字段名称
|
||||
String fieldFieldName = request.getParameter("fieldFieldName");
|
||||
//根据栏目id获取栏目实体
|
||||
|
|
|
@ -21,44 +21,38 @@
|
|||
|
||||
package net.mingsoft.cms.action.web;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import net.mingsoft.base.constant.Const;
|
||||
import net.mingsoft.basic.util.SpringUtil;
|
||||
import net.mingsoft.basic.util.StringUtil;
|
||||
import net.mingsoft.cms.bean.ContentBean;
|
||||
import net.mingsoft.cms.biz.ICategoryBiz;
|
||||
import net.mingsoft.cms.biz.IContentBiz;
|
||||
import net.mingsoft.cms.entity.CategoryEntity;
|
||||
import net.mingsoft.cms.entity.ContentEntity;
|
||||
import net.mingsoft.mdiy.biz.IContentModelBiz;
|
||||
import net.mingsoft.mdiy.biz.IModelBiz;
|
||||
import net.mingsoft.mdiy.entity.ContentModelEntity;
|
||||
import net.mingsoft.mdiy.entity.ModelEntity;
|
||||
import net.mingsoft.mdiy.parser.TagParser;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.PageUtil;
|
||||
import freemarker.core.ParseException;
|
||||
import freemarker.template.MalformedTemplateNameException;
|
||||
import freemarker.template.TemplateNotFoundException;
|
||||
import net.mingsoft.basic.entity.ColumnEntity;
|
||||
import net.mingsoft.basic.util.BasicUtil;
|
||||
import net.mingsoft.basic.util.SpringUtil;
|
||||
import net.mingsoft.cms.bean.ContentBean;
|
||||
import net.mingsoft.cms.biz.ICategoryBiz;
|
||||
import net.mingsoft.cms.biz.IContentBiz;
|
||||
import net.mingsoft.cms.entity.CategoryEntity;
|
||||
import net.mingsoft.cms.entity.ContentEntity;
|
||||
import net.mingsoft.cms.util.CmsParserUtil;
|
||||
import net.mingsoft.mdiy.bean.PageBean;
|
||||
import net.mingsoft.mdiy.biz.IContentModelBiz;
|
||||
import net.mingsoft.mdiy.biz.IModelBiz;
|
||||
import net.mingsoft.mdiy.biz.IPageBiz;
|
||||
import net.mingsoft.mdiy.entity.ContentModelEntity;
|
||||
import net.mingsoft.mdiy.entity.PageEntity;
|
||||
import net.mingsoft.mdiy.util.ParserUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 动态生成页面,需要后台配置自定义页数据
|
||||
|
|
|
@ -1,46 +0,0 @@
|
|||
/**
|
||||
The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
|
||||
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
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 CategoryEntity {
|
||||
/**
|
||||
* 文章编号
|
||||
*/
|
||||
private int articleId;
|
||||
|
||||
public int getArticleId() {
|
||||
return articleId;
|
||||
}
|
||||
|
||||
public void setArticleId(int articleId) {
|
||||
this.articleId = articleId;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,115 +0,0 @@
|
|||
/**
|
||||
The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
|
||||
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package net.mingsoft.cms.constant;
|
||||
|
||||
import net.mingsoft.base.constant.e.BaseEnum;
|
||||
|
||||
public enum ModelCode implements BaseEnum{
|
||||
/**
|
||||
* 内容:栏目模块编号
|
||||
*/
|
||||
CMS_COLUMN("02990000"),
|
||||
|
||||
/**
|
||||
* 内容:文章模块编号
|
||||
*/
|
||||
CMS_ARTICLE("02980100"),
|
||||
/**
|
||||
* 内容:文章列表
|
||||
*/
|
||||
CMS_ARTICLE_BASIC("02980000"),
|
||||
/**
|
||||
* 内容:自定义搜索
|
||||
*/
|
||||
CMS_SEARCH("02050000"),
|
||||
|
||||
/**
|
||||
* 内容:自定义模型
|
||||
*/
|
||||
CMS_CONTENT_MODEL("02060000"),
|
||||
|
||||
/**
|
||||
* 内容:一键更新
|
||||
*/
|
||||
CMS_GENERATE_ALL("02070100"),
|
||||
|
||||
/**
|
||||
* 内容:更新主页
|
||||
*/
|
||||
CMS_GENERATE_INDEX("02070200"),
|
||||
|
||||
/**
|
||||
* 内容:更新文档
|
||||
*/
|
||||
CMS_GENERATE_ARTICLE("02070300"),
|
||||
|
||||
/**
|
||||
* 内容: 更新栏目
|
||||
*/
|
||||
CMS_GENERATE_COLUMN("02070400"),
|
||||
|
||||
/**
|
||||
* 内容:模版
|
||||
*/
|
||||
CMS_TEMPLETSKIN("02080000"),
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 内容:织梦数据导入
|
||||
*/
|
||||
COM_DEDE_DATA_IMPORT("02090100"),
|
||||
|
||||
/**
|
||||
* 内容:栏目属性管理模块
|
||||
*/
|
||||
CMS_COLUMN_TYPE("02090200");
|
||||
/**
|
||||
* 设置modelCode的常量
|
||||
* @param code 常量
|
||||
*/
|
||||
ModelCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 返回该modelCode常量的字符串表示
|
||||
* @return 字符串
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
// TODO Auto-generated method stub
|
||||
return code;
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回该modelCode常量的整型表示
|
||||
* @return 整型
|
||||
*/
|
||||
public int toInt() {
|
||||
// TODO Auto-generated method stub
|
||||
return Integer.parseInt(code);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
/**
|
||||
The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
|
||||
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package net.mingsoft.cms.constant.e;
|
||||
|
||||
import net.mingsoft.base.constant.e.BaseEnum;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName: ColumnTypeEnum
|
||||
* @Description:TODO(文章栏目分类类型)
|
||||
* @author: 铭飞开发团队
|
||||
* @date: 2018年1月31日 下午2:55:18
|
||||
*
|
||||
* @Copyright: 2018 www.mingsoft.net Inc. All rights reserved.
|
||||
*/
|
||||
public enum ColumnTypeEnum implements BaseEnum {
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
COLUMN_TYPE_LIST(1),
|
||||
/**
|
||||
* 单页
|
||||
*/
|
||||
COLUMN_TYPE_COVER(2),
|
||||
/**
|
||||
* 跳转地址
|
||||
*/
|
||||
COLUMN_TYPE_URL(3);
|
||||
ColumnTypeEnum(Object code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
private Object code;
|
||||
@Override
|
||||
public int toInt() {
|
||||
// TODO Auto-generated method stub
|
||||
return Integer.valueOf(code+"");
|
||||
}
|
||||
|
||||
}
|
|
@ -1,13 +1,5 @@
|
|||
package net.mingsoft.cms.util;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.StringWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.PageUtil;
|
||||
import freemarker.cache.FileTemplateLoader;
|
||||
|
@ -17,25 +9,33 @@ import freemarker.template.Template;
|
|||
import freemarker.template.TemplateException;
|
||||
import freemarker.template.TemplateNotFoundException;
|
||||
import net.mingsoft.base.constant.Const;
|
||||
import net.mingsoft.basic.entity.ColumnEntity;
|
||||
import net.mingsoft.basic.util.BasicUtil;
|
||||
import net.mingsoft.basic.util.SpringUtil;
|
||||
import net.mingsoft.cms.bean.ColumnArticleIdBean;
|
||||
import net.mingsoft.cms.bean.ContentBean;
|
||||
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.IModelBiz;
|
||||
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;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.StringWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class CmsParserUtil extends ParserUtil {
|
||||
|
||||
/**
|
||||
* 封面
|
||||
*/
|
||||
private static int COLUMN_TYPE_COVER = 2;
|
||||
|
||||
/**
|
||||
* 指定模板,指定路径进行生成静态页面,会自定识别pc与移动端
|
||||
*
|
||||
|
@ -236,7 +236,7 @@ public class CmsParserUtil extends ParserUtil {
|
|||
// 组合文章路径如:html/站点id/栏目id/文章id.html
|
||||
writePath = ParserUtil.buildHtmlPath(articleColumnPath + File.separator + articleId);
|
||||
//如果是封面就生成index.html
|
||||
if(Integer.parseInt(articleIdList.get(artId).getCategoryType()) == ColumnTypeEnum.COLUMN_TYPE_COVER.toInt()) {
|
||||
if(Integer.parseInt(articleIdList.get(artId).getCategoryType()) == COLUMN_TYPE_COVER) {
|
||||
writePath = ParserUtil.buildHtmlPath(articleColumnPath + File.separator + ParserUtil.INDEX);
|
||||
}
|
||||
Map<String, Object> parserParams = new HashMap<String, Object>();
|
||||
|
@ -282,7 +282,7 @@ public class CmsParserUtil extends ParserUtil {
|
|||
if (ParserUtil.hasMobileFile(columnUrl)) {
|
||||
writePath = ParserUtil.buildMobileHtmlPath(articleColumnPath + File.separator + articleId);
|
||||
//如果是封面就生成index.html
|
||||
if(Integer.parseInt(articleIdList.get(artId).getCategoryType()) == ColumnTypeEnum.COLUMN_TYPE_COVER.toInt()) {
|
||||
if(Integer.parseInt(articleIdList.get(artId).getCategoryType()) == COLUMN_TYPE_COVER) {
|
||||
writePath = ParserUtil.buildMobileHtmlPath(articleColumnPath + File.separator + ParserUtil.INDEX);
|
||||
}
|
||||
// 判断文件是否存在,若不存在弹出返回信息
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
server:
|
||||
port: 4027
|
||||
port: 8080
|
||||
servlet.context-path: /ms-mcms
|
||||
servlet.session.timeout: 60M
|
||||
|
||||
|
|
Loading…
Reference in New Issue