From 28cf328a098334b51a3e9d2d56f983fb8c862211 Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期六, 23 五月 2020 09:54:38 +0800
Subject: [PATCH] 足迹、收藏订单兼容新需求

---
 fanli/src/main/java/com/yeshi/fanli/service/impl/config/HotSearchServiceImpl.java |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/config/HotSearchServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/config/HotSearchServiceImpl.java
index 8f58377..4c965d0 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/config/HotSearchServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/config/HotSearchServiceImpl.java
@@ -6,6 +6,7 @@
 import javax.annotation.Resource;
 
 import org.apache.commons.beanutils.PropertyUtils;
+import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 
 import com.yeshi.fanli.dao.mybatis.goods.HotSearchMapper;
@@ -54,9 +55,9 @@
 
 	
 	@Override
-	public List<HotSearch> listQuery(int start, int count, String key, Long systemId) throws Exception {
+	public List<HotSearch> listQuery(int start, int count, String key, Long systemId, Integer useType) throws Exception {
 		
-		List<HotSearch> listObj = hotSearchMapper.listQuery(start, count, key, systemId);
+		List<HotSearch> listObj = hotSearchMapper.listQuery(start, count, key, systemId, useType);
 
 		if (listObj == null || listObj.size() == 0) {
 			return null;
@@ -120,8 +121,17 @@
 	}
 	
 	@Override
-	public int countList(String key, Long systemId) {
-		return hotSearchMapper.countQuery(key, systemId);
+	public int countList(String key, Long systemId, Integer useType) {
+		return hotSearchMapper.countQuery(key, systemId, useType);
 	}
 
+	
+	@Override
+	@Cacheable(value = "crgCache", key = "'getHotSearchCache-' + #useType")
+	public List<HotSearch> getHotSearchCache(Integer useType) {
+		return hotSearchMapper.getHotSearchList(useType);
+	}
+
+	
+	
 }

--
Gitblit v1.8.0