|
@@ -38,6 +38,8 @@ public class SceneServiceImpl implements ISceneService {
|
|
|
|
|
|
@Value("${queue.bodySegment:body-segment}")
|
|
|
private String queueName;
|
|
|
+ @Value("${oss.bodySegment.bucket:4dkankan-huadong}")
|
|
|
+ private String bodySegmentBucket;
|
|
|
|
|
|
@Autowired
|
|
|
private OssBodySegmentUtil ossBodySegmentUtil;
|
|
@@ -51,7 +53,7 @@ public class SceneServiceImpl implements ISceneService {
|
|
|
public FYunFileConfig fYunFileConfig;
|
|
|
|
|
|
@Override
|
|
|
- public ResultData uploadBodySegment(String num, MultipartFile file) throws Exception {
|
|
|
+ public ResultData uploadBodySegment(MultipartFile file) throws Exception {
|
|
|
|
|
|
if(!FileUtils.checkFileSizeIsLimit(file.getSize(), 3, "M")){
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_4003, "3M");
|
|
@@ -65,7 +67,8 @@ public class SceneServiceImpl implements ISceneService {
|
|
|
file.transferTo(tempFile);
|
|
|
|
|
|
String orgImgOssPath = "body_segment/original/" + tempFile.getName();
|
|
|
- ossBodySegmentUtil.uploadOss(tempFile.getPath(), orgImgOssPath);
|
|
|
+// ossBodySegmentUtil.uploadOss(tempFile.getPath(), orgImgOssPath);
|
|
|
+ fYunFileService.uploadFile(bodySegmentBucket, tempFile.getPath(), orgImgOssPath);
|
|
|
|
|
|
BodySegmentStatusBean bodySegmentStatusBean = BodySegmentStatusBean.builder().uuid(uuid).status(CommonOperStatus.WAITING.code()).build();
|
|
|
redisUtil.hset(RedisKey.SCENE_BODY_SEGMENT, uuid, JSON.toJSONString(bodySegmentStatusBean));
|