| | |
| | | return searchResult;
|
| | | }
|
| | |
|
| | | public static JDGoods getGoodsDetail(Long skuId) {
|
| | | JDSearchFilter sf = new JDSearchFilter();
|
| | | sf.setKey(skuId + "");
|
| | | sf.setPageNo(1);
|
| | | sf.setPageSize(20);
|
| | | JDSearchResult result = searchByKey(sf);
|
| | | if (result != null && result.getGoodsList() != null && result.getGoodsList().size() > 0)
|
| | | return result.getGoodsList().get(0);
|
| | | return null;
|
| | | }
|
| | |
|
| | | private static JDGoods parseGoods(String data) {
|
| | | JDGoods goods = new JDGoods();
|
| | | JSONObject json = JSONObject.fromObject(data);
|
| | |
| | | goods.setOwner("g");
|
| | | else
|
| | | goods.setOwner("p");
|
| | | goods.setMaterialUrl("http://img14.360buyimg.com/n1/"+json.optString("materialUrl"));
|
| | | goods.setMaterialUrl("http://img14.360buyimg.com/n1/" + json.optString("materialUrl"));
|
| | | JDCommissionInfo commission = new JDCommissionInfo();
|
| | | commission.setCommission(new BigDecimal(json.optString("wlCommission")));
|
| | | commission.setCommissionShare(new BigDecimal(json.optString("wlCommissionRatio")));
|