|
@@ -6,6 +6,7 @@ import java.util.List;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.mybatisflex.core.paginate.Page;
|
|
|
import com.mybatisflex.core.query.QueryWrapper;
|
|
|
+import com.taais.biz.constant.BizConstant;
|
|
|
import com.taais.biz.domain.bo.VideoStableStartBo;
|
|
|
import com.taais.biz.domain.bo.VideoStableStartResultBo;
|
|
|
import com.taais.common.core.core.domain.CommonResult;
|
|
@@ -172,6 +173,8 @@ public class VideoStableServiceImpl extends BaseServiceImpl<VideoStableMapper, V
|
|
|
videoStable.setLklevel(videoStable.getLklevel());
|
|
|
videoStable.setLkwinSiz(videoStable.getLkwinSiz());
|
|
|
|
|
|
+ videoStable.setStatus(BizConstant.VideoStatus.RUNNING);
|
|
|
+
|
|
|
save(videoStable);
|
|
|
System.out.println(videoStable.getId());
|
|
|
|
|
@@ -189,6 +192,8 @@ public class VideoStableServiceImpl extends BaseServiceImpl<VideoStableMapper, V
|
|
|
return CommonResult.success("start video_stable success");
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
+ videoStable.setStatus(BizConstant.VideoStatus.FAILED);
|
|
|
+ updateById(videoStable);
|
|
|
e.printStackTrace();
|
|
|
return CommonResult.fail("start video_stable error -> " + e.getMessage());
|
|
|
}
|
|
@@ -196,6 +201,13 @@ public class VideoStableServiceImpl extends BaseServiceImpl<VideoStableMapper, V
|
|
|
|
|
|
@Override
|
|
|
public CommonResult getResult(VideoStableStartResultBo videoStableStartResultBo) {
|
|
|
- return null;
|
|
|
+ Long id = Long.valueOf(videoStableStartResultBo.getId());
|
|
|
+ String status = videoStableStartResultBo.getStatus();
|
|
|
+ String msg = videoStableStartResultBo.getMsg();
|
|
|
+ VideoStable videoStable = getById(id);
|
|
|
+ videoStable.setLog(msg);
|
|
|
+ videoStable.setStatus("200".equals(status) ? BizConstant.VideoStatus.END : BizConstant.VideoStatus.FAILED);
|
|
|
+ updateById(videoStable);
|
|
|
+ return CommonResult.success();
|
|
|
}
|
|
|
}
|