| | |
| | | List<DingDongQiangDTO> list = new ArrayList<>();
|
| | | Document doc = null;
|
| | | try {
|
| | | doc = Jsoup.connect("http://www.dataoke.com/ddq").get();
|
| | | doc = Jsoup.connect("http://www.dataoke.com/ddq").userAgent("").get();
|
| | | } catch (IOException e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | |
| | | for (Iterator<String> its = dataJson.keys(); its.hasNext();) {
|
| | | String key = its.next();
|
| | | JSONArray array = dataJson.optJSONArray(key);
|
| | | List<DaTaoKeDetail> detailList = new ArrayList<>();
|
| | | List<DaTaoKeDetailV2> detailList = new ArrayList<>();
|
| | | for (int n = 0; n < array.size(); n++) {
|
| | | detailList.add(new DaTaoKeDetail(array.optJSONObject(n).optLong("id")));
|
| | | DaTaoKeDetailV2 v2 = new DaTaoKeDetailV2();
|
| | | v2.setId(array.optJSONObject(n).optLong("id"));
|
| | | detailList.add(v2);
|
| | | }
|
| | | list.add(new DingDongQiangDTO(key, detailList));
|
| | | }
|
| | |
| | | return goods;
|
| | | }
|
| | |
|
| | | public static DaTaoKeDetail filterDaTaoKe(TaoBaoGoodsBrief goods, DaTaoKeDetail detail) {
|
| | | if (goods != null) {
|
| | | BigDecimal price = TaoBaoUtil.getAfterUseCouplePrice(goods);
|
| | | detail.setOrgPrice(goods.getZkPrice());
|
| | | detail.setPrice(price);
|
| | | if (goods.getCouponStartFee() != null)
|
| | | detail.setQuanCondition(goods.getCouponStartFee() + "");
|
| | | detail.setQuanId(goods.getCouponActivityId());
|
| | | detail.setQuanPrice(goods.getCouponAmount());
|
| | | return detail;
|
| | | }
|
| | |
|
| | | return detail;
|
| | | }
|
| | |
|
| | | }
|