|
@@ -24,14 +24,12 @@ import com.fdkankan.scene.service.ICommonService;
|
|
|
import com.fdkankan.scene.service.IScenePlusExtService;
|
|
import com.fdkankan.scene.service.IScenePlusExtService;
|
|
|
import com.fdkankan.scene.service.IScenePlusService;
|
|
import com.fdkankan.scene.service.IScenePlusService;
|
|
|
import com.fdkankan.scene.service.ISceneService;
|
|
import com.fdkankan.scene.service.ISceneService;
|
|
|
-import com.fdkankan.scene.util.OssBodySegmentUtil;
|
|
|
|
|
import com.fdkankan.web.response.ResultData;
|
|
import com.fdkankan.web.response.ResultData;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
import org.springframework.web.multipart.MultipartFile;
|
|
|
-import sun.rmi.runtime.Log;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
import javax.imageio.ImageIO;
|
|
import javax.imageio.ImageIO;
|
|
@@ -57,8 +55,6 @@ public class SceneServiceImpl implements ISceneService {
|
|
|
private String bodySegmentHost;
|
|
private String bodySegmentHost;
|
|
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
|
- private OssBodySegmentUtil ossBodySegmentUtil;
|
|
|
|
|
- @Autowired
|
|
|
|
|
private RedisUtil redisUtil;
|
|
private RedisUtil redisUtil;
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private RabbitMqProducer rabbitMqProducer;
|
|
private RabbitMqProducer rabbitMqProducer;
|
|
@@ -112,7 +108,7 @@ public class SceneServiceImpl implements ISceneService {
|
|
|
ImgUtil.scale(new File(tempFile.getPath()), new File(tempFile.getPath()), scale);
|
|
ImgUtil.scale(new File(tempFile.getPath()), new File(tempFile.getPath()), scale);
|
|
|
|
|
|
|
|
String orgImgOssPath = "body_segment/original/" + tempFile.getName();
|
|
String orgImgOssPath = "body_segment/original/" + tempFile.getName();
|
|
|
- ossBodySegmentUtil.uploadOss(tempFile.getPath(), orgImgOssPath);
|
|
|
|
|
|
|
+// ossBodySegmentUtil.uploadOss(tempFile.getPath(), orgImgOssPath);
|
|
|
// fYunFileService.uploadFile(bodySegmentBucket, tempFile.getPath(), orgImgOssPath);
|
|
// fYunFileService.uploadFile(bodySegmentBucket, tempFile.getPath(), orgImgOssPath);
|
|
|
|
|
|
|
|
BodySegmentStatusBean bodySegmentStatusBean = BodySegmentStatusBean.builder().uuid(uuid).status(CommonOperStatus.WAITING.code()).build();
|
|
BodySegmentStatusBean bodySegmentStatusBean = BodySegmentStatusBean.builder().uuid(uuid).status(CommonOperStatus.WAITING.code()).build();
|
|
@@ -147,7 +143,7 @@ public class SceneServiceImpl implements ISceneService {
|
|
|
DateExtUtil.format(Calendar.getInstance().getTime(), DateExtUtil.dateStyle6);
|
|
DateExtUtil.format(Calendar.getInstance().getTime(), DateExtUtil.dateStyle6);
|
|
|
String fileName = uuid + ".png";
|
|
String fileName = uuid + ".png";
|
|
|
String imgPath = dir + "/" + fileName;
|
|
String imgPath = dir + "/" + fileName;
|
|
|
- ossBodySegmentUtil.extracted(imgUrl, dir, fileName);
|
|
|
|
|
|
|
+// ossBodySegmentUtil.extracted(imgUrl, dir, fileName);
|
|
|
if(!FileUtil.exist(imgPath)){
|
|
if(!FileUtil.exist(imgPath)){
|
|
|
throw new Exception("提取图片失败");
|
|
throw new Exception("提取图片失败");
|
|
|
}
|
|
}
|