| | |
| | | return null;
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 单品详情API
|
| | | * @param itemid
|
| | | * @return
|
| | | */
|
| | | public HDKGoodsDetail getItemDetail(String itemid) {
|
| | | List<ParamsKeyValue> params = new ArrayList<HaoDanKuApiUtil.ParamsKeyValue>();
|
| | | params.add(new ParamsKeyValue("itemid", itemid));
|
| | |
| | | }
|
| | | return null;
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 精选低价包邮专区API
|
| | | * @param minId
|
| | | * @param pageSize
|
| | | * @return
|
| | | */
|
| | | public HDKGoodsListResultDTO getLowPricePinkageData(Integer minId, int pageSize, Integer typeNum) {
|
| | | if (minId == null)
|
| | | minId = 1;
|
| | | |
| | | List<ParamsKeyValue> params = new ArrayList<HaoDanKuApiUtil.ParamsKeyValue>();
|
| | | params.add(new ParamsKeyValue("min_id", minId +""));
|
| | | params.add(new ParamsKeyValue("back", pageSize + ""));
|
| | | params.add(new ParamsKeyValue("type", typeNum + ""));
|
| | | String result = baseGetRequest("low_price_Pinkage_data", params);
|
| | |
|
| | | JSONObject resultData = JSONObject.fromObject(result);
|
| | | if (resultData.optInt("code") == 1) {
|
| | | Integer newMinId = resultData.optInt("min_id");
|
| | | Type type = new TypeToken<ArrayList<HDKGoodsDetail>>() {
|
| | | }.getType();
|
| | | List<HDKGoodsDetail> list = new Gson().fromJson(resultData.optJSONArray("data").toString(), type);
|
| | | return new HDKGoodsListResultDTO(list, newMinId);
|
| | | }
|
| | | return null;
|
| | | }
|
| | | |
| | | |
| | | /**
|
| | | * 高佣专场商品API
|
| | | * @param minId
|
| | | * @param pageSize
|
| | | * @return
|
| | | */
|
| | | public HDKGoodsListResultDTO getHighitems(Integer minId, int pageSize, Integer catId) {
|
| | | if (minId == null)
|
| | | minId = 1;
|
| | | |
| | | List<ParamsKeyValue> params = new ArrayList<HaoDanKuApiUtil.ParamsKeyValue>();
|
| | | params.add(new ParamsKeyValue("min_id", minId +""));
|
| | | params.add(new ParamsKeyValue("back", pageSize + ""));
|
| | | if (catId != null)
|
| | | params.add(new ParamsKeyValue("cat_id", catId +""));
|
| | | |
| | | String result = baseGetRequest("get_highitems", params);
|
| | |
|
| | | JSONObject resultData = JSONObject.fromObject(result);
|
| | | if (resultData.optInt("code") == 200) {
|
| | | Integer newMinId = resultData.optInt("min_id");
|
| | | Type type = new TypeToken<ArrayList<HDKGoodsDetail>>() {
|
| | | }.getType();
|
| | | List<HDKGoodsDetail> list = new Gson().fromJson(resultData.optJSONArray("data").toString(), type);
|
| | | return new HDKGoodsListResultDTO(list, newMinId);
|
| | | }
|
| | | return null;
|
| | | }
|
| | | }
|