|
@@ -14,13 +14,13 @@ import com.taais.common.json.utils.JsonUtils;
|
|
|
import com.taais.common.orm.core.page.PageQuery;
|
|
|
import com.taais.common.core.core.page.PageResult;
|
|
|
import com.taais.common.orm.core.service.impl.BaseServiceImpl;
|
|
|
-import io.swagger.v3.oas.annotations.Parameter;
|
|
|
+import com.taais.system.domain.vo.SysOssVo;
|
|
|
+import com.taais.system.service.ISysOssService;
|
|
|
import jakarta.annotation.Resource;
|
|
|
-import lombok.Builder;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.http.client.methods.HttpPost;
|
|
|
import org.apache.http.entity.StringEntity;
|
|
|
-import org.opencv.video.Video;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -49,6 +49,9 @@ public class VideoStableServiceImpl extends BaseServiceImpl<VideoStableMapper, V
|
|
|
@Value("${server.video_stable_url}")
|
|
|
private String video_stable_url;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ISysOssService ossService;
|
|
|
+
|
|
|
@Resource
|
|
|
private VideoStableMapper videoStableMapper;
|
|
|
|
|
@@ -124,6 +127,16 @@ public class VideoStableServiceImpl extends BaseServiceImpl<VideoStableMapper, V
|
|
|
*/
|
|
|
@Override
|
|
|
public boolean insert(VideoStableBo videoStableBo) {
|
|
|
+ // 检查input_oss_id是否存在
|
|
|
+ if (ObjectUtil.isNull(videoStableBo.getInputOssId())) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ SysOssVo ossEntity = ossService.getById(videoStableBo.getInputOssId());
|
|
|
+ if (ObjectUtil.isNull(ossEntity)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
VideoStable videoStable = MapstructUtils.convert(videoStableBo, VideoStable.class);
|
|
|
videoStable.setStatus(BizConstant.VideoStatus.NOT_START);
|
|
|
|