修复动态解析

master
sgjj 6 years ago
parent 0fd4a57ae1
commit dfad56af46
  1. 22
      src/main/java/net/mingsoft/cms/action/BaseAction.java
  2. 73
      src/main/java/net/mingsoft/cms/action/web/MCmsAction.java
  3. 17
      src/main/java/net/mingsoft/cms/biz/IArticleBiz.java
  4. 11
      src/main/java/net/mingsoft/cms/biz/impl/ArticleBizImpl.java
  5. 14
      src/main/java/net/mingsoft/cms/constant/Const.java
  6. 22
      src/main/java/net/mingsoft/cms/dao/IArticleDao.java
  7. 76
      src/main/java/net/mingsoft/cms/dao/IArticleDao.xml
  8. 9
      src/main/java/net/mingsoft/cms/resources/resources_zh_CN.properties

@ -0,0 +1,22 @@
package net.mingsoft.cms.action;
import java.util.MissingResourceException;
/**
* @Author: 铭飞开源团队--huise
* @Date: 2019/8/9 20:47
*/
public class BaseAction extends net.mingsoft.mdiy.action.BaseAction{
@Override
protected String getResString(String key) {
// TODO Auto-generated method stub
String str = "";
try {
str = super.getResString(key);
} catch (MissingResourceException e) {
str = net.mingsoft.cms.constant.Const.RESOURCES.getString(key);
}
return str;
}
}

@ -1,5 +1,5 @@
/** /**
The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net) The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * 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 * this software and associated documentation files (the "Software"), to deal in
@ -21,13 +21,23 @@ The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
package net.mingsoft.cms.action.web; package net.mingsoft.cms.action.web;
import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import cn.hutool.core.io.FileUtil;
import com.github.pagehelper.PageHelper;
import net.mingsoft.base.constant.Const;
import net.mingsoft.basic.util.SpringUtil;
import net.mingsoft.cms.constant.e.ColumnTypeEnum;
import net.mingsoft.mdiy.biz.IContentModelBiz;
import net.mingsoft.mdiy.entity.ContentModelEntity;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ExceptionHandler;
@ -60,7 +70,7 @@ import net.mingsoft.mdiy.util.ParserUtil;
*/ */
@Controller("dynamicPageAction") @Controller("dynamicPageAction")
@RequestMapping("/mcms") @RequestMapping("/mcms")
public class MCmsAction extends net.mingsoft.mdiy.action.BaseAction { public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
/** /**
* 自定义页面业务层 * 自定义页面业务层
@ -204,13 +214,21 @@ public class MCmsAction extends net.mingsoft.mdiy.action.BaseAction {
* @param id 文章编号 * @param id 文章编号
*/ */
@GetMapping("/view.do") @GetMapping("/view.do")
public void view(HttpServletRequest req, HttpServletResponse resp) { public void view(String orderby,String order,HttpServletRequest req, HttpServletResponse resp) {
//参数文章编号 //参数文章编号
ArticleEntity article = (ArticleEntity) articleBiz.getEntity(BasicUtil.getInt(ParserUtil.ID)); ArticleEntity article = (ArticleEntity) articleBiz.getEntity(BasicUtil.getInt(ParserUtil.ID));
if(ObjectUtil.isNull(article)){ if(ObjectUtil.isNull(article)){
this.outJson(resp, null,false,getResString("err.empty", this.getResString("id"))); this.outJson(resp, null,false,getResString("err.empty", this.getResString("id")));
return; return;
} }
if(StringUtils.isNotBlank(order)){
//防注入
if(!order.toLowerCase().equals("asc")&&!order.toLowerCase().equals("desc")){
this.outJson(resp, null,false,getResString("err.error", this.getResString("order")));
return;
}
}
PageBean page = new PageBean();
//根据文章编号查询栏目详情模版 //根据文章编号查询栏目详情模版
ColumnEntity column = (ColumnEntity) columnBiz.getEntity(article.getBasicCategoryId()); ColumnEntity column = (ColumnEntity) columnBiz.getEntity(article.getBasicCategoryId());
//解析后的内容 //解析后的内容
@ -221,6 +239,55 @@ public class MCmsAction extends net.mingsoft.mdiy.action.BaseAction {
//设置动态请求的模块路径 //设置动态请求的模块路径
map.put(ParserUtil.MODEL_NAME, "mcms"); map.put(ParserUtil.MODEL_NAME, "mcms");
map.put(ParserUtil.URL, BasicUtil.getUrl()); map.put(ParserUtil.URL, BasicUtil.getUrl());
map.put(ParserUtil.PAGE, page);
map.put(ParserUtil.ID, article.getArticleID());
List<ColumnArticleIdBean> articleIdList = articleBiz.queryIdsByCategoryIdForParser(column.getCategoryCategoryId(), null, null,orderby,order);
Map<Object, Object> contentModelMap = new HashMap<Object, Object>();
ContentModelEntity contentModel = null;
for (int artId = 0; artId < articleIdList.size();) {
//如果不是当前文章则跳过
if(articleIdList.get(artId).getArticleId() != article.getArticleID()){
artId++;
continue;
}
// 文章的栏目路径
String articleColumnPath = articleIdList.get(artId).getColumnPath();
// 文章的栏目模型编号
int columnContentModelId = articleIdList.get(artId).getColumnContentModelId();
Map<String, Object> parserParams = new HashMap<String, Object>();
parserParams.put(ParserUtil.COLUMN, articleIdList.get(artId));
// 判断当前栏目是否有自定义模型
if (columnContentModelId > 0) {
// 通过当前栏目的模型编号获取,自定义模型表名
if (contentModelMap.containsKey(columnContentModelId)) {
parserParams.put(ParserUtil.TABLE_NAME, contentModel.getCmTableName());
} else {
// 通过栏目模型编号获取自定义模型实体
contentModel = (ContentModelEntity) SpringUtil.getBean(IContentModelBiz.class)
.getEntity(columnContentModelId);
// 将自定义模型编号设置为key值
contentModelMap.put(columnContentModelId, contentModel.getCmTableName());
parserParams.put(ParserUtil.TABLE_NAME, contentModel.getCmTableName());
}
}
// 第一篇文章没有上一篇
if (artId > 0) {
ColumnArticleIdBean preCaBean = articleIdList.get(artId - 1);
//判断当前文档是否与上一页文章在同一栏目下,并且不能使用父栏目字符串,因为父栏目中没有所属栏目编号
if(articleColumnPath.contains(preCaBean.getCategoryId()+"")){
page.setPreId(preCaBean.getArticleId());
}
}
// 最后一篇文章没有下一篇
if (artId + 1 < articleIdList.size()) {
ColumnArticleIdBean nextCaBean = articleIdList.get(artId + 1);
//判断当前文档是否与下一页文章在同一栏目下并且不能使用父栏目字符串,因为父栏目中没有所属栏目编号
if(articleColumnPath.contains(nextCaBean.getCategoryId()+"")){
page.setNextId(nextCaBean.getArticleId());
}
}
break;
}
try { try {
//根据模板路径,参数生成 //根据模板路径,参数生成
content = CmsParserUtil.generate(column.getColumnUrl(), map, isMobileDevice(req)); content = CmsParserUtil.generate(column.getColumnUrl(), map, isMobileDevice(req));

@ -1,5 +1,5 @@
/** /**
The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net) The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * 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 * this software and associated documentation files (the "Software"), to deal in
@ -137,7 +137,7 @@ public interface IArticleBiz extends IBasicBiz {
* @return 文章集合 * @return 文章集合
*/ */
List<ArticleEntity> query(int webId, int[] basicCategoryIds, String flag, String noFlag, String orderBy, List<ArticleEntity> query(int webId, int[] basicCategoryIds, String flag, String noFlag, String orderBy,
boolean order, String beginTime,String endTime, ArticleEntity article); boolean order, String beginTime,String endTime, ArticleEntity article);
/** /**
* 查询文章编号集合 * 查询文章编号集合
@ -147,7 +147,16 @@ public interface IArticleBiz extends IBasicBiz {
* @return * @return
*/ */
public List<ColumnArticleIdBean> queryIdsByCategoryIdForParser(int categoryId, String beginTime,String endTime); public List<ColumnArticleIdBean> queryIdsByCategoryIdForParser(int categoryId, String beginTime,String endTime);
/**
* 查询文章编号集合
* @param categoryId 栏目编号
* @param beginTime 开始时间
* @param endTime 结束时间
* @param orderBy 排序字段
* @param order 排序方式
* @return
*/
public List<ColumnArticleIdBean> queryIdsByCategoryIdForParser(int categoryId, String beginTime,String endTime,String orderBy,String order);
/** /**
* 根据页面栏目的id获取与其绑定的文章实体 * 根据页面栏目的id获取与其绑定的文章实体
* *
@ -177,6 +186,6 @@ public interface IArticleBiz extends IBasicBiz {
*/ */
@Deprecated @Deprecated
public List<ArticleEntity> queryListForSearch(ContentModelEntity conntentModel, Map whereMap, public List<ArticleEntity> queryListForSearch(ContentModelEntity conntentModel, Map whereMap,
int appId, List ids, Map orders); int appId, List ids, Map orders);
} }

@ -1,5 +1,5 @@
/** /**
The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net) The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * 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 * this software and associated documentation files (the "Software"), to deal in
@ -25,6 +25,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.github.pagehelper.PageHelper;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -165,7 +166,7 @@ public class ArticleBizImpl extends BasicBizImpl implements IArticleBiz {
@Override @Override
public List<ArticleEntity> query(int webId, int[] basicCategoryIds, String flag, String noFlag, String orderBy, public List<ArticleEntity> query(int webId, int[] basicCategoryIds, String flag, String noFlag, String orderBy,
boolean order,String beginTime,String endTime, ArticleEntity article) { boolean order,String beginTime,String endTime, ArticleEntity article) {
// TODO Auto-generated method stub // TODO Auto-generated method stub
if(article == null) { if(article == null) {
article = new ArticleEntity(); article = new ArticleEntity();
@ -212,6 +213,10 @@ public class ArticleBizImpl extends BasicBizImpl implements IArticleBiz {
@Override @Override
public List<ColumnArticleIdBean> queryIdsByCategoryIdForParser(int categoryId, String beginTime,String endTime) { public List<ColumnArticleIdBean> queryIdsByCategoryIdForParser(int categoryId, String beginTime,String endTime) {
return this.articleDao.queryIdsByCategoryIdForParser(categoryId,BasicUtil.getAppId(), beginTime, endTime); return this.articleDao.queryIdsByCategoryIdForParser(categoryId,BasicUtil.getAppId(), beginTime, endTime,null,null);
}
@Override
public List<ColumnArticleIdBean> queryIdsByCategoryIdForParser(int categoryId, String beginTime,String endTime,String orderBy,String order) {
return this.articleDao.queryIdsByCategoryIdForParser(categoryId,BasicUtil.getAppId(), beginTime, endTime,orderBy,order);
} }
} }

@ -0,0 +1,14 @@
package net.mingsoft.cms.constant;
import java.util.ResourceBundle;
/**
* @Author: 铭飞开源团队--huise
* @Date: 2019/8/9 20:51
*/
public class Const {
/**
* 资源文件
*/
public final static ResourceBundle RESOURCES = ResourceBundle.getBundle("net.mingsoft.cms.resources.resources");
}

@ -1,5 +1,5 @@
/** /**
The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net) The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of * 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 * this software and associated documentation files (the "Software"), to deal in
@ -57,7 +57,7 @@ public interface IArticleDao extends IBaseDao {
*/ */
@Deprecated @Deprecated
int count(@Param("webId") int webId, @Param("basicCategoryIds") int[] basicCategoryIds, @Param("flag") String flag, int count(@Param("webId") int webId, @Param("basicCategoryIds") int[] basicCategoryIds, @Param("flag") String flag,
@Param("noFlag") String noFlag, @Param("article") ArticleEntity article); @Param("noFlag") String noFlag, @Param("article") ArticleEntity article);
/** /**
* 通过分类id获取文章内容 * 通过分类id获取文章内容
@ -91,7 +91,7 @@ public interface IArticleDao extends IBaseDao {
* @return * @return
*/ */
ArticleEntity getNextOrPrevious(@Param("appId") int appId, @Param("basicId") int basicId, ArticleEntity getNextOrPrevious(@Param("appId") int appId, @Param("basicId") int basicId,
@Param("flag") boolean flag, @Param("categoryId") Integer categoryId); @Param("flag") boolean flag, @Param("categoryId") Integer categoryId);
/** /**
* 根据查询文章实体总数 * 根据查询文章实体总数
@ -104,7 +104,7 @@ public interface IArticleDao extends IBaseDao {
* @return 文章实体总数 * @return 文章实体总数
*/ */
int getSearchCount(@Param("tableName") String tableName, @Param("map") Map<String, List> map, int getSearchCount(@Param("tableName") String tableName, @Param("map") Map<String, List> map,
@Param("websiteId") int websiteId, @Param("ids") String ids); @Param("websiteId") int websiteId, @Param("ids") String ids);
/** /**
* 文章查询 * 文章查询
@ -127,9 +127,9 @@ public interface IArticleDao extends IBaseDao {
* @return 文章集合 * @return 文章集合
*/ */
List<ArticleEntity> query(@Param("webId") int webId, @Param("basicCategoryIds") int[] basicCategoryIds, List<ArticleEntity> query(@Param("webId") int webId, @Param("basicCategoryIds") int[] basicCategoryIds,
@Param("flag") String flag, @Param("noFlag") String noFlag, @Param("orderBy") String orderBy, @Param("flag") String flag, @Param("noFlag") String noFlag, @Param("orderBy") String orderBy,
@Param("order") boolean order, @Param("beginTime") String beginTime,@Param("endTime") String endTime, @Param("order") boolean order, @Param("beginTime") String beginTime,@Param("endTime") String endTime,
@Param("article") ArticleEntity article); @Param("article") ArticleEntity article);
/** /**
* 根据页面栏目的id获取与其绑定的文章实体 * 根据页面栏目的id获取与其绑定的文章实体
@ -152,8 +152,8 @@ public interface IArticleDao extends IBaseDao {
*/ */
@Deprecated @Deprecated
List<ArticleEntity> queryListForSearch(@Param("tableName") String tableName, @Param("map") Map<String, List> map, List<ArticleEntity> queryListForSearch(@Param("tableName") String tableName, @Param("map") Map<String, List> map,
@Param("websiteId") int websiteId, @Param("ids") List ids, @Param("websiteId") int websiteId, @Param("ids") List ids,
@Param("sortMap") Map sortMap); @Param("sortMap") Map sortMap);
/** /**
* 查询文章编号集合 * 查询文章编号集合
@ -163,5 +163,7 @@ public interface IArticleDao extends IBaseDao {
* @param endTime 结束时间 * @param endTime 结束时间
* @return * @return
*/ */
public List<ColumnArticleIdBean> queryIdsByCategoryIdForParser(@Param("categoryId")int categoryId,@Param("appId")int appId , @Param("beginTime") String beginTime,@Param("endTime") String endTime); public List<ColumnArticleIdBean> queryIdsByCategoryIdForParser(@Param("categoryId")int categoryId,@Param("appId")int appId , @Param("beginTime") String beginTime,@Param("endTime") String endTime,@Param("orderBy")String orderBy,@Param("order")String order);
} }

@ -36,7 +36,7 @@
<result column="BASIC_DISPLAY" property="basicDisplay" /> <result column="BASIC_DISPLAY" property="basicDisplay" />
<!-- 一对一关联栏目 --> <!-- 一对一关联栏目 -->
<association property="column" column="COLUMN_CATEGORY_ID" <association property="column" column="COLUMN_CATEGORY_ID"
javaType="net.mingsoft.basic.entity.ColumnEntity"> javaType="net.mingsoft.basic.entity.ColumnEntity">
<result property="columnPath" column="column_path" /> <result property="columnPath" column="column_path" />
<result property="categoryTitle" column="category_title" /> <result property="categoryTitle" column="category_title" />
<result property="categoryId" column="category_id" /> <result property="categoryId" column="category_id" />
@ -50,6 +50,7 @@
<result column="ARTICLE_BASICID" property="articleId" /> <result column="ARTICLE_BASICID" property="articleId" />
<result column="column_path" property="columnPath"/> <result column="column_path" property="columnPath"/>
<result column="column_url" property="columnUrl" /> <result column="column_url" property="columnUrl" />
<result column="column_listurl" property="columnListUrl" />
<result column="category_title" property="categoryTitle" /> <result column="category_title" property="categoryTitle" />
<result column="category_id" property="categoryId" /> <result column="category_id" property="categoryId" />
<result column="COLUMN_CM_ID" property="columnContentModelId" /> <result column="COLUMN_CM_ID" property="columnContentModelId" />
@ -85,7 +86,7 @@
<result column="BASIC_DISPLAY" property="basicDisplay" /> <result column="BASIC_DISPLAY" property="basicDisplay" />
<!-- 一对一关联栏目 --> <!-- 一对一关联栏目 -->
<association property="column" <association property="column"
javaType="net.mingsoft.basic.entity.ColumnEntity"> javaType="net.mingsoft.basic.entity.ColumnEntity">
<result property="columnPath" column="column_path" /> <result property="columnPath" column="column_path" />
<result property="categoryTitle" column="category_title" /> <result property="categoryTitle" column="category_title" />
<result property="categoryId" column="category_id" /> <result property="categoryId" column="category_id" />
@ -237,7 +238,7 @@
<if test="basicCategoryIds != null"> <if test="basicCategoryIds != null">
and b.BASIC_CATEGORYID in and b.BASIC_CATEGORYID in
<foreach collection="basicCategoryIds" index="index" item="categoryId" <foreach collection="basicCategoryIds" index="index" item="categoryId"
open="(" separator="," close=")"> open="(" separator="," close=")">
#{categoryId} #{categoryId}
</foreach> </foreach>
</if> </if>
@ -270,7 +271,7 @@
<if test="basicCategoryIds != null"> <if test="basicCategoryIds != null">
and b.BASIC_CATEGORYID in and b.BASIC_CATEGORYID in
<foreach collection="basicCategoryIds" index="index" item="categoryId" <foreach collection="basicCategoryIds" index="index" item="categoryId"
open="(" separator="," close=")"> open="(" separator="," close=")">
#{categoryId} #{categoryId}
</foreach> </foreach>
</if> </if>
@ -321,8 +322,8 @@
<select id="queryIdsByCategoryIdForParser" resultMap="resultMapBean" > <select id="queryIdsByCategoryIdForParser" resultMap="resultMapBean" >
select select
ARTICLE_BASICID,cl.*,c.* ARTICLE_BASICID,cl.*,c.*
FROM cms_article a LEFT JOIN basic b ON a.ARTICLE_BASICID = b.BASIC_ID FROM cms_article a LEFT JOIN basic ON a.ARTICLE_BASICID = basic.BASIC_ID
LEFT JOIN basic_column cl ON b.BASIC_CATEGORYID = cl.COLUMN_CATEGORY_ID LEFT JOIN basic_column cl ON basic.BASIC_CATEGORYID = cl.COLUMN_CATEGORY_ID
JOIN category c ON c.CATEGORY_ID = cl.COLUMN_CATEGORY_ID JOIN category c ON c.CATEGORY_ID = cl.COLUMN_CATEGORY_ID
where where
<if test="appId &gt; 0"> <if test="appId &gt; 0">
@ -330,14 +331,17 @@
</if> </if>
<!-- 查询子栏目数据 --> <!-- 查询子栏目数据 -->
<if test="categoryId &gt; 0"> <if test="categoryId &gt; 0">
and (b.basic_categoryid=#{categoryId} or b.basic_categoryid in and (basic.basic_categoryid=#{categoryId} or basic.basic_categoryid in
(select category_id FROM category where <include refid="queryWhereCategoryId"></include>)) (select category_id FROM category where <include refid="queryWhereCategoryId"></include>))
</if> </if>
<if test="beginTime!=null and beginTime!=''"> <if test="beginTime!=null and beginTime!=''">
and b.basic_updatetime &gt;= #{beginTime} and basic.basic_updatetime &gt;= #{beginTime}
</if> </if>
<if test="endTime!=null and endTime!=''"> <if test="endTime!=null and endTime!=''">
and b.basic_updatetime &gt;= #{endTime} and basic.basic_updatetime &gt;= #{endTime}
</if>
<if test="orderBy!=null and order!=null and orderBy!='' and order!=''">
ORDER BY `${orderBy}` ${order}
</if> </if>
</select> </select>
@ -359,24 +363,24 @@
<!-- 根据字段条件查找文章实体开始 --> <!-- 根据字段条件查找文章实体开始 -->
<sql id="queryLike" databaseId="mysql"> <sql id="queryLike" databaseId="mysql">
like CONCAT("%", like CONCAT("%",
<foreach item="val" index="index" collection="item[3]"> <foreach item="val" index="index" collection="item[3]">
<if test="index==0">#{val}</if> <if test="index==0">#{val}</if>
</foreach> </foreach>
,"%") ,"%")
</sql> </sql>
<sql id="queryLike" databaseId="oracle"> <sql id="queryLike" databaseId="oracle">
like '%'|| like '%'||
<foreach item="val" index="index" collection="item[3]"> <foreach item="val" index="index" collection="item[3]">
<if test="index==0">#{val}</if> <if test="index==0">#{val}</if>
</foreach> </foreach>
||'%' ||'%'
</sql> </sql>
<sql id="queryLike" databaseId="sqlServer"> <sql id="queryLike" databaseId="sqlServer">
like '%'+ like '%'+
<foreach item="val" index="index" collection="item[3]"> <foreach item="val" index="index" collection="item[3]">
<if test="index==0">#{val}</if> <if test="index==0">#{val}</if>
</foreach> </foreach>
+'%' +'%'
</sql> </sql>
<!-- 已过期 --> <!-- 已过期 -->
<select id="queryListForSearch" resultMap="resultMap"> <select id="queryListForSearch" resultMap="resultMap">
@ -398,12 +402,12 @@
and and
b.BASIC_CATEGORYID in b.BASIC_CATEGORYID in
<foreach item="id" index="key" collection="ids" open="(" <foreach item="id" index="key" collection="ids" open="("
separator="," close=")"> separator="," close=")">
#{id.categoryId} #{id.categoryId}
</foreach> </foreach>
</if> </if>
<foreach item="item" index="key" collection="map" open="" <foreach item="item" index="key" collection="map" open=""
separator="" close=""> separator="" close="">
<if test=" item[0] == false"> <if test=" item[0] == false">
and ${key} and ${key}
</if> </if>
@ -421,7 +425,7 @@
<if test="item[2] == false"> <if test="item[2] == false">
between between
<foreach item="val" index="index" collection="item[3]" <foreach item="val" index="index" collection="item[3]"
separator="and"> separator="and">
#{val} #{val}
</foreach> </foreach>
</if> </if>
@ -465,7 +469,7 @@
and FIND_IN_SET(category_categoryid,'${ids}') and FIND_IN_SET(category_categoryid,'${ids}')
</if> </if>
<foreach item="item" index="key" collection="map" open="" <foreach item="item" index="key" collection="map" open=""
separator="" close=""> separator="" close="">
<if test=" item[0] == false"> <if test=" item[0] == false">
and ${key} and ${key}
</if> </if>
@ -483,7 +487,7 @@
<if test="item[2] == false"> <if test="item[2] == false">
between between
<foreach item="val" index="index" collection="item[3]" <foreach item="val" index="index" collection="item[3]"
separator="and"> separator="and">
#{val} #{val}
</foreach> </foreach>
</if> </if>
@ -509,8 +513,8 @@
<include refid="basic_data_list" /> <include refid="basic_data_list" />
from from
(((basic JOIN cms_article ON (BASIC_ID = ARTICLE_BASICID)) (((basic JOIN cms_article ON (BASIC_ID = ARTICLE_BASICID))
JOIN basic_column ON (BASIC_CATEGORYID = COLUMN_CATEGORY_ID)) JOIN basic_column ON (BASIC_CATEGORYID = COLUMN_CATEGORY_ID))
JOIN category ON (COLUMN_CATEGORY_ID = CATEGORY_ID)) JOIN category ON (COLUMN_CATEGORY_ID = CATEGORY_ID))
<if test="contentModelTableName!=null"> <if test="contentModelTableName!=null">
left join ${contentModelTableName} cmt on left join ${contentModelTableName} cmt on
cmt.basicid=basic_id cmt.basicid=basic_id
@ -533,10 +537,10 @@
<sql id="selectOne"> <sql id="selectOne">
from from
(((basic JOIN cms_article ON (BASIC_ID = ARTICLE_BASICID)) (((basic JOIN cms_article ON (BASIC_ID = ARTICLE_BASICID))
JOIN basic_column ON (BASIC_CATEGORYID = COLUMN_CATEGORY_ID)) JOIN basic_column ON (BASIC_CATEGORYID = COLUMN_CATEGORY_ID))
JOIN category ON (COLUMN_CATEGORY_ID = CATEGORY_ID)) JOIN category ON (COLUMN_CATEGORY_ID = CATEGORY_ID))
where category_appid=#{appId} where category_appid=#{appId}
<if test="flag==false"> <if test="flag==false">
and basic_id &lt; ${basicId} and basic_id &lt; ${basicId}
@ -600,10 +604,10 @@
<select id="getByCategoryId" resultMap="resultMap"> <select id="getByCategoryId" resultMap="resultMap">
select select
<include refid="basic_data_list" /> <include refid="basic_data_list" />
from from
(((basic JOIN cms_article ON (BASIC_ID = ARTICLE_BASICID)) (((basic JOIN cms_article ON (BASIC_ID = ARTICLE_BASICID))
JOIN basic_column ON (BASIC_CATEGORYID = COLUMN_CATEGORY_ID)) JOIN basic_column ON (BASIC_CATEGORYID = COLUMN_CATEGORY_ID))
JOIN category ON (COLUMN_CATEGORY_ID = CATEGORY_ID)) JOIN category ON (COLUMN_CATEGORY_ID = CATEGORY_ID))
where basic_categoryId=#{categoryId} order by basic_id desc where basic_categoryId=#{categoryId} order by basic_id desc
</select> </select>
@ -613,7 +617,7 @@
<where> <where>
ARTICLE_BASICID in ARTICLE_BASICID in
<foreach collection="ids" item="item" index="index" open="(" <foreach collection="ids" item="item" index="index" open="("
separator="," close=")">#{item}</foreach> separator="," close=")">#{item}</foreach>
</where> </where>
</delete> </delete>

@ -1,5 +1,6 @@
#mcms\u7248\u672c #mcms\u7248\u672C
version=d3a98fefcb242db78da5fc31608ff247 version=d3a98fefcb242db78da5fc31608ff247
templet.file=\u6a21\u677f\u6587\u4ef6\u4e0d\u5b58\u5728 templet.file=\u6A21\u677F\u6587\u4EF6\u4E0D\u5B58\u5728
id=\u6587\u7ae0\u7f16\u53f7 id=\u6587\u7AE0\u7F16\u53F7
typeid=\u680f\u76ee\u7f16\u53f7 typeid=\u680F\u76EE\u7F16\u53F7
order=\u6392\u5E8F

Loading…
Cancel
Save