| | |
| | | return;
|
| | | }
|
| | |
|
| | | if (analysisTaoToken(text, out)) {
|
| | | if (analysisTaoToken(acceptData, text, out)) {
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | out.print(JsonUtil.loadTrueResult(root));
|
| | | }
|
| | |
|
| | | private boolean analysisTaoToken(String text, PrintWriter out) {
|
| | | private boolean analysisTaoToken(AcceptData acceptData, String text, PrintWriter out) {
|
| | | String token = StringUtil.picUpTaoToken(text);
|
| | | if (!StringUtil.isNullOrEmpty(token)) {
|
| | | Long auctionId = TaoKeApiUtil.tokenConvertAuctionId(token);
|
| | |
| | | }
|
| | |
|
| | | if (tb != null) {
|
| | | if (VersionUtil.greaterThan_1_6_5(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | TaoBaoGoodsBrief goodsBrief = null;
|
| | | try {
|
| | | goodsBrief = TaoKeApiUtil.searchGoodsDetail(tb.getAuctionId());
|
| | | } catch (TaobaoGoodsDownException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | |
| | | if (goodsBrief == null) {
|
| | | out.println(JsonUtil.loadFalseResult("暂未找到该商品,请稍后再试!"));
|
| | | return false;
|
| | | }
|
| | | |
| | | BigDecimal fanLiRate = hongBaoManageService.getFanLiRate();
|
| | | BigDecimal shareRate = hongBaoManageService.getShareRate();
|
| | | Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder())
|
| | | .excludeFieldsWithoutExposeAnnotation().setDateFormat("yyyy-MM-dd").create();
|
| | | |
| | | JSONObject data = new JSONObject();
|
| | | data.put("type", 3);
|
| | | data.put("goods", gson.toJson(GoodsDetailVOFactory.convertTaoBao(goodsBrief, null, fanLiRate, shareRate)));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | return true;
|
| | | }
|
| | | |
| | | |
| | | JSONObject data = new JSONObject();
|
| | | JSONObject taoBaoGoodsJSON = new JSONObject();
|
| | | taoBaoGoodsJSON.put("title", tb.getTitle());
|