소스 검색

视频审核

孙永军 1 년 전
부모
커밋
6e868793c3
2개의 변경된 파일66개의 추가작업 그리고 11개의 파일을 삭제
  1. 53 9
      src/main/java/com/sxtvs/open/api/review/dto/VideoReviewResp.java
  2. 13 2
      src/main/java/com/sxtvs/open/api/review/dto/VideoUploadResp.java

+ 53 - 9
src/main/java/com/sxtvs/open/api/review/dto/VideoReviewResp.java

@@ -1,6 +1,7 @@
 package com.sxtvs.open.api.review.dto;
 
 import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonProperty;
 import com.sxtvs.open.api.review.entity.TypeDict;
 import lombok.Data;
 import lombok.NoArgsConstructor;
@@ -12,101 +13,141 @@ import java.util.List;
 public class VideoReviewResp {
 
     @JSONField(name = "userName")
+    @JsonProperty("userName")
     private String userName;
     @JSONField(name = "taskId")
+    @JsonProperty("taskId")
     private String taskId;
     @JSONField(name = "source")
+    @JsonProperty("source")
     private String source;
     @JSONField(name = "url")
+    @JsonProperty("url")
     private String url;
     @JSONField(name = "description")
+    @JsonProperty("description")
     private String description;
     @JSONField(name = "preset")
+    @JsonProperty("preset")
     private String preset;
     @JSONField(name = "status")
+    @JsonProperty("status")
     private String status;
     @JSONField(name = "statusDesc")
+    @JsonProperty("statusDesc")
     private String statusDesc;
     @JSONField(name = "label")
+    @JsonProperty("label")
     private String label;
     @JSONField(name = "labelDesc")
+    @JsonProperty("labelDesc")
     private String labelDesc;
     @JSONField(name = "duration")
+    @JsonProperty("duration")
     private Integer duration;
     @JSONField(name = "notification")
+    @JsonProperty("notification")
     private String notification;
     @JSONField(name = "results")
+    @JsonProperty("results")
     private List<ResultsDTO> results;
     @JSONField(name = "createTime")
+    @JsonProperty("createTime")
     private String createTime;
     @JSONField(name = "startTime")
+    @JsonProperty("startTime")
     private String startTime;
     @JSONField(name = "finishTime")
+    @JsonProperty("finishTime")
     private String finishTime;
     @JSONField(name = "streamId")
+    @JsonProperty("streamId")
     private String streamId;
     @JSONField(name = "callbackType")
+    @JsonProperty("callbackType")
     private String callbackType;
     @JSONField(name = "ocrResults")
+    @JsonProperty("ocrResults")
     private List<OcrResultsDTO> ocrResults;
 
     @NoArgsConstructor
     @Data
     public static class ResultsDTO {
         @JSONField(name = "type")
+        @JsonProperty("type")
         private String type;
         @JSONField(name = "typeDesc")
+        @JsonProperty("typeDesc")
         private String typeDesc;
         @JSONField(name = "items")
+        @JsonProperty("items")
         private List<ItemsDTO> items;
 
         @NoArgsConstructor
         @Data
         public static class ItemsDTO {
             @JSONField(name = "subType")
+            @JsonProperty("subType")
             private String subType;
             @JSONField(name = "subTypeDesc")
+            @JsonProperty("subTypeDesc")
             private String subTypeDesc;
             @JSONField(name = "target")
+            @JsonProperty("target")
             private String target;
             @JSONField(name = "startTimeInSeconds")
+            @JsonProperty("startTimeInSeconds")
             private Integer startTimeInSeconds;
             @JSONField(name = "endTimeInSeconds")
+            @JsonProperty("endTimeInSeconds")
             private Integer endTimeInSeconds;
             @JSONField(name = "confidence")
+            @JsonProperty("confidence")
             private Double confidence;
             @JSONField(name = "label")
+            @JsonProperty("label")
             private String label;
             @JSONField(name = "labelDesc")
+            @JsonProperty("labelDesc")
             private String labelDesc;
             @JSONField(name = "extra")
+            @JsonProperty("extra")
             private String extra;
             @JSONField(name = "evidence")
+            @JsonProperty("evidence")
             private EvidenceDTO evidence;
             @JSONField(name = "timeInSeconds")
+            @JsonProperty("timeInSeconds")
             private Integer timeInSeconds;
 
             @NoArgsConstructor
             @Data
             public static class EvidenceDTO {
                 @JSONField(name = "text")
+                @JsonProperty("text")
                 private String text;
 
                 @JSONField(name = "thumbnail")
+                @JsonProperty("thumbnail")
                 private String thumbnail;
                 @JSONField(name = "location")
+                @JsonProperty("location")
                 private LocationDTO location;
 
                 @NoArgsConstructor
                 @Data
                 public static class LocationDTO {
                     @JSONField(name = "leftOffsetInPixel")
+                    @JsonProperty("leftOffsetInPixel")
                     private Integer leftOffsetInPixel;
                     @JSONField(name = "topOffsetInPixel")
+                    @JsonProperty("topOffsetInPixel")
                     private Integer topOffsetInPixel;
                     @JSONField(name = "widthInPixel")
+                    @JsonProperty("widthInPixel")
                     private Integer widthInPixel;
                     @JSONField(name = "heightInPixel")
+                    @JsonProperty("heightInPixel")
                     private Integer heightInPixel;
                 }
             }
@@ -117,34 +158,37 @@ public class VideoReviewResp {
     @Data
     public static class OcrResultsDTO {
         @JSONField(name = "text")
+        @JsonProperty("text")
         private String text;
         @JSONField(name = "complex")
+        @JsonProperty("complex")
         private Boolean complex;
         @JSONField(name = "timeInSeconds")
+        @JsonProperty("timeInSeconds")
         private Integer timeInSeconds;
     }
 
 
-    public void fill(){
-        if (TypeDict.STATUS.containsKey(this.status)){
+    public void fill() {
+        if (TypeDict.STATUS.containsKey(this.status)) {
             this.statusDesc = TypeDict.STATUS.get(this.status);
         }
-        if (TypeDict.LABEL.containsKey(this.label)){
+        if (TypeDict.LABEL.containsKey(this.label)) {
             this.labelDesc = TypeDict.LABEL.get(this.label);
         }
-        if (this.results == null){
+        if (this.results == null) {
             return;
         }
-        for(ResultsDTO resultsDTO : this.results){
-            if (TypeDict.TYPE.containsKey(resultsDTO.type)){
+        for (ResultsDTO resultsDTO : this.results) {
+            if (TypeDict.TYPE.containsKey(resultsDTO.type)) {
                 resultsDTO.typeDesc = TypeDict.TYPE.get(resultsDTO.type);
             }
 
-            for(ResultsDTO.ItemsDTO itemsDTO : resultsDTO.items){
-                if (TypeDict.LABEL.containsKey(itemsDTO.label)){
+            for (ResultsDTO.ItemsDTO itemsDTO : resultsDTO.items) {
+                if (TypeDict.LABEL.containsKey(itemsDTO.label)) {
                     itemsDTO.labelDesc = TypeDict.LABEL.get(itemsDTO.label);
                 }
-                if (TypeDict.TYPE.containsKey(itemsDTO.subType)){
+                if (TypeDict.TYPE.containsKey(itemsDTO.subType)) {
                     itemsDTO.subTypeDesc = TypeDict.TYPE.get(itemsDTO.subType);
                 }
             }

+ 13 - 2
src/main/java/com/sxtvs/open/api/review/dto/VideoUploadResp.java

@@ -1,6 +1,7 @@
 package com.sxtvs.open.api.review.dto;
 
 import com.alibaba.fastjson.annotation.JSONField;
+import com.fasterxml.jackson.annotation.JsonProperty;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 
@@ -9,30 +10,40 @@ import java.util.List;
 @NoArgsConstructor
 @Data
 public class VideoUploadResp {
-
-
     @JSONField(name = "userName")
+    @JsonProperty("userName")
     private String userName;
     @JSONField(name = "taskId")
+    @JsonProperty("taskId")
     private String taskId;
     @JSONField(name = "source")
+    @JsonProperty("source")
     private String source;
     @JSONField(name = "url")
+    @JsonProperty("url")
     private String url;
     @JSONField(name = "description")
+    @JsonProperty("description")
     private String description;
     @JSONField(name = "preset")
+    @JsonProperty("preset")
     private String preset;
     @JSONField(name = "status")
+    @JsonProperty("status")
     private String status;
     @JSONField(name = "notification")
+    @JsonProperty("notification")
     private String notification;
     @JSONField(name = "createTime")
+    @JsonProperty("createTime")
     private String createTime;
     @JSONField(name = "streamId")
+    @JsonProperty("streamId")
     private String streamId;
     @JSONField(name = "callbackType")
+    @JsonProperty("callbackType")
     private String callbackType;
     @JSONField(name = "ocrResults")
+    @JsonProperty("ocrResults")
     private List<?> ocrResults;
 }