Selaa lähdekoodia

修改配置文件,

zhujinghui 4 vuotta sitten
vanhempi
commit
511cdc38b8

+ 32 - 0
fcb-project-application/src/test/java/fcb/project/manager/feignApi/PanoFeignTest.java

@@ -0,0 +1,32 @@
+package fcb.project.manager.feignApi;
+
+import fcb.project.manager.FcbProjectManagerApplication;
+import fcb.project.manager.core.feignInterfaces.PanoFeign;
+import lombok.RequiredArgsConstructor;
+import lombok.SneakyThrows;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = FcbProjectManagerApplication.class)
+@AutoConfigureMockMvc
+@RequiredArgsConstructor
+public class PanoFeignTest {
+
+    private final PanoFeign panoFeign;
+
+    /**
+     * 单元测试
+     */
+    @Test
+    @SneakyThrows
+    public void test() {
+        String a = null;
+        Assert.assertTrue("a为空",a != null);
+    }
+
+}

+ 3 - 3
fcb-project-manager-core/src/main/java/fcb/project/manager/base/service/impl/TmEstateServiceImpl.java

@@ -105,8 +105,8 @@ public class TmEstateServiceImpl extends ServiceImpl<TmEstateDao, TmEstate> impl
             item.put(excelUtil.getColeNames().get(index++), house.getGarden() != null ? house.getGarden().toString() : "0");
             item.put(excelUtil.getColeNames().get(index++), house.getSales() != null ? house.getSales().toString() : "0");
             item.put(excelUtil.getColeNames().get(index++), house.getHouse() != null ? house.getHouse().toString() : "0");
-            item.put(excelUtil.getColeNames().get(index++), house.getSaleVideos().toString());
-            item.put(excelUtil.getColeNames().get(index++), house.getHouseVideos().toString());
+            item.put(excelUtil.getColeNames().get(index++), house.getHouse() != null ? house.getSaleVideos().toString() : "0");
+            item.put(excelUtil.getColeNames().get(index++), house.getHouseVideos() != null ? house.getHouseVideos().toString() : "0");
             item.put(excelUtil.getColeNames().get(index++), house.getPoints() != null ? house.getPoints().toString() : "0");
             item.put(excelUtil.getColeNames().get(index++), house.getCreateTime().format(df));
             item.put(excelUtil.getColeNames().get(index++), house.getUpdateTime().format(df));
@@ -194,7 +194,7 @@ public class TmEstateServiceImpl extends ServiceImpl<TmEstateDao, TmEstate> impl
                 panoSceneWithTypesMap = panoService.listPanoSceneWithTypes(houseVOS.get(i).getHouseId(), token);
 
                 if (MapUtils.isNotEmpty(panoSceneWithTypesMap)) {
-                    List<String> nums = panoSceneWithTypesMap.entrySet().stream().map(e -> e.getValue().toString()).collect(Collectors.toList());
+                    List<String> nums = panoSceneWithTypesMap.entrySet().stream().map(e -> e.getKey()).collect(Collectors.toList());
 
                     sceneRspBean = sceneFeign.listScenesInNums(nums, token);
                     List<SceneProEntity> scenes = (List<SceneProEntity>) sceneRspBean.getData();