Browse Source

调整已删除大类、过期时间过滤

shane 5 years ago
parent
commit
3759933ed3

+ 9 - 0
java110-bean/src/main/java/com/java110/dto/activities/ActivitiesDto.java

@@ -28,6 +28,7 @@ public class ActivitiesDto extends PageDto implements Serializable {
     private String context;
     private String startTime;
     private String endTime;
+    private String endTimeFlag;
     private String communityId;
     private String headerImg;
     private String state;
@@ -133,6 +134,14 @@ public class ActivitiesDto extends PageDto implements Serializable {
         this.endTime = endTime;
     }
 
+    public String getEndTimeFlag() {
+        return endTimeFlag;
+    }
+
+    public void setEndTimeFlag(String endTimeFlag) {
+        this.endTimeFlag = endTimeFlag;
+    }
+
     public String getCommunityId() {
         return communityId;
     }

+ 5 - 2
java110-db/src/main/resources/mapper/community/ActivitiesServiceDaoImplMapper.xml

@@ -140,9 +140,9 @@
         typeCd,t.context,t.start_time,t.start_time startTime,t.end_time,t.end_time endTime,t.community_id,t.community_id
         communityId,t.b_id,t.b_id bId,t.header_img,t.header_img headerImg,t.state,act.type_name typeCdName,t.create_time createTime
         from activities t
-        left join activities_type act on t.type_cd = act.type_cd and act.status_cd = '0' and t.community_id = act.community_id
+        left join activities_type act on t.type_cd = act.type_cd and t.community_id = act.community_id
         where 1 =1
-        and t.status_cd= '0'
+        and t.status_cd= '0' and act.status_cd = '0'
         <if test="collectCount !=null and collectCount != ''">
             and t.collect_count= #{collectCount}
         </if>
@@ -183,6 +183,9 @@
         <if test="headerImg !=null and headerImg != ''">
             and t.header_img= #{headerImg}
         </if>
+        <if test="endTimeFlag == null or endTimeFlag == ''">
+            and t.end_time > now()
+        </if>
         <if test="state !=null and state != ''">
             and t.state= #{state}
         </if>