From ebece79c440916cde07154e230139f4c52df168a Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期四, 19 十二月 2019 18:08:52 +0800
Subject: [PATCH] 帮助中心分页处理

---
 fanli/src/main/java/com/yeshi/fanli/mapping/help/HelpCenterMapper.xml |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/help/HelpCenterMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/help/HelpCenterMapper.xml
index 944fbb6..5ca491a 100644
--- a/fanli/src/main/java/com/yeshi/fanli/mapping/help/HelpCenterMapper.xml
+++ b/fanli/src/main/java/com/yeshi/fanli/mapping/help/HelpCenterMapper.xml
@@ -105,19 +105,19 @@
 	   </if>
 	</select>
 	
-	 <select id="queryIdAndTitle" resultMap="BaseResultMap">
-  	<!-- 鏍规嵁鏉′欢鏌ヨ鎵�鏈夋爣绛� -->
+   <select id="listValid" resultMap="BaseResultMap">
     SELECT  h_id, h_title FROM yeshi_ec_help_center	
-    	WHERE 1=1
-	   <if test='key != null and key != ""'>
+    WHERE h_id > #{pageId}
+    	 AND IF(h_start_time IS NULL,TRUE, h_start_time<![CDATA[<=]]>NOW())
+ 		 AND IF(h_end_time IS NULL,TRUE, h_end_time >=NOW())
+	  <if test='key != null and key != ""'>
 	   	   AND h_title like '%${key}%'
 	   </if>
 	   <if test='cid != null'>
 	   	   AND h_cid  = #{cid}
 	   </if>
-	    ORDER BY  h_weight  DESC, h_createtime
-
-		LIMIT ${start},${count}
+	    ORDER BY h_weight DESC
+		LIMIT ${count}
    </select>
 	
    <delete id="deleteBatchById" parameterType="int">

--
Gitblit v1.8.0