parent
1d157e2d54
commit
d76a627f2c
|
@ -30,6 +30,16 @@ public enum DisposeTaskStatus implements BaseEnum {
|
||||||
* The Task expired.
|
* The Task expired.
|
||||||
*/
|
*/
|
||||||
TASK_EXPIRED(5, "过期"),
|
TASK_EXPIRED(5, "过期"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Task start failed dispose task status.
|
||||||
|
*/
|
||||||
|
TASK_START_FAILED(6, "启动失败"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Task stop failed dispose task status.
|
||||||
|
*/
|
||||||
|
TASK_STOP_FAILED(7, "停止失败"),
|
||||||
;
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -57,6 +57,7 @@
|
||||||
FROM device_task
|
FROM device_task
|
||||||
WHERE status = ${@com.dispose.common.DisposeTaskStatus@TASK_NEW.getValue()}
|
WHERE status = ${@com.dispose.common.DisposeTaskStatus@TASK_NEW.getValue()}
|
||||||
OR status = ${@com.dispose.common.DisposeTaskStatus@TASK_STARTING.getValue()}
|
OR status = ${@com.dispose.common.DisposeTaskStatus@TASK_STARTING.getValue()}
|
||||||
|
OR status = ${@com.dispose.common.DisposeTaskStatus@TASK_START_FAILED.getValue()}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getRunningTaskInfos" resultMap="device_task">
|
<select id="getRunningTaskInfos" resultMap="device_task">
|
||||||
|
@ -65,6 +66,7 @@
|
||||||
WHERE status = ${@com.dispose.common.DisposeTaskStatus@TASK_NEW.getValue()}
|
WHERE status = ${@com.dispose.common.DisposeTaskStatus@TASK_NEW.getValue()}
|
||||||
OR status = ${@com.dispose.common.DisposeTaskStatus@TASK_STARTING.getValue()}
|
OR status = ${@com.dispose.common.DisposeTaskStatus@TASK_STARTING.getValue()}
|
||||||
OR status = ${@com.dispose.common.DisposeTaskStatus@TASK_STARTED.getValue()}
|
OR status = ${@com.dispose.common.DisposeTaskStatus@TASK_STARTED.getValue()}
|
||||||
|
OR status = ${@com.dispose.common.DisposeTaskStatus@TASK_STOP_FAILED.getValue()}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getTaskByDetails" resultMap="device_task">
|
<select id="getTaskByDetails" resultMap="device_task">
|
||||||
|
@ -79,6 +81,8 @@
|
||||||
SET status = #{status}
|
SET status = #{status}
|
||||||
<if test="status == @com.dispose.common.DisposeTaskStatus@TASK_FINISHED
|
<if test="status == @com.dispose.common.DisposeTaskStatus@TASK_FINISHED
|
||||||
or status == @com.dispose.common.DisposeTaskStatus@TASK_CANCELED
|
or status == @com.dispose.common.DisposeTaskStatus@TASK_CANCELED
|
||||||
|
or status == @com.dispose.common.DisposeTaskStatus@TASK_START_FAILED
|
||||||
|
or status == @com.dispose.common.DisposeTaskStatus@TASK_STOP_FAILED
|
||||||
or status == @com.dispose.common.DisposeTaskStatus@TASK_EXPIRED">
|
or status == @com.dispose.common.DisposeTaskStatus@TASK_EXPIRED">
|
||||||
, endTime = CURRENT_TIMESTAMP
|
, endTime = CURRENT_TIMESTAMP
|
||||||
</if>
|
</if>
|
||||||
|
|
|
@ -122,6 +122,8 @@
|
||||||
dt.currentStatus != ${@com.dispose.common.DisposeTaskStatus@TASK_FINISHED.getValue()} AND
|
dt.currentStatus != ${@com.dispose.common.DisposeTaskStatus@TASK_FINISHED.getValue()} AND
|
||||||
dt.currentStatus != ${@com.dispose.common.DisposeTaskStatus@TASK_CANCELED.getValue()} AND
|
dt.currentStatus != ${@com.dispose.common.DisposeTaskStatus@TASK_CANCELED.getValue()} AND
|
||||||
dt.currentStatus != ${@com.dispose.common.DisposeTaskStatus@TASK_EXPIRED.getValue()} AND
|
dt.currentStatus != ${@com.dispose.common.DisposeTaskStatus@TASK_EXPIRED.getValue()} AND
|
||||||
|
dt.currentStatus != ${@com.dispose.common.DisposeTaskStatus@TASK_START_FAILED.getValue()} AND
|
||||||
|
dt.currentStatus != ${@com.dispose.common.DisposeTaskStatus@TASK_STOP_FAILED.getValue()} AND
|
||||||
dt.planEndTime > CURRENT_TIMESTAMP()
|
dt.planEndTime > CURRENT_TIMESTAMP()
|
||||||
<if test="deviceId != -1">
|
<if test="deviceId != -1">
|
||||||
AND dt.deviceId = #{deviceId}
|
AND dt.deviceId = #{deviceId}
|
||||||
|
@ -163,6 +165,8 @@
|
||||||
currentStatus = #{status}
|
currentStatus = #{status}
|
||||||
<if test="status == @com.dispose.common.DisposeTaskStatus@TASK_FINISHED
|
<if test="status == @com.dispose.common.DisposeTaskStatus@TASK_FINISHED
|
||||||
or status == @com.dispose.common.DisposeTaskStatus@TASK_CANCELED
|
or status == @com.dispose.common.DisposeTaskStatus@TASK_CANCELED
|
||||||
|
or status == @com.dispose.common.DisposeTaskStatus@TASK_START_FAILED
|
||||||
|
or status == @com.dispose.common.DisposeTaskStatus@TASK_STOP_FAILED
|
||||||
or status == @com.dispose.common.DisposeTaskStatus@TASK_EXPIRED">
|
or status == @com.dispose.common.DisposeTaskStatus@TASK_EXPIRED">
|
||||||
, endTime = CURRENT_TIMESTAMP
|
, endTime = CURRENT_TIMESTAMP
|
||||||
</if>
|
</if>
|
||||||
|
|
Loading…
Reference in New Issue