Procházet zdrojové kódy

思维 下载接口

dengsixing před 2 roky
rodič
revize
4f855ebbdc

+ 0 - 6
pom.xml

@@ -93,12 +93,6 @@
         </dependency>
 
         <dependency>
-            <groupId>com.fdkankan</groupId>
-            <artifactId>4dkankan-utils-model</artifactId>
-            <version>3.0.0-SNAPSHOT</version>
-        </dependency>
-
-        <dependency>
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-web</artifactId>
         </dependency>

+ 4 - 5
src/main/java/com/fdkankan/ucenter/controller/app/SceneApiController.java

@@ -1,6 +1,7 @@
 package com.fdkankan.ucenter.controller.app;
 
 import cn.hutool.core.io.FileUtil;
+import cn.hutool.core.util.RuntimeUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.core.util.ZipUtil;
 import com.alibaba.fastjson.JSONObject;
@@ -12,6 +13,7 @@ import com.fdkankan.common.util.DateUtil;
 import com.fdkankan.common.util.FileUtils;
 import com.fdkankan.common.util.SecurityUtil;
 import com.fdkankan.fyun.face.FYunFileServiceInterface;
+import com.fdkankan.model.constants.ConstantCmd;
 import com.fdkankan.model.utils.CreateObjUtil;
 import com.fdkankan.redis.constant.RedisKey;
 import com.fdkankan.redis.constant.RedisLockKey;
@@ -331,7 +333,7 @@ public class SceneApiController extends BaseController {
             //14表示matterPro场景,需要调用命令获取切图,并且修改sceneScheme为13
             if(sceneProEntity.getSceneSource() == 14){
                 sceneProEntity.setSceneScheme(13);
-                CreateObjUtil.matterproCutImg(sceneProEntity.getNum(), ConstantFilePath.BASE_PATH + "/local/localHose" + sceneNum);
+                RuntimeUtil.execForStr(ConstantCmd.MATTERPRO_CUT_IMG + " -s " + sceneProEntity.getNum() + " -d " + ConstantFilePath.BASE_PATH + "/local/localHose" + sceneNum);
             }
 
             BeanUtils.copyProperties(editEntity, responseScene);
@@ -370,16 +372,13 @@ public class SceneApiController extends BaseController {
             FileUtils.writeFile(ConstantFilePath.BASE_PATH + "/local/localHose" + sceneNum + "/data/data" + sceneNum + "/getInfo.json",
                 JSONObject.toJSONString(responseScene));
 
-            CreateObjUtil.callshell("bash /opt/ossutil/gzip.sh " + ConstantFilePath.BASE_PATH + "/local/localHose" + sceneNum +
-                " " + ConstantFilePath.BASE_PATH + "/local/localHose" + sceneNum);
-
             ZipUtil.zip(ConstantFilePath.BASE_PATH + "/local/localHose" + sceneNum,  ConstantFilePath.BASE_PATH + "/local/localHose" + sceneNum + ".zip");
 
             FileUtils.deleteDirectory(ConstantFilePath.BASE_PATH + "/local/localHose" + sceneNum);
 
             return Result.success((Object)"local/localHose" + sceneNum + ".zip");
         }catch (Exception e){
-            e.printStackTrace();
+            log.error("思维下载失败,num=" + sceneNum, e);
             return Result.failure(LoginConstant.ERROR_MSG);
         }finally {
             redisLockUtil.unlockLua(RedisLockKey.LOCK_DOWNLOAD_SIWEI_HTML);