| | |
| | | import com.yeshi.fanli.dto.pdd.PDDGoodsDetail;
|
| | | import com.yeshi.fanli.dto.pdd.PDDGoodsResult;
|
| | | import com.yeshi.fanli.dto.pdd.PDDSearchFilter;
|
| | | import com.yeshi.fanli.dto.suning.SuningCommodityInfo;
|
| | | import com.yeshi.fanli.dto.suning.SuningGoodsInfo;
|
| | | import com.yeshi.fanli.dto.suning.SuningQueryModel;
|
| | | import com.yeshi.fanli.dto.vip.VIPSearchFilter;
|
| | |
| | | SuningQueryModel searchFilter = new SuningQueryModel();
|
| | | searchFilter.setKeyword(key);
|
| | | searchFilter.setPageIndex(page);
|
| | | searchFilter.setSize(Constant.PAGE_SIZE);
|
| | | searchFilter.setSize(10);
|
| | |
|
| | | if (order != null) {
|
| | | if (order == 1) { // 销量高到低
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | int count = 0;
|
| | | JSONObject data = new JSONObject();
|
| | | JSONArray array = new JSONArray();
|
| | |
|
| | | List<SuningGoodsInfo> resultList = SuningApiUtil.searchGoods(searchFilter);
|
| | | List<SuningGoodsInfo> resultList = null;
|
| | | List<SuningGoodsInfo> list = SuningApiUtil.searchGoodsOld(searchFilter);
|
| | | if (list != null && list.size() > 0) {
|
| | | List<String> listId = new ArrayList<>();
|
| | | for (SuningGoodsInfo goodsInfo: list) {
|
| | | SuningCommodityInfo info = goodsInfo.getCommodityInfo();
|
| | | if (info != null) {
|
| | | listId.add(info.getCommodityCode() + "-" + info.getSupplierCode());
|
| | | }
|
| | | }
|
| | | resultList = SuningApiUtil.getGoodsDetailList(listId);
|
| | | }
|
| | | |
| | | if (resultList != null) {
|
| | | if (resultList.size() == 0)
|
| | | count = 0;
|
| | | else
|
| | | count = resultList.size() + 1;
|
| | | Gson gson = JsonUtil.getApiCommonGson();
|
| | | if (resultList != null && resultList.size() > 0) {
|
| | | ConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(),
|
| | |
| | | }
|
| | |
|
| | | data.put("result", array);
|
| | | data.put("count", count);
|
| | | data.put("count", 1000);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|