| | |
| | | map.put("method", "taobao.tbk.item.info.get");
|
| | | map.put("num_iids", id + "");
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true);
|
| | | // System.out.println(resultStr);
|
| | | System.out.println(resultStr);
|
| | | JSONObject data = JSONObject.fromObject(resultStr);
|
| | | // 商品下架
|
| | | if (data.optJSONObject("error_response") != null && data.optJSONObject("error_response").optInt("code") == 15
|
| | |
| | | if (item.optBoolean("free_shipment"))
|
| | | goods.setFreeShipment(1);
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("material_lib_type")))
|
| | | goods.setMaterialLibType(item.optInt("material_lib_type"));
|
| | | else
|
| | | if (!StringUtil.isNullOrEmpty(item.optString("material_lib_type"))) {
|
| | | try {
|
| | | String materialLibType = item.optString("material_lib_type");
|
| | | goods.setMaterialLibType(Integer.parseInt(materialLibType.split(",")[0]));
|
| | | } catch (Exception e) {
|
| | | goods.setMaterialLibType(0);
|
| | | }
|
| | |
|
| | | } else
|
| | | goods.setMaterialLibType(0);
|
| | |
|
| | | return goods;
|
| | |
| | | dto.setPage(pageEntity);
|
| | | return dto;
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * 店铺搜索
|
| | | *
|
| | |
| | | map.put("method", "taobao.tbk.shop.get");
|
| | | map.put("fields", "user_id,shop_title,shop_type,seller_nick,pict_url,shop_url");
|
| | | map.put("q", filter.getKey());
|
| | | map.put("page_size", filter.getPageSize()+ "");
|
| | | map.put("page_size", filter.getPageSize() + "");
|
| | | map.put("page_no", filter.getPage() + "");
|
| | | |
| | | if(!StringUtil.isNullOrEmpty(filter.getSort()))
|
| | |
|
| | | if (!StringUtil.isNullOrEmpty(filter.getSort()))
|
| | | map.put("sort", filter.getSort());
|
| | | |
| | | if(filter.getTmall() != null)
|
| | |
|
| | | if (filter.getTmall() != null)
|
| | | map.put("is_tmall", filter.getTmall() + "");
|
| | | |
| | |
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true);
|
| | | JSONObject resultDate = JSONObject.fromObject(resultStr);
|
| | | if (resultDate.optJSONObject("tbk_shop_get_response") != null
|
| | |
| | | }
|
| | | return list;
|
| | | }
|
| | |
|
| | |
|
| | | /**
|
| | | * 品牌券获取
|
| | |
| | | // 淘礼金创建
|
| | | public static TaoLiJinDTO createTaoLiJin(Long auctionId, String name, BigDecimal perface, int totalNum,
|
| | | Date sendStartTime, Date sendEndTime, Date useStartTime, Date useEndTime, TaoKeAppInfo app)
|
| | | throws TaoLiJinCreateException,TaoKeApiException {
|
| | | throws TaoLiJinCreateException, TaoKeApiException {
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.dg.vegas.tlj.create");
|
| | | map.put("adzone_id", app.getPid().split("_")[3]);
|