From aa552facf6d833acab0d3e3e29bda2a0fb826ffe Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期一, 25 十一月 2019 16:14:13 +0800
Subject: [PATCH] 品牌缓存生效

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/lable/LabelServiceImpl.java |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/lable/LabelServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/lable/LabelServiceImpl.java
index 505b70a..7492bb3 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/lable/LabelServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/lable/LabelServiceImpl.java
@@ -23,8 +23,7 @@
 import com.yeshi.fanli.entity.bus.lable.Label;
 import com.yeshi.fanli.entity.bus.lable.LabelGoods;
 import com.yeshi.fanli.entity.common.AdminUser;
-import com.yeshi.fanli.exception.LabelException;
-import com.yeshi.fanli.log.LogHelper;
+import com.yeshi.fanli.exception.goods.quality.LabelException;
 import com.yeshi.fanli.service.inter.lable.LabelService;
 import com.yeshi.fanli.util.StringUtil;
 
@@ -157,14 +156,21 @@
 	
 	@Override
 	public List<Label> selectByTitle(String title) throws LabelException{
-		LogHelper.test("鏌ヨ鏍囩锛�  "+title);
 		return labelMapper.selectByTitle(title);
 	}
 
+	
 	@Override
-	@Cacheable(value = "labelCache",key="'selectByTitleCache-'+#labKey +'-'+#title")
-	public List<Label> selectByTitleCache(String labKey, String title) throws LabelException{
-		return selectByTitle(title);
+	@Cacheable(value = "labelCache",key="'getByTitleCache-'+#labKey +'-'+#title")
+	public Label getByTitleCache(String labKey, String title) throws LabelException{
+		return labelMapper.getByTitle(title);
+	}
+	
+	
+	@Override
+	@Cacheable(value = "labelCache",key="'listByTitlesCache-'+#list")
+	public List<Label> listByTitlesCache(List<String> list){
+		return labelMapper.listByTitles(list);
 	}
 	
 	

--
Gitblit v1.8.0