From 42491c808ce7c35fdde1df26b3d9c3b633b00445 Mon Sep 17 00:00:00 2001 From: snoop Date: Thu, 7 Sep 2017 12:37:21 +0900 Subject: [PATCH] added sensortree --- .../overflow/module/generator/service/GenerateUtil.java | 2 +- .../module/meta/service/MetaSensorItemKeyService.java | 7 +++++-- .../module/meta/service/MetaSensorItemKeyServiceTest.java | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/loafle/overflow/module/generator/service/GenerateUtil.java b/src/main/java/com/loafle/overflow/module/generator/service/GenerateUtil.java index 5063eec..d883485 100644 --- a/src/main/java/com/loafle/overflow/module/generator/service/GenerateUtil.java +++ b/src/main/java/com/loafle/overflow/module/generator/service/GenerateUtil.java @@ -41,7 +41,7 @@ public class GenerateUtil { return resultMap; } - resultMap = this.metaSensorItemKeyService.readAllByCrawler(metaCrawler); + resultMap = this.metaSensorItemKeyService.readAllMapByCrawler(metaCrawler); this.mappingMap.put(metaCrawler.getId(), resultMap); return resultMap; diff --git a/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemKeyService.java b/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemKeyService.java index 3e3bb44..75610bf 100644 --- a/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemKeyService.java +++ b/src/main/java/com/loafle/overflow/module/meta/service/MetaSensorItemKeyService.java @@ -13,15 +13,18 @@ import java.util.Map; /** * Created by snoop on 17. 8. 29. */ -@Service +@Service("MetaSensorItemKeyService") public class MetaSensorItemKeyService { @Autowired private MetaSensorItemKeyDAO metaSensorItemKeyDAO; + public List readAllByCrawler(MetaCrawler metaCrawler) { + return this.metaSensorItemKeyDAO.findAllByCrawler(metaCrawler); + } - public Map readAllByCrawler(MetaCrawler metaCrawler) { + public Map readAllMapByCrawler(MetaCrawler metaCrawler) { Map resultMap = new HashMap<>(); diff --git a/src/test/java/com/loafle/overflow/module/meta/service/MetaSensorItemKeyServiceTest.java b/src/test/java/com/loafle/overflow/module/meta/service/MetaSensorItemKeyServiceTest.java index 948f3e7..074a196 100644 --- a/src/test/java/com/loafle/overflow/module/meta/service/MetaSensorItemKeyServiceTest.java +++ b/src/test/java/com/loafle/overflow/module/meta/service/MetaSensorItemKeyServiceTest.java @@ -28,7 +28,7 @@ public class MetaSensorItemKeyServiceTest { MetaCrawler metaCrawler = new MetaCrawler(); metaCrawler.setId((short)11); - Map resultMap = this.metaSensorItemKeyService.readAllByCrawler(metaCrawler); + Map resultMap = this.metaSensorItemKeyService.readAllMapByCrawler(metaCrawler); Assert.assertNotEquals(resultMap.size(), 0);