Bläddra i källkod

更新:
添加日志

wuweihao 4 år sedan
förälder
incheckning
a200a50772

+ 4 - 6
cms_pano_fcb/gis_service/src/main/java/com/gis/service/impl/SceneServiceImpl.java

@@ -24,7 +24,6 @@ import com.gis.service.SceneService;
 import com.github.pagehelper.PageInfo;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
-import org.junit.Test;
 import org.springframework.amqp.rabbit.core.RabbitTemplate;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -33,7 +32,6 @@ import org.springframework.web.multipart.MultipartFile;
 
 import javax.transaction.Transactional;
 import javax.validation.constraints.NotBlank;
-import java.io.*;
 import java.util.*;
 
 
@@ -107,7 +105,6 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
             return Result.failure("houseId不能为空");
         }
 
-//        Result resStatus =  canEdit(houseId);
         if (!canEdit(houseId)) {
             log.error("VR项目不可编辑");
             return Result.failure(7005, "VR项目不可编辑");
@@ -118,7 +115,7 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
 
 
         String basePath = null;
-
+        String sceneCode = FileUtils.getCode();
         try {
 
             // 次方法可以读取到图片内部结构
@@ -135,7 +132,7 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
             }
             String uuid = RandomUtils.getUuid();
 
-            String sceneCode = FileUtils.getCode();
+
             log.info("type: " + type);
 
 
@@ -188,11 +185,12 @@ public class SceneServiceImpl extends IBaseServiceImpl<SceneEntity, String> impl
 
             //发消息到mq
             rabbitTemplate.convertAndSend(RabbitConfig.PANO_EXCHANGE, RabbitConfig.PANO_QUEUE_ROUTING, entity.getId());
+            log.info("全景图入队成功: 场景码:{},场景id:{} ", sceneCode, entity.getId());
 
         }  catch (Exception e) {
             e.printStackTrace();
         }
-
+        log.info("全景图上传完成:{}", sceneCode);
         return Result.success(entity);
     }