|
@@ -1,6 +1,5 @@
|
|
|
package cn.reghao.tnb.file.app.service;
|
|
package cn.reghao.tnb.file.app.service;
|
|
|
|
|
|
|
|
-import cn.reghao.jutil.jdk.converter.DateTimeConverter;
|
|
|
|
|
import cn.reghao.jutil.jdk.io.FileSplitter;
|
|
import cn.reghao.jutil.jdk.io.FileSplitter;
|
|
|
import cn.reghao.jutil.jdk.serializer.JsonConverter;
|
|
import cn.reghao.jutil.jdk.serializer.JsonConverter;
|
|
|
import cn.reghao.jutil.jdk.web.result.WebResult;
|
|
import cn.reghao.jutil.jdk.web.result.WebResult;
|
|
@@ -22,7 +21,6 @@ import java.net.http.HttpRequest;
|
|
|
import java.net.http.HttpResponse;
|
|
import java.net.http.HttpResponse;
|
|
|
import java.nio.file.Path;
|
|
import java.nio.file.Path;
|
|
|
import java.time.Duration;
|
|
import java.time.Duration;
|
|
|
-import java.time.LocalDateTime;
|
|
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -327,16 +325,19 @@ public class OpenApiClient {
|
|
|
}
|
|
}
|
|
|
String videoId = webResult.getData();
|
|
String videoId = webResult.getData();
|
|
|
|
|
|
|
|
- String title = DateTimeConverter.format(LocalDateTime.now());
|
|
|
|
|
|
|
+ int categoryPid = 11;
|
|
|
|
|
+ int categoryId = 19;
|
|
|
|
|
+ int scope = 3;
|
|
|
|
|
+ String title = videoFile.getName();
|
|
|
Map<String, Object> map1 = new HashMap<>();
|
|
Map<String, Object> map1 = new HashMap<>();
|
|
|
map1.put("videoId", videoId);
|
|
map1.put("videoId", videoId);
|
|
|
map1.put("coverFileId", coverFileId);
|
|
map1.put("coverFileId", coverFileId);
|
|
|
map1.put("title", title);
|
|
map1.put("title", title);
|
|
|
map1.put("description", videoFile.getName());
|
|
map1.put("description", videoFile.getName());
|
|
|
- map1.put("categoryPid", 1);
|
|
|
|
|
- map1.put("categoryId", 2);
|
|
|
|
|
|
|
+ map1.put("categoryPid", categoryPid);
|
|
|
|
|
+ map1.put("categoryId", categoryId);
|
|
|
map1.put("tags", List.of("tnb"));
|
|
map1.put("tags", List.of("tnb"));
|
|
|
- map1.put("scope", 2);
|
|
|
|
|
|
|
+ map1.put("scope", scope);
|
|
|
|
|
|
|
|
String path1 = "/api/open/content/vod/publish/post";
|
|
String path1 = "/api/open/content/vod/publish/post";
|
|
|
String body1 = postRequest(path1, map1);
|
|
String body1 = postRequest(path1, map1);
|