|
|
|
@ -10,6 +10,7 @@ import com.fr.design.mainframe.alphafine.cell.model.AlphaCellModel;
|
|
|
|
|
import com.fr.design.mainframe.alphafine.cell.model.MoreModel; |
|
|
|
|
import com.fr.design.mainframe.alphafine.model.SearchResult; |
|
|
|
|
import com.fr.design.mainframe.alphafine.search.manager.fun.AlphaFineSearchProvider; |
|
|
|
|
import com.fr.general.ComparatorUtils; |
|
|
|
|
import com.fr.general.http.HttpToolbox; |
|
|
|
|
import com.fr.json.JSONArray; |
|
|
|
|
import com.fr.json.JSONObject; |
|
|
|
@ -67,7 +68,12 @@ public class RecommendSearchManager implements AlphaFineSearchProvider {
|
|
|
|
|
if (jsonArray != null && jsonArray.length() > 0) { |
|
|
|
|
for (int i = 0; i < jsonArray.length(); i++) { |
|
|
|
|
AlphaFineHelper.checkCancel(); |
|
|
|
|
AlphaCellModel alphaCellModel = CellModelHelper.getModelFromJson((JSONObject) jsonArray.get(i)); |
|
|
|
|
JSONObject jo = jsonArray.getJSONObject(i); |
|
|
|
|
JSONObject innerJo = jo.getJSONObject("result"); |
|
|
|
|
if (innerJo != null && ComparatorUtils.equals("failed", innerJo.get("state"))) { |
|
|
|
|
continue; |
|
|
|
|
} |
|
|
|
|
AlphaCellModel alphaCellModel = CellModelHelper.getModelFromJson(jo); |
|
|
|
|
if (alphaCellModel != null && !alreadyContain(alphaCellModel) && !this.recommendModelList.contains(alphaCellModel)) { |
|
|
|
|
this.recommendModelList.add(alphaCellModel); |
|
|
|
|
} |
|
|
|
|