Browse Source

Merge branch 'feature/0721-tenant'

liujc 1 year ago
parent
commit
742aac82a4

+ 6 - 1
audio-analysis/src/main/java/com/yonge/netty/server/service/AudioCompareHandler.java

@@ -1,5 +1,6 @@
 package com.yonge.netty.server.service;
 
+import com.microsvc.toolkit.middleware.oss.OssPluginContext;
 import com.microsvc.toolkit.middleware.oss.impl.TencentOssPlugin;
 import io.netty.channel.Channel;
 
@@ -66,6 +67,9 @@ public class AudioCompareHandler implements MessageHandler {
     @Autowired
     private StoragePluginContext storagePluginContext;
 
+    @Autowired
+    private OssPluginContext ossPluginContext;
+
 	/**
 	 * @describe 采样率
 	 */
@@ -204,7 +208,8 @@ public class AudioCompareHandler implements MessageHandler {
 		            String url = null;
 		            try {
 		                String folder = UploadUtil.getFileFloder();
-		                url = storagePluginContext.asyncUploadFile(TencentOssPlugin.PLUGIN_NAME,"soundCompare/" + folder, waveFileProcessor.getFile(), true);
+//		                url = storagePluginContext.asyncUploadFile(TencentOssPlugin.PLUGIN_NAME,"soundCompare/" + folder, waveFileProcessor.getFile(), true);
+                        url = ossPluginContext.getPluginService(TencentOssPlugin.PLUGIN_NAME).asyncUploadFile("cloud-coach/" + folder, waveFileProcessor.getFile(), true);
 		            } catch (Exception e) {
 		                LOGGER.error("录音文件上传失败:{}", e);
 		            }