Merge branch 'dev/dev_xp' into dev/dev
This commit is contained in:
@@ -14,7 +14,6 @@ import com.ai.da.mapper.primary.entity.*;
|
|||||||
import com.ai.da.model.dto.*;
|
import com.ai.da.model.dto.*;
|
||||||
import com.ai.da.model.enums.ModelType;
|
import com.ai.da.model.enums.ModelType;
|
||||||
import com.ai.da.model.enums.Sex;
|
import com.ai.da.model.enums.Sex;
|
||||||
import com.ai.da.model.enums.StyleEnum;
|
|
||||||
import com.ai.da.model.vo.*;
|
import com.ai.da.model.vo.*;
|
||||||
import com.ai.da.python.PythonService;
|
import com.ai.da.python.PythonService;
|
||||||
import com.ai.da.python.vo.DesignPythonItem;
|
import com.ai.da.python.vo.DesignPythonItem;
|
||||||
@@ -31,7 +30,6 @@ import com.google.gson.Gson;
|
|||||||
import io.netty.util.internal.StringUtil;
|
import io.netty.util.internal.StringUtil;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
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.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -981,7 +979,7 @@ public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementM
|
|||||||
String objectName = accountId + "/ImageSegment/input";
|
String objectName = accountId + "/ImageSegment/input";
|
||||||
for (MultipartFile file : files) {
|
for (MultipartFile file : files) {
|
||||||
String md5 = MD5Utils.encryptFile(file);
|
String md5 = MD5Utils.encryptFile(file);
|
||||||
String segmentedResult = redisUtil.getFromString(RedisUtil.IMAGE_SEGMENTATION + md5);
|
String segmentedResult = redisUtil.getFromString(RedisUtil.IMAGE_SEGMENTATION + type + ":" + md5);
|
||||||
// 判断上传的图片是否有已分割的数据
|
// 判断上传的图片是否有已分割的数据
|
||||||
if (StringUtil.isNullOrEmpty(segmentedResult)) {
|
if (StringUtil.isNullOrEmpty(segmentedResult)) {
|
||||||
String path = minioUtil.upload(userBucketName, objectName, file);
|
String path = minioUtil.upload(userBucketName, objectName, file);
|
||||||
@@ -1023,7 +1021,7 @@ public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementM
|
|||||||
for (ImageSegmentation.ImageDate imageData : segmented) {
|
for (ImageSegmentation.ImageDate imageData : segmented) {
|
||||||
if (isUploadMode) {
|
if (isUploadMode) {
|
||||||
// 上传的图片需要添加到redis中存一天
|
// 上传的图片需要添加到redis中存一天
|
||||||
String key = RedisUtil.IMAGE_SEGMENTATION +
|
String key = RedisUtil.IMAGE_SEGMENTATION + type + ":" +
|
||||||
MD5Utils.encryptFile
|
MD5Utils.encryptFile
|
||||||
(minioUtil.getPreSignedUrl
|
(minioUtil.getPreSignedUrl
|
||||||
(imageData.getImage_url(), CommonConstant.MINIO_IMAGE_EXPIRE_TIME), false);
|
(imageData.getImage_url(), CommonConstant.MINIO_IMAGE_EXPIRE_TIME), false);
|
||||||
|
|||||||
Reference in New Issue
Block a user