| | |
| | | model.setPicHeight(320);
|
| | | String key = "querySearchcommoditynew";
|
| | | String json = new Gson().toJson(model);
|
| | | //String result = baseRequest("suning.netalliance.searchcommoditynew.query", key, JSONObject.fromObject(json));
|
| | | // String result =
|
| | | // baseRequest("suning.netalliance.searchcommoditynew.query", key,
|
| | | // JSONObject.fromObject(json));
|
| | | String result = baseRequest("suning.netalliance.searchcommoditynew.query", key, JSONObject.fromObject(json));
|
| | | JSONObject resultJSON = JSONObject.fromObject(result);
|
| | | JSONArray array = resultJSON.optJSONObject("sn_responseContent").optJSONObject("sn_body").optJSONObject(key)
|
| | |
| | | return null;
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 查询商品
|
| | | * @Title: searchGoods
|
| | |
| | | JSONObject resultJSON = JSONObject.fromObject(result);
|
| | | JSONObject responseContent = resultJSON.optJSONObject("sn_responseContent");
|
| | | if (responseContent != null) {
|
| | | JSONObject snBody = responseContent.optJSONObject("sn_body");
|
| | | if (snBody != null) {
|
| | | JSONArray array = snBody.optJSONArray(key);
|
| | | if (array != null) {
|
| | | JSONObject snBody = responseContent.optJSONObject("sn_body");
|
| | | if (snBody != null) {
|
| | | JSONArray array = snBody.optJSONArray(key);
|
| | | if (array != null) {
|
| | | Type type = new TypeToken<ArrayList<SuningGoodsInfo>>() {
|
| | | }.getType();
|
| | | List<SuningGoodsInfo> goodsList = new Gson().fromJson(array.toString(), type);
|
| | | return goodsList;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | return null;
|
| | | }
|
| | | |
| | |
|
| | | public static SuningGoodsInfo getGoodsDetail(String goodsCode, String supplierCode) {
|
| | | JSONObject model = new JSONObject();
|
| | | model.put("commodityStr", goodsCode + "-" + supplierCode);
|
| | | model.put("commodityStr", goodsCode + "-" +SuningUtil.getFullSupplierCode( supplierCode));
|
| | | model.put("picWidth", 600);
|
| | | model.put("picHeight", 600);
|
| | | model.put("couponMark", 1);
|
| | |
| | | }
|
| | | return null;
|
| | | }
|
| | | |
| | | |
| | |
|
| | | /**
|
| | | * 查询关联商品
|
| | | * @Title: searchGoods
|
| | |
| | | model.put("supplierCode", supplierCode);
|
| | | model.put("picWidth", 320);
|
| | | model.put("picHeight", 320);
|
| | | |
| | |
|
| | | String key = "getMorerecommend";
|
| | | String json = new Gson().toJson(model);
|
| | | String result = baseRequest("suning.netalliance.morerecommend.get", key, JSONObject.fromObject(json));
|
| | |
| | | }
|
| | | return null;
|
| | | }
|
| | | |
| | |
|
| | | public static List<SuningGoodsInfo> getGoodsDetailList(List<String> list) {
|
| | | String sts = "";
|
| | |
| | | * @param startTime
|
| | | * @param endTime
|
| | | * @param page
|
| | | * @param orderLineStatus
|
| | | * @param orderLineStatus (0:全部状态;1:等待付款;2:支付完成;3:退款;4:订单已取消;5:确认收货)
|
| | | * @return
|
| | | * SuningOrderQueryResultDTO 返回类型
|
| | | * @throws
|
| | |
| | | String result = baseRequest("suning.netalliance.order.query", key, model);
|
| | | JSONObject resultJSON = JSONObject.fromObject(result);
|
| | | resultJSON = resultJSON.optJSONObject("sn_responseContent");
|
| | | JSONArray array = resultJSON.optJSONObject("sn_body").optJSONArray(key);
|
| | | JSONObject snBody = resultJSON.optJSONObject("sn_body");
|
| | | if (snBody == null)
|
| | | return null;
|
| | |
|
| | | JSONArray array = snBody.optJSONArray(key);
|
| | |
|
| | | if (array == null)
|
| | | return null;
|
| | |
|
| | | Gson gson = new Gson();
|
| | |
|
| | | Type type = new TypeToken<ArrayList<SuningOrderInfo>>() {
|