소스 검색

fix 19721 ,19707 bug

xiewenjie 4 년 전
부모
커밋
9a7ea44edd

+ 2 - 1
sxz-core/src/main/java/com/fdkk/sxz/webApi/controller/ManagerController.java

@@ -805,11 +805,12 @@ public class ManagerController extends BaseController {
                 uploadToOssUtil.copyTo4dTjw(renovationPartsDetailEntity.getMviewPath().replace(prefix, ""),
                         renovationPartsDetailEntity.getMviewPath().replace("/temp/", "/models/").replace(prefix, ""));
                 renovationPartsDetailEntity.setMviewPath(renovationPartsDetailEntity.getMviewPath().replace("/temp/", "/models/"));
+                uploadToOssUtil.deleteTo4dTjw(renovationPartsDetailEntity.getMviewPath().replace(prefix, ""));
+
             }
 
             uploadToOssUtil.deleteTo4dTjw(renovationPartsDetailEntity.getImg().replace(prefix, ""));
             uploadToOssUtil.deleteTo4dTjw(renovationPartsDetailEntity.getPath().replace(prefix, ""));
-            uploadToOssUtil.deleteTo4dTjw(renovationPartsDetailEntity.getMviewPath().replace(prefix, ""));
 
             renovationPartsDetailEntity.setImg(renovationPartsDetailEntity.getImg().replace("/temp/", "/models/"));
             renovationPartsDetailEntity.setHighImg(renovationPartsDetailEntity.getHighImg().replace("/temp/", "/models/"));

+ 5 - 1
sxz-core/src/main/java/com/fdkk/sxz/webApi/service/impl/ModelUploadServiceImpl.java

@@ -1,5 +1,6 @@
 package com.fdkk.sxz.webApi.service.impl;
 
+import cn.hutool.core.date.DateTime;
 import cn.hutool.core.io.FileUtil;
 import cn.hutool.core.io.watch.SimpleWatcher;
 import cn.hutool.core.io.watch.WatchMonitor;
@@ -30,6 +31,7 @@ import com.fdkk.sxz.webApi.service.custom.ICustomProductService;
 import lombok.extern.slf4j.Slf4j;
 import net.oschina.j2cache.CacheChannel;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Qualifier;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
@@ -49,6 +51,7 @@ import java.util.Map;
 @Slf4j
 public class ModelUploadServiceImpl extends BaseServiceImpl<IModelUploadMapper, ModelUploadEntity> implements IModelUploadService {
 
+    @Qualifier("IModelUploadMapper")
     @Autowired
     private IModelUploadMapper modelUploadMapper;
 
@@ -142,7 +145,7 @@ public class ModelUploadServiceImpl extends BaseServiceImpl<IModelUploadMapper,
                     entity.setDepth(param.getDepth());
                     entity.setHeight(param.getHeight());
                     entity.setIsShow(1);
-                    entity.setCreateTime(param.getCreateTime());
+                    entity.setCreateTime(new DateTime());
                     entity.setUserId(param.getUserId());
                     JSONArray ids = new JSONArray();
                     //处理配件
@@ -162,6 +165,7 @@ public class ModelUploadServiceImpl extends BaseServiceImpl<IModelUploadMapper,
                                 customComponentEntity.setModelId(componentModel.getId());
                                 customComponentEntity.setName(componentSlot.getTitle());
                                 customComponentEntity.setFileId(componentModel.getFileId());
+                                customComponentEntity.setCreateTime(new DateTime());
                                 log.info("处理缩略图");
 
                                 //先执行python-NewResortForOne脚本,处理obj文件