| | |
| | | import com.yeshi.fanli.entity.jd.JDGoods;
|
| | | import com.yeshi.fanli.entity.jd.JDOrder;
|
| | | import com.yeshi.fanli.entity.jd.JDOrderItem;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
| | | */
|
| | | public static String convertShortLink(String materialId, String couponUrl, String positionId, String ext1) {
|
| | | String url = convertLink(materialId, couponUrl, positionId, ext1);
|
| | | if (!StringUtil.isNullOrEmpty(url)) {
|
| | | url = HttpUtil.getShortLink(url);
|
| | | }
|
| | | //暂时注释
|
| | | // if (!StringUtil.isNullOrEmpty(url)) {
|
| | | // url = HttpUtil.getShortLink(url);
|
| | | // }
|
| | | return url;
|
| | | }
|
| | |
|
| | |
| | | if (discount_temp == null) {
|
| | | add = true;
|
| | | discount_temp = discount;
|
| | | } else if (discount_temp.compareTo(discount) > 0) { // 券面额大
|
| | | add = true;
|
| | | } else if (discount_temp.compareTo(discount) < 0 && discount.compareTo(price) <= 0) { |
| | | add = true; // 券面额大,且券能够使用
|
| | | }
|
| | |
|
| | | if (add) {
|
| | |
| | | if (!StringUtil.isNullOrEmpty(isFreeShipping)) {
|
| | | goods.setIsFreeShipping(Integer.parseInt(isFreeShipping));
|
| | | }
|
| | |
|
| | | String inOrderCount = json.optString("inOrderCount");
|
| | | if (!StringUtil.isNullOrEmpty(isFreeShipping)) {
|
| | | goods.setInOrderCount30Days(Long.parseLong(inOrderCount));
|
| | | }
|
| | | |
| | | goods.setCouponInfo(null);
|
| | | goods.setGoodCommentsShare(null);
|
| | | List<String> imageList = new ArrayList<>();
|
| | | imageList.add(json.optString("imgUrl"));
|
| | | goods.setPicUrl(json.optString("imgUrl"));
|
| | | goods.setImageList(imageList);
|
| | | goods.setInOrderCount30Days(0L);
|
| | | goods.setIsHot(null);
|
| | | goods.setMaterialUrl(json.optString("materialUrl"));
|
| | | goods.setOwner(null);
|
| | |
| | | jsonDTO.put("goodsReq", json);
|
| | |
|
| | | String result = baseRequest2("jd.union.open.goods.jingfen.query", null, jsonDTO);
|
| | | LogHelper.test(result);
|
| | | System.out.println(result);
|
| | | JSONObject resultJson = JSONObject.fromObject(result);
|
| | | resultJson = resultJson.optJSONObject("jd_union_open_goods_jingfen_query_response");
|