|
@@ -0,0 +1,37 @@
|
|
|
|
|
+package com.tzld.videoVector.controller;
|
|
|
|
|
+
|
|
|
|
|
+import com.tzld.videoVector.common.base.CommonResponse;
|
|
|
|
|
+import com.tzld.videoVector.model.param.DeconstructParam;
|
|
|
|
|
+import com.tzld.videoVector.model.param.GetDeconstructParam;
|
|
|
|
|
+import com.tzld.videoVector.model.param.MatchTopNVideoParam;
|
|
|
|
|
+import com.tzld.videoVector.service.VideoSearchService;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
+
|
|
|
|
|
+import java.util.List;
|
|
|
|
|
+
|
|
|
|
|
+@RestController
|
|
|
|
|
+@RequestMapping("/videoSearch")
|
|
|
|
|
+public class VideoSearchController {
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private VideoSearchService videoSearchService;
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/deconstruct")
|
|
|
|
|
+ public CommonResponse<String> deconstruct(@RequestBody DeconstructParam param) {
|
|
|
|
|
+ return CommonResponse.success(videoSearchService.deconstruct(param));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/getDeconstructResult")
|
|
|
|
|
+ public CommonResponse<String> getDeconstructResult(@RequestBody GetDeconstructParam param) {
|
|
|
|
|
+ return CommonResponse.success(videoSearchService.getDeconstructResult(param));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @PostMapping("/matchTopNVideo")
|
|
|
|
|
+ public CommonResponse<List<Object>> matchTopNVideo(@RequestBody MatchTopNVideoParam param) {
|
|
|
|
|
+ return CommonResponse.success(videoSearchService.matchTopNVideo(param));
|
|
|
|
|
+ }
|
|
|
|
|
+}
|