Преглед изворни кода

Merge branch 'test' of https://gitee.com/hcst/adsp-boot into test

# Conflicts:
#	module-common/src/main/java/cn/com/ctop/common/module/service/impl/MaterialInfoServiceImpl.java
xuzuoyun пре 5 година
родитељ
комит
27e8bc885a

+ 3 - 1
module-common/src/main/java/cn/com/ctop/common/module/utils/MpsUtils.java

@@ -272,6 +272,8 @@ public class MpsUtils {
 
     public String videoWaterMark(String videoPath,String waterMarkPath,String watermarkTemplateId,Integer height){
         String jobId = "";
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        String outputFilename = "watermark/"+sdf.format(new Date())+"/"+ UUID.randomUUID()+".mp4";
         IAcsClient client = getClient();
         String pipelineId = getPipelineId(client);
         SubmitJobsRequest request = new SubmitJobsRequest();
@@ -298,7 +300,7 @@ public class MpsUtils {
         videoWatermark.put("Dy", "0");
         String outputOSSObject;
         try {
-            outputOSSObject = URLEncoder.encode(waterMarkPath, "utf-8");
+            outputOSSObject = URLEncoder.encode(outputFilename, "utf-8");
         } catch (UnsupportedEncodingException e) {
             throw new RuntimeException("output URL encode failed");
         }