|
@@ -3,6 +3,8 @@ package com.yonge.netty.server.service;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONPath;
|
|
import com.alibaba.fastjson.JSONPath;
|
|
|
|
+import com.microsvc.toolkit.middleware.oss.OssPluginContext;
|
|
|
|
+import com.microsvc.toolkit.middleware.oss.impl.TencentOssPlugin;
|
|
import com.ym.mec.biz.dal.entity.SysMusicCompareRecord;
|
|
import com.ym.mec.biz.dal.entity.SysMusicCompareRecord;
|
|
import com.ym.mec.biz.dal.enums.DeviceTypeEnum;
|
|
import com.ym.mec.biz.dal.enums.DeviceTypeEnum;
|
|
import com.ym.mec.biz.dal.enums.FeatureType;
|
|
import com.ym.mec.biz.dal.enums.FeatureType;
|
|
@@ -41,6 +43,8 @@ public class AudioCompareHandler implements MessageHandler {
|
|
|
|
|
|
private static final Logger LOGGER = LoggerFactory.getLogger(AudioCompareHandler.class);
|
|
private static final Logger LOGGER = LoggerFactory.getLogger(AudioCompareHandler.class);
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private OssPluginContext ossPluginContext;
|
|
@Autowired
|
|
@Autowired
|
|
private UserChannelContextService userChannelContextService;
|
|
private UserChannelContextService userChannelContextService;
|
|
|
|
|
|
@@ -192,7 +196,8 @@ public class AudioCompareHandler implements MessageHandler {
|
|
String url = null;
|
|
String url = null;
|
|
try {
|
|
try {
|
|
String folder = UploadUtil.getFileFloder();
|
|
String folder = UploadUtil.getFileFloder();
|
|
- url = storagePluginContext.asyncUploadFile(KS3StoragePlugin.PLUGIN_NAME,"cloud-coach/" + folder, waveFileProcessor.getFile(), true);
|
|
|
|
|
|
+// url = storagePluginContext.asyncUploadFile(KS3StoragePlugin.PLUGIN_NAME,"cloud-coach/" + folder, waveFileProcessor.getFile(), true);
|
|
|
|
+ url = ossPluginContext.getPluginService(TencentOssPlugin.PLUGIN_NAME).asyncUploadFile("cloud-coach/" + folder, waveFileProcessor.getFile(), true);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
LOGGER.error("录音文件上传失败:{}", e);
|
|
LOGGER.error("录音文件上传失败:{}", e);
|
|
}
|
|
}
|