luowei 1 year ago
parent
commit
5b4f99dc72

+ 12 - 1
soc-modules/soc-modules-core/src/main/resources/mapper/evaluate/CoreEvaluateTaskMapper.xml

@@ -145,7 +145,18 @@
       AND b.`code` != 0
       LEFT JOIN core_evaluate_task c ON a.task_id = c.id
       WHERE
-      c.start_time <= #{startTime} AND c.end_time >= #{endTime} and
+      ((
+          #{startTime}   <=  c.start_time
+      and #{endTime} >= c.start_time
+      )
+      or (
+          #{startTime}   <= c.end_time
+      and #{endTime} >= c.end_time
+      )
+      or (
+          #{startTime} >=  c.start_time
+      and #{endTime}   <=  c.end_time
+      )) and
       a.id = #{id}
       GROUP BY
           b.content