wuxw 6 роки тому
батько
коміт
85687eda0f

+ 11 - 10
java110-db/src/main/resources/mapper/community/ActivitiesServiceDaoImplMapper.xml

@@ -54,10 +54,10 @@ collect_count,like_count,title,read_count,user_name,user_id,activities_id,operat
         <if test="context !=null and context != ''">
         <if test="context !=null and context != ''">
             and t.context= #{context}
             and t.context= #{context}
         </if>
         </if>
-        <if test="startTime !=null and startTime != ''">
+        <if test="startTime !=null ">
             and t.start_time= #{startTime}
             and t.start_time= #{startTime}
         </if>
         </if>
-        <if test="endTime !=null and endTime != ''">
+        <if test="endTime !=null ">
             and t.end_time= #{endTime}
             and t.end_time= #{endTime}
         </if>
         </if>
         <if test="communityId !=null and communityId != ''">
         <if test="communityId !=null and communityId != ''">
@@ -113,10 +113,10 @@ collect_count,like_count,title,read_count,user_name,user_id,activities_id,operat
         <if test="context !=null and context != ''">
         <if test="context !=null and context != ''">
             and t.context= #{context}
             and t.context= #{context}
         </if>
         </if>
-        <if test="startTime !=null and startTime != ''">
+        <if test="startTime !=null ">
             and t.start_time= #{startTime}
             and t.start_time= #{startTime}
         </if>
         </if>
-        <if test="endTime !=null and endTime != ''">
+        <if test="endTime !=null ">
             and t.end_time= #{endTime}
             and t.end_time= #{endTime}
         </if>
         </if>
         <if test="communityId !=null and communityId != ''">
         <if test="communityId !=null and communityId != ''">
@@ -171,10 +171,10 @@ collect_count,like_count,title,read_count,user_name,user_id,activities_id,operat
         <if test="context !=null and context != ''">
         <if test="context !=null and context != ''">
             and t.context= #{context}
             and t.context= #{context}
         </if>
         </if>
-        <if test="startTime !=null and startTime != ''">
+        <if test="startTime !=null ">
             and t.start_time= #{startTime}
             and t.start_time= #{startTime}
         </if>
         </if>
-        <if test="endTime !=null and endTime != ''">
+        <if test="endTime !=null ">
             and t.end_time= #{endTime}
             and t.end_time= #{endTime}
         </if>
         </if>
         <if test="communityId !=null and communityId != ''">
         <if test="communityId !=null and communityId != ''">
@@ -189,6 +189,7 @@ collect_count,like_count,title,read_count,user_name,user_id,activities_id,operat
         <if test="state !=null and state != ''">
         <if test="state !=null and state != ''">
             and t.state= #{state}
             and t.state= #{state}
         </if>
         </if>
+        order by t.create_time desc
         <if test="page != -1 and page != null ">
         <if test="page != -1 and page != null ">
             limit #{page}, #{row}
             limit #{page}, #{row}
         </if>
         </if>
@@ -226,10 +227,10 @@ collect_count,like_count,title,read_count,user_name,user_id,activities_id,operat
         <if test="context !=null and context != ''">
         <if test="context !=null and context != ''">
             , t.context= #{context}
             , t.context= #{context}
         </if>
         </if>
-        <if test="startTime !=null and startTime != ''">
+        <if test="startTime !=null ">
             , t.start_time= #{startTime}
             , t.start_time= #{startTime}
         </if>
         </if>
-        <if test="endTime !=null and endTime != ''">
+        <if test="endTime !=null ">
             , t.end_time= #{endTime}
             , t.end_time= #{endTime}
         </if>
         </if>
         <if test="communityId !=null and communityId != ''">
         <if test="communityId !=null and communityId != ''">
@@ -286,10 +287,10 @@ collect_count,like_count,title,read_count,user_name,user_id,activities_id,operat
         <if test="context !=null and context != ''">
         <if test="context !=null and context != ''">
             and t.context= #{context}
             and t.context= #{context}
         </if>
         </if>
-        <if test="startTime !=null and startTime != ''">
+        <if test="startTime !=null ">
             and t.start_time= #{startTime}
             and t.start_time= #{startTime}
         </if>
         </if>
-        <if test="endTime !=null and endTime != ''">
+        <if test="endTime !=null ">
             and t.end_time= #{endTime}
             and t.end_time= #{endTime}
         </if>
         </if>
         <if test="communityId !=null and communityId != ''">
         <if test="communityId !=null and communityId != ''">