|
@@ -9,6 +9,7 @@ import com.tzld.piaoquan.content.understanding.service.LoghubService;
|
|
import com.tzld.piaoquan.content.understanding.service.PipelineService;
|
|
import com.tzld.piaoquan.content.understanding.service.PipelineService;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.Objects;
|
|
import java.util.Objects;
|
|
@@ -26,11 +27,15 @@ public class ContentServiceImpl implements ContentService {
|
|
@Autowired
|
|
@Autowired
|
|
private PipelineService pipelineService;
|
|
private PipelineService pipelineService;
|
|
|
|
|
|
|
|
+ @Value("${video.analyse.pipelineId:1}")
|
|
|
|
+ private Long videoAnalysePipelineId;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public void analyse(ContentAnalyseParam param) {
|
|
public void analyse(ContentAnalyseParam param) {
|
|
- if (Objects.isNull(param) || Objects.isNull(param.getPipelineId()) || Objects.isNull(param.getType())) {
|
|
|
|
|
|
+ if (Objects.isNull(param) || Objects.isNull(param.getType())) {
|
|
throw new CommonException(ExceptionEnum.PARAMS_INVALID);
|
|
throw new CommonException(ExceptionEnum.PARAMS_INVALID);
|
|
}
|
|
}
|
|
|
|
+ param.setPipelineId(videoAnalysePipelineId);
|
|
pipelineService.execute(param);
|
|
pipelineService.execute(param);
|
|
}
|
|
}
|
|
}
|
|
}
|