| | |
| | |
|
| | | String minPrice = jsonfilter.optString("minPrice");
|
| | | if (!StringUtil.isNullOrEmpty(minPrice)) {
|
| | | if(minPrice.contains(".")) {
|
| | | minPrice = minPrice.replace(".", "-");
|
| | | minPrice = minPrice.split("-")[0];
|
| | | }
|
| | | jdfilter.setFromPrice(Integer.parseInt(minPrice));
|
| | | }
|
| | |
|
| | | String maxPrice = jsonfilter.optString("maxPrice");
|
| | | if (!StringUtil.isNullOrEmpty(maxPrice)) {
|
| | | if(maxPrice.contains(".")) {
|
| | | maxPrice = maxPrice.replace(".", "-");
|
| | | maxPrice = maxPrice.split("-")[0];
|
| | | }
|
| | | jdfilter.setToPrice(Integer.parseInt(maxPrice));
|
| | | }
|
| | | }
|
| | |
| | | PDDGoodsResult result = PinDuoDuoApiUtil.searchGoods(pddfilter);
|
| | | if (result != null) {
|
| | | count = result.getTotalCount();
|
| | | Gson gson = JsonUtil.getApiCommonGson();
|
| | | List<PDDGoodsDetail> goodsList = result.getGoodsList();
|
| | | if (goodsList != null && goodsList.size() > 0) {
|
| | | BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
|
| | |
| | | for (PDDGoodsDetail goods : goodsList) {
|
| | | GoodsDetailVO goodsDetailVO = GoodsDetailVOFactory.convertPDDGoods(goods, null, fanLiRate,
|
| | | shareRate);
|
| | | array.add(GsonUtil.toJsonExpose(goodsDetailVO));
|
| | | array.add(gson.toJson(goodsDetailVO));
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | |
| | | data.put("result", array);
|
| | | data.put("count", count);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|