|
@@ -86,15 +86,7 @@ public class CameraVersionServiceImpl extends ServiceImpl<ICameraVersionMapper,
|
|
|
// 写文件到本地
|
|
|
File file1 = new File(filePath);
|
|
|
file.transferTo(file1);
|
|
|
- log.info("filePath: {}", filePath);
|
|
|
- // 上传到阿里云sso
|
|
|
- mangeUploadToOssUtil.upload(filePath, DIR_NAME + fileName);
|
|
|
- log.info("upload success");
|
|
|
- String url = prefixAli + DIR_NAME + fileName;
|
|
|
- if("aws".equals(ossType)){
|
|
|
- url = YAMAXUN_S3_PATH + fileName;
|
|
|
- }
|
|
|
- log.info("upload url: {}" + url);
|
|
|
+
|
|
|
// 添加对象信息
|
|
|
switch (type){
|
|
|
case 1: type = 1;break;
|
|
@@ -106,6 +98,15 @@ public class CameraVersionServiceImpl extends ServiceImpl<ICameraVersionMapper,
|
|
|
if(cameraVersions != null && cameraVersions.size() >0){
|
|
|
throw new BusinessException(ResultCode.VISION_EXIST.code(),ResultCode.VISION_EXIST.message());
|
|
|
}
|
|
|
+ log.info("filePath: {}", filePath);
|
|
|
+ // 上传到阿里云sso
|
|
|
+ mangeUploadToOssUtil.upload(filePath, DIR_NAME + fileName);
|
|
|
+ log.info("upload success");
|
|
|
+ String url = prefixAli + DIR_NAME + fileName;
|
|
|
+ if("aws".equals(ossType)){
|
|
|
+ url = YAMAXUN_S3_PATH + fileName;
|
|
|
+ }
|
|
|
+ log.info("upload url: {}" + url);
|
|
|
|
|
|
CameraVersion versionEntity = new CameraVersion();
|
|
|
versionEntity.setName(fileName);
|