|
|
@@ -15,6 +15,7 @@ import com.sheep.gamegroup.model.entity.GameEntity;
|
|
|
import com.sheep.gamegroup.model.entity.GameSimple;
|
|
|
import com.sheep.gamegroup.model.entity.GiftBag;
|
|
|
import com.sheep.gamegroup.model.entity.GiftBagApp;
|
|
|
+import com.sheep.gamegroup.model.entity.ShopGoodsInfo;
|
|
|
import com.sheep.gamegroup.model.entity.TaskSimple;
|
|
|
import com.sheep.gamegroup.model.util.SheepSubscriber;
|
|
|
import com.sheep.gamegroup.util.ViewUtil;
|
|
|
@@ -41,6 +42,7 @@ public class FgtSearch extends BaseFragment implements ISearch {
|
|
|
private int taskCount = 0;
|
|
|
private int giftCount = 0;
|
|
|
private int articleCount = 0;
|
|
|
+ private int goodsCount = 0;
|
|
|
|
|
|
private String keyword;
|
|
|
|
|
|
@@ -110,7 +112,7 @@ public class FgtSearch extends BaseFragment implements ISearch {
|
|
|
|
|
|
private void search(boolean isRefresh) {
|
|
|
SheepApp.getInstance().getNetComponent().getApiService()
|
|
|
- .search(keyword, gameCount, taskCount, giftCount, articleCount)
|
|
|
+ .search(keyword, gameCount, taskCount, giftCount, articleCount, goodsCount)
|
|
|
.subscribeOn(Schedulers.io())
|
|
|
.observeOn(AndroidSchedulers.mainThread())
|
|
|
.subscribe(new SheepSubscriber<BaseMessage>(SheepApp.getInstance()) {
|
|
|
@@ -124,6 +126,7 @@ public class FgtSearch extends BaseFragment implements ISearch {
|
|
|
taskCount += base.getInt("task_count");
|
|
|
giftCount += base.getInt("gift_count");
|
|
|
articleCount += base.getInt("article_count");
|
|
|
+ goodsCount += base.getInt("goods_count");
|
|
|
JSONArray array = base.getJSONArray("list");
|
|
|
for (int i = 0; i < array.length(); i++) {
|
|
|
JSONObject object = array.getJSONObject(i);
|
|
|
@@ -138,6 +141,8 @@ public class FgtSearch extends BaseFragment implements ISearch {
|
|
|
item.object = com.alibaba.fastjson.JSONObject.parseObject(item.data, GiftBagApp.class);
|
|
|
} else if (item.type == 4) {
|
|
|
item.object = com.alibaba.fastjson.JSONObject.parseObject(item.data, Article.class);
|
|
|
+ } else if (item.type == 5) {
|
|
|
+ item.object = com.alibaba.fastjson.JSONObject.parseObject(item.data, ShopGoodsInfo.class);
|
|
|
} else {
|
|
|
continue;
|
|
|
}
|