atai-555 opened a new issue #5975:
URL: https://github.com/apache/dolphinscheduler/issues/5975
**Describe the bug**
In method queryLastRunningProcess of ProcessInstanceMapper.xml, when judging
the start time and the end time, the parentheses should be less.The version is
latest.
**Code**
<select id="queryLastRunningProcess"
resultType="org.apache.dolphinscheduler.dao.entity.ProcessInstance">
select
<include refid="baseSql"/>
from t_ds_process_instance
where process_definition_code=#{processDefinitionCode}
<if test="states !=null and states.length != 0">
and state in
<foreach collection="states" item="i" index="index" open="("
separator="," close=")">
#{i}
</foreach>
</if>
_<if test="startTime!=null and endTime != null ">
and (schedule_time <![CDATA[ >= ]]> #{startTime} and
schedule_time <![CDATA[ <= ]]> #{endTime}
or start_time <![CDATA[ >= ]]> #{startTime} and start_time
<![CDATA[ <= ]]> #{endTime})
</if>_
order by start_time desc limit 1
</select>
**It should look like this in the slash**
_<if test="startTime!=null and endTime != null ">
and ((schedule_time <![CDATA[ >= ]]> #{startTime} and
schedule_time <![CDATA[ <= ]]> #{endTime})
or (start_time <![CDATA[ >= ]]> #{startTime} and start_time
<![CDATA[ <= ]]> #{endTime}))
</if>_
Pls check it, thank you.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]