Authored by 胡古飞

Merge branch 'master' into 1212

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