Authored by 胡古飞

Merge branch 'master' into 1212

@@ -14,6 +14,7 @@ import org.slf4j.LoggerFactory; @@ -14,6 +14,7 @@ import org.slf4j.LoggerFactory;
14 import org.springframework.beans.factory.annotation.Autowired; 14 import org.springframework.beans.factory.annotation.Autowired;
15 import org.springframework.stereotype.Service; 15 import org.springframework.stereotype.Service;
16 16
  17 +import java.util.ArrayList;
17 import java.util.Map; 18 import java.util.Map;
18 19
19 @Service 20 @Service
@@ -50,7 +51,12 @@ public class FirstPageSceneService extends AbstractPageSceneService { @@ -50,7 +51,12 @@ public class FirstPageSceneService extends AbstractPageSceneService {
50 JSONObject data = (JSONObject) searchApiResult.getData(); 51 JSONObject data = (JSONObject) searchApiResult.getData();
51 52
52 // 3、获取首页资源位直通车 53 // 3、获取首页资源位直通车
53 - data.put(SEARCH_RESOURCE_LIST, csSearchResourceService.queryFirstPageSearchResource(data, paramMap));//search_resource_list 54 + String show_resource = MapUtils.getString(paramMap,"show_resource","");
  55 + if(show_resource.equalsIgnoreCase("1")){
  56 + data.put(SEARCH_RESOURCE_LIST, csSearchResourceService.queryFirstPageSearchResource(data, paramMap));//search_resource_list
  57 + }else{
  58 + data.put(SEARCH_RESOURCE_LIST, new ArrayList<>());//search_resource_list
  59 + }
54 60
55 // 4、限制最大返回条数为200条 61 // 4、限制最大返回条数为200条
56 long total = Math.min(MapUtils.getIntValue(data, "total", 0), 200L); 62 long total = Math.min(MapUtils.getIntValue(data, "total", 0), 200L);