hanfucheng 11 months ago
parent
commit
fd1d57ab9b

+ 22 - 18
src/main/resources/mapper/centereventteventcatalogue/CenterEventViewMapper.xml

@@ -457,23 +457,27 @@
         eventStatus,event_status_value eventStatusValue,create_time createTime,urge_count urgeCount,event_type_xl
         eventType,report_source reportSource
         from centerevent_t_eventcatalogue
-        where YEARWEEK( create_time ) = YEARWEEK( CURDATE() )
-        <if test="createBy != null and createBy != ''">
-            and create_by in ( ${createBy} )
-        </if>
-        <if test="eventTypeIdDl != null and eventTypeIdDl.length > 0">
-            and event_status_value in (
-            'forest_event_status_7','forest_event_status_2','forest_event_status_5','forest_event_status_6' )
-            and event_type in
-            <foreach item="eventTypeIdDl" collection="eventTypeIdDl" open="(" separator="," close=")">
-                #{eventTypeIdDl}
-            </foreach>
-        </if>
-        <if test="eventTypeId != null and eventTypeId.length > 0">
-            and event_type_xl in
-            <foreach item="eventTypeId" collection="eventTypeId" open="(" separator="," close=")">
-                #{eventTypeId}
-            </foreach>
-        </if>
+        <where>
+            <if test="day != null and day != ''">
+                and DATE_FORMAT(create_time,'%Y-%m-%d') = #{day}
+            </if>
+            <if test="createBy != null and createBy != ''">
+                and create_by in ( ${createBy} )
+            </if>
+            <if test="eventTypeIdDl != null and eventTypeIdDl.length > 0">
+                and event_status_value in (
+                'forest_event_status_7','forest_event_status_2','forest_event_status_5','forest_event_status_6' )
+                and event_type in
+                <foreach item="eventTypeIdDl" collection="eventTypeIdDl" open="(" separator="," close=")">
+                    #{eventTypeIdDl}
+                </foreach>
+            </if>
+            <if test="eventTypeId != null and eventTypeId.length > 0">
+                and event_type_xl in
+                <foreach item="eventTypeId" collection="eventTypeId" open="(" separator="," close=")">
+                    #{eventTypeId}
+                </foreach>
+            </if>
+        </where>
     </select>
 </mapper>