feat: 优化
This commit is contained in:
@@ -19,7 +19,8 @@ public enum TikFileCategoryEnum implements ArrayValuable<Integer> {
|
||||
GENERATE(2, "generate", "生成集"),
|
||||
AUDIO(3, "audio", "配音集"),
|
||||
MIX(4, "mix", "混剪集"),
|
||||
VOICE(5, "voice", "声音集");
|
||||
VOICE(5, "voice", "声音集"),
|
||||
DIGITAL_HUMAN(6, "digital_human", "数字人素材");
|
||||
|
||||
public static final Integer[] ARRAYS = Arrays.stream(values()).map(TikFileCategoryEnum::getCode).toArray(Integer[]::new);
|
||||
|
||||
|
||||
@@ -77,24 +77,14 @@ public class TikOssInitServiceImpl implements TikOssInitService {
|
||||
/**
|
||||
* OSS路径信息
|
||||
*/
|
||||
private static class OssPathInfo {
|
||||
final String ossRootPath;
|
||||
final String videoPath;
|
||||
final String generatePath;
|
||||
final String audioPath;
|
||||
final String mixPath;
|
||||
final String voicePath;
|
||||
|
||||
OssPathInfo(String ossRootPath, String videoPath, String generatePath,
|
||||
String audioPath, String mixPath, String voicePath) {
|
||||
this.ossRootPath = ossRootPath;
|
||||
this.videoPath = videoPath;
|
||||
this.generatePath = generatePath;
|
||||
this.audioPath = audioPath;
|
||||
this.mixPath = mixPath;
|
||||
this.voicePath = voicePath;
|
||||
}
|
||||
}
|
||||
private record OssPathInfo(
|
||||
String ossRootPath,
|
||||
String videoPath,
|
||||
String generatePath,
|
||||
String audioPath,
|
||||
String mixPath,
|
||||
String voicePath
|
||||
) {}
|
||||
|
||||
/**
|
||||
* 构建OSS路径信息
|
||||
@@ -176,6 +166,7 @@ public class TikOssInitServiceImpl implements TikOssInitService {
|
||||
case "audio" -> ossInit.getAudioPath();
|
||||
case "mix" -> ossInit.getMixPath();
|
||||
case "voice" -> ossInit.getVoicePath();
|
||||
case "digital_human" -> ossInit.getOssRootPath() + "/digital_human";
|
||||
default -> throw exception(OSS_INIT_FAILED, "不支持的文件分类:" + fileCategory);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user