|
|
@@ -78,14 +78,9 @@ public class SearchServiceImpl implements SearchService{
|
|
|
public SPage<Long> getProducts(Long enUU, String keyword, Integer page, Integer size, String type) throws SearchException {
|
|
|
Map<String, Object> map = initSearchMap(keyword, page, size);
|
|
|
map.put("enUU", enUU);
|
|
|
- String str = "";
|
|
|
- if (type.equals("standard")) {
|
|
|
- str = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.STANDARD_PRODUCT_ID_URL, String.class, map);
|
|
|
- } else if (type.equals("nStandard")) {
|
|
|
- str = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.NONSTANDARD_PRODUCT_ID_URL, String.class, map);
|
|
|
- } else if (type.equals("all")) {
|
|
|
- str = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.ALL_PRODUCT_ID_URL, String.class, map);
|
|
|
- }
|
|
|
+ // standard 标准 nStandard 非标 其他为所有
|
|
|
+ map.put("type", type);
|
|
|
+ String str = restTemplate.getForObject(sysConf.getSearchUrl() + SearchUrl.PRODUCT_ID_URL, String.class, map);
|
|
|
if(StringUtils.isEmpty(str)) {
|
|
|
return null;
|
|
|
} else {
|