| | |
| | | * @return
|
| | | * @throws TaobaoGoodsDownException
|
| | | */
|
| | | public static TaoBaoGoodsBrief searchGoodsDetail(Long id, String specialId,String relationId) throws TaobaoGoodsDownException {
|
| | | public static TaoBaoGoodsBrief searchGoodsDetail(Long id, String specialId, String relationId) throws TaobaoGoodsDownException {
|
| | | TaoBaoGoodsBrief goods = getSimpleGoodsInfo(id);
|
| | | if (goods == null)
|
| | | return null;
|
| | |
| | | }
|
| | |
|
| | | public static TaoBaoGoodsBrief searchGoodsDetail(Long id) throws TaobaoGoodsDownException {
|
| | | return searchGoodsDetail(id, null,null);
|
| | | return searchGoodsDetail(id, null, null);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | |
|
| | | if (newGoods != null) {
|
| | | goods.setTkRate(newGoods.getTkRate());
|
| | | goods.setAuctionUrl(newGoods.getAuctionUrl());
|
| | | goods.setCouponLink(newGoods.getCouponLink());
|
| | | if (!StringUtil.isNullOrEmpty(newGoods.getCouponInfo())) {
|
| | | List<BigDecimal> couponInfo = TaoBaoCouponUtil.getCouponInfo(newGoods.getCouponInfo());
|
| | | if (couponInfo != null && couponInfo.size() > 1) {
|
| | |
| | | return null;
|
| | | }
|
| | |
|
| | | public static String getTKToken(String logo, String text, String url, boolean simpleToken) {
|
| | | if (simpleToken) {
|
| | | return getSimpleTKToken(logo, text, url);
|
| | | } else {
|
| | | return getTKToken(logo, text, url);
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | public static String getSimpleTKToken(String logo, String text, String url) {
|
| | | if (text == null)
|
| | | return null;
|
| | | if (text.length() < 5)
|
| | | text = "好货:" + text;
|
| | |
|
| | | Map<String, String> map = new HashMap<>();
|
| | | map.put("method", "taobao.tbk.tpwd.create");
|
| | | map.put("url", url);
|
| | | map.put("text", text);
|
| | | map.put("logo", logo);
|
| | | String resultStr = TaoKeBaseUtil.baseRequestForThreeTimes(map, true);
|
| | |
|
| | | JSONObject data = JSONObject.fromObject(resultStr);
|
| | | if (data.optJSONObject("tbk_tpwd_create_response").optJSONObject("data") != null)
|
| | | return data.optJSONObject("tbk_tpwd_create_response").optJSONObject("data").optString("password_simple");
|
| | | return null;
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取券详细信息
|
| | | *
|