This is an automated email from the ASF dual-hosted git repository. caishunfeng pushed a commit to branch 3.1.0-prepare in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
commit 8c6658e3f9ed9c3bdcc89fb57932c1377a1fb3bf Author: juzimao <[email protected]> AuthorDate: Wed Sep 14 16:55:10 2022 +0800 Optimize date range condition (#11911) --- .../apache/dolphinscheduler/dao/mapper/ProcessInstanceMapper.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapper.xml b/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapper.xml index 0972fb7977..87e71a85f2 100644 --- a/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapper.xml +++ b/dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessInstanceMapper.xml @@ -122,8 +122,11 @@ <if test="searchVal != null and searchVal != ''"> and instance.name like concat('%', #{searchVal}, '%') </if> - <if test="startTime != null and endTime != null "> - and instance.start_time <![CDATA[ >= ]]> #{startTime} and instance.start_time <![CDATA[ <= ]]> #{endTime} + <if test="startTime != null"> + and instance.start_time <![CDATA[ >= ]]> #{startTime} + </if> + <if test="endTime != null"> + and instance.start_time <![CDATA[ <= ]]> #{endTime} </if> <if test="states != null and states.length > 0"> and instance.state in
