Browse Source

搜索:返回logoUrl

wangdy 8 years ago
parent
commit
b13e202b1f

+ 9 - 0
src/main/java/com/uas/platform/b2c/common/search/service/impl/SearcherServiceImpl.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.uas.platform.b2c.common.search.rpc.service.SearchService;
 import com.uas.platform.b2c.common.search.service.SearcherService;
 import com.uas.platform.b2c.core.utils.FastjsonUtils;
+import com.uas.platform.b2c.prod.product.brand.dao.BrandDao;
 import com.uas.platform.b2c.prod.product.component.dao.ComponentGoodsDao;
 import com.uas.platform.b2c.prod.product.component.dao.ComponentInfoDao;
 import com.uas.platform.b2c.prod.product.component.modal.ComponentGoods;
@@ -46,6 +47,9 @@ public class SearcherServiceImpl implements SearcherService {
 	@Autowired
 	private SearchService searchService;
 
+	@Autowired
+	private BrandDao brandDao;
+
 	private Logger logger = LoggerFactory.getLogger(getClass());
 
 	/**
@@ -260,6 +264,11 @@ public class SearcherServiceImpl implements SearcherService {
 		} catch (SearchException e) {
 			throwSystemException(e);
 		}
+		if ("goods_brand".equals(collectList)){
+			for (Map<String,Object> m: collectResult) {
+				m.put("logoUrl",brandDao.findOne(Long.parseLong(m.get("br_id").toString())).getLogoUrl());
+			}
+		}
 		return collectResult;
 	}