admin
2020-07-14 eec7e789a87863c25d92c10ad5dfc22ad80c448d
fanli/src/main/java/com/yeshi/fanli/service/impl/config/HotSearchServiceImpl.java
@@ -5,7 +5,9 @@
import javax.annotation.Resource;
import com.yeshi.fanli.entity.SystemEnum;
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 +56,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, SystemEnum system) throws Exception {
      
      List<HotSearch> listObj = hotSearchMapper.listQuery(start, count, key, systemId);
      List<HotSearch> listObj = hotSearchMapper.listQuery(start, count, key, systemId, useType,system);
      if (listObj == null || listObj.size() == 0) {
         return null;
@@ -97,10 +99,10 @@
                  for (SuperHotSearch superHotSearch : listSuper) {
                     HotSearch search = superHotSearch.getHotSearch();
                     BusinessSystem system = superHotSearch.getSystem();
                     BusinessSystem s = superHotSearch.getSystem();
                     // 当前专题 、当前系统
                     if (search != null && system != null && id == search.getId() && superSystemId == system.getId()) {
                     if (search != null && system != null && id == search.getId() && superSystemId == s.getId()) {
                        newsystem.setCheck(1);
                        break;
                     }
@@ -120,8 +122,17 @@
   }
   
   @Override
   public int countList(String key, Long systemId) {
      return hotSearchMapper.countQuery(key, systemId);
   public int countList(String key, Long systemId, Integer useType, SystemEnum system) {
      return hotSearchMapper.countQuery(key, systemId, useType,system);
   }
   @Override
   @Cacheable(value = "crgCache", key = "'getHotSearchCache-' + #useType+'-'+#system")
   public List<HotSearch> getHotSearchCache(Integer useType, SystemEnum system) {
      return hotSearchMapper.getHotSearchList(useType,system);
   }
}