remove unused method (#15743)
Co-authored-by: xiangzihao <460888207@qq.com>
This commit is contained in:
parent
49d04de3ae
commit
023c22c340
|
|
@ -199,22 +199,6 @@ public interface ProcessInstanceMapper extends BaseMapper<ProcessInstance> {
|
|||
@Param("endTime") Date endTime,
|
||||
@Param("testFlag") int testFlag);
|
||||
|
||||
/**
|
||||
* query last running process instance
|
||||
*
|
||||
* @param definitionCode definitionCode
|
||||
* @param startTime startTime
|
||||
* @param endTime endTime
|
||||
* @param testFlag testFlag
|
||||
* @param stateArray stateArray
|
||||
* @return process instance
|
||||
*/
|
||||
ProcessInstance queryLastRunningProcess(@Param("processDefinitionCode") Long definitionCode,
|
||||
@Param("startTime") Date startTime,
|
||||
@Param("endTime") Date endTime,
|
||||
@Param("testFlag") int testFlag,
|
||||
@Param("states") int[] stateArray);
|
||||
|
||||
/**
|
||||
* query last manual process instance
|
||||
*
|
||||
|
|
|
|||
|
|
@ -206,23 +206,6 @@
|
|||
</if>
|
||||
order by end_time desc limit 1
|
||||
</select>
|
||||
<select id="queryLastRunningProcess" resultType="org.apache.dolphinscheduler.dao.entity.ProcessInstance">
|
||||
select
|
||||
<include refid="baseSql"/>
|
||||
from t_ds_process_instance
|
||||
where process_definition_code=#{processDefinitionCode} and test_flag=#{testFlag}
|
||||
<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>
|
||||
<select id="queryLastManualProcess" resultType="org.apache.dolphinscheduler.dao.entity.ProcessInstance">
|
||||
select t1.*
|
||||
from
|
||||
|
|
|
|||
|
|
@ -269,27 +269,6 @@ public class ProcessInstanceMapperTest extends BaseDaoTest {
|
|||
processInstanceMapper.deleteById(processInstance.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* test query last running process instance
|
||||
*/
|
||||
@Test
|
||||
public void testQueryLastRunningProcess() {
|
||||
ProcessInstance processInstance = insertOne();
|
||||
processInstance.setState(WorkflowExecutionStatus.RUNNING_EXECUTION);
|
||||
processInstanceMapper.updateById(processInstance);
|
||||
|
||||
int[] stateArray = new int[]{
|
||||
WorkflowExecutionStatus.RUNNING_EXECUTION.ordinal(),
|
||||
WorkflowExecutionStatus.SUBMITTED_SUCCESS.ordinal()};
|
||||
|
||||
ProcessInstance processInstance1 = processInstanceMapper
|
||||
.queryLastRunningProcess(processInstance.getProcessDefinitionCode(), null, null,
|
||||
processInstance.getTestFlag(), stateArray);
|
||||
|
||||
Assertions.assertNotEquals(null, processInstance1);
|
||||
processInstanceMapper.deleteById(processInstance.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* test query last manual process instance
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue