瀏覽代碼

上下篇的判断

sunxin 6 年之前
父節點
當前提交
4e7cd16ed0

文件差異過大導致無法顯示
+ 0 - 0
doc/4.6.5-to-4.7.0-mysql.sql


文件差異過大導致無法顯示
+ 0 - 0
doc/db-mcms-mysql-4.7.0.sql


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

@@ -160,8 +160,12 @@ public class SearchAction extends BaseAction {
 		ContentModelEntity contentModel = null; // 栏目对应模型
 		List<ContentModelFieldEntity> fieldList = new ArrayList<ContentModelFieldEntity>(); // 栏目对应字段
 		List<DiyModelMap> fieldValueList = new ArrayList<DiyModelMap>(); // 栏目对应字段的值
-		int typeId = BasicUtil.getInt("typeid",0);
+		int typeId = 0;
 		String categoryIds = BasicUtil.getString("categoryId");
+		//当传递了栏目编号,但不是栏目集合
+		if(!StringUtil.isBlank(categoryIds) && !categoryIds.contains(",")){
+			typeId = Integer.parseInt(categoryIds);
+		}
 		//记录自定义模型字段名
 		List filedStr = new ArrayList<>();
 		//根据栏目确定自定义模型

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

@@ -458,10 +458,10 @@
 		left join basic_column cl
 		on c.CATEGORY_ID =
 		cl.COLUMN_CATEGORY_ID
-		<if test="tableName!=null">left join ${tableName} d on d.basicId=a.ARTICLE_BASICID
+		<if test="tableName!=null and tableName!=''">left join ${tableName} d on d.basicId=a.ARTICLE_BASICID
 		</if>
 		where a.ARTICLE_WEBID = #{websiteId} 
-		<if test="ids!=null">
+		<if test="ids!=null and ids!=''">
 			and FIND_IN_SET(category_categoryid,'${ids}')
 		</if>
 		<foreach item="item" index="key" collection="map" open=""

部分文件因文件數量過多而無法顯示