| | |
| | | // 去除前后空格 |
| | | text = text.trim(); |
| | | String originalText = text; |
| | | if (acceptData.getSystem() == SystemEnum.yhqjx||acceptData.getSystem() == SystemEnum.hsb) { |
| | | if (acceptData.getSystem() == SystemEnum.yhqjx || acceptData.getSystem() == SystemEnum.hsb) { |
| | | Integer sourceType = clipboardAnalysisManager.tejiaParseSourceType(text); |
| | | JSONObject root = new JSONObject(); |
| | | root.put("type", 2); |
| | |
| | | |
| | | @Override |
| | | public void onResult(GoodsDocParseResultVO result) { |
| | | if (uid == null || (acceptData.getSystem() == SystemEnum.yhqjx||acceptData.getSystem() == SystemEnum.hsb)) { |
| | | if (uid == null || (acceptData.getSystem() == SystemEnum.yhqjx || acceptData.getSystem() == SystemEnum.hsb)) { |
| | | out.print(JsonUtil.loadFalseResult("无推荐")); |
| | | return; |
| | | } |
| | |
| | | int platformCode = Constant.getPlatformCode(acceptData.getPlatform()); |
| | | int version = Integer.parseInt(acceptData.getVersion()); |
| | | JumpDetailContentVO convert = new JumpDetailContentVO(); |
| | | convert.setJumpDetail(jumpDetailV2Service.getByTypeCache("web", platformCode, version,acceptData.getSystem())); |
| | | convert.setJumpDetail(jumpDetailV2Service.getByTypeCache("web", platformCode, version, acceptData.getSystem())); |
| | | JSONObject convertParams = new JSONObject(); |
| | | convertParams.put("url", configService.getValue(ConfigKeyEnum.convertDocWebLink.getKey(), acceptData.getSystem())); |
| | | convertParams.put("clipboard", false); |
| | |
| | | if (result.getFirstGoods().getGoodsType() == Constant.SOURCE_TYPE_TAOBAO) { |
| | | view = new JumpDetailContentVO(); |
| | | view.setJumpDetail( |
| | | jumpDetailV2Service.getByTypeCache("goodsdetail", platformCode, version,acceptData.getSystem())); |
| | | jumpDetailV2Service.getByTypeCache("goodsdetail", platformCode, version, acceptData.getSystem())); |
| | | view.setParams(params); |
| | | } else if (result.getFirstGoods().getGoodsType() == Constant.SOURCE_TYPE_JD) { |
| | | view = new JumpDetailContentVO(); |
| | | view.setJumpDetail( |
| | | jumpDetailV2Service.getByTypeCache("goodsdetail_jd", platformCode, version,acceptData.getSystem())); |
| | | jumpDetailV2Service.getByTypeCache("goodsdetail_jd", platformCode, version, acceptData.getSystem())); |
| | | view.setParams(params); |
| | | } else if (result.getFirstGoods().getGoodsType() == Constant.SOURCE_TYPE_PDD) { |
| | | view = new JumpDetailContentVO(); |
| | | view.setJumpDetail( |
| | | jumpDetailV2Service.getByTypeCache("goodsdetail_pdd", platformCode, version,acceptData.getSystem())); |
| | | jumpDetailV2Service.getByTypeCache("goodsdetail_pdd", platformCode, version, acceptData.getSystem())); |
| | | view.setParams(params); |
| | | } |
| | | |
| | |
| | | state = 2; |
| | | data.put("stateDesc", "选择搜券或转链"); |
| | | view = new JumpDetailContentVO(); |
| | | view.setJumpDetail(jumpDetailV2Service.getByTypeCache("web", platformCode, version,acceptData.getSystem())); |
| | | view.setJumpDetail(jumpDetailV2Service.getByTypeCache("web", platformCode, version, acceptData.getSystem())); |
| | | JSONObject params = new JSONObject(); |
| | | params.put("url", result.getFirstLink()); |
| | | view.setParams(params); |
| | |
| | | acceptData.getPlatform(), |
| | | acceptData.getVersion(), acceptData.getSystem())); |
| | | |
| | | goodsDetailVO = goodsLijinMnager.loadTBMoneyInfo(acceptData.getSystem(), uid, goodsBrief, goodsDetailVO,false); |
| | | goodsDetailVO = goodsLijinMnager.loadTBMoneyInfo(acceptData.getSystem(), uid, goodsBrief, goodsDetailVO, false); |
| | | |
| | | data.put("goods", |
| | | gson.toJson(goodsDetailVO)); |
| | |
| | | } |
| | | |
| | | RecommendJumpInfoVO left = new RecommendJumpInfoVO("去看看", jumpDetailV2Service.getByTypeCache(type, |
| | | Constant.getPlatformCode(acceptData.getPlatform()), Integer.parseInt(acceptData.getVersion()),acceptData.getSystem()), params); |
| | | Constant.getPlatformCode(acceptData.getPlatform()), Integer.parseInt(acceptData.getVersion()), acceptData.getSystem()), params); |
| | | data.put("left", gson.toJson(left)); |
| | | |
| | | // 去网页 |
| | |
| | | params.put("url", rightValue); |
| | | |
| | | RecommendJumpInfoVO right = new RecommendJumpInfoVO("有更高返利?", jumpDetailV2Service.getByTypeCache("web", |
| | | Constant.getPlatformCode(acceptData.getPlatform()), Integer.parseInt(acceptData.getVersion()),acceptData.getSystem()), |
| | | Constant.getPlatformCode(acceptData.getPlatform()), Integer.parseInt(acceptData.getVersion()), acceptData.getSystem()), |
| | | params); |
| | | data.put("right", gson.toJson(right)); |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "searchGoods") |
| | | public void searchGoods(AcceptData acceptData, Integer goodsType, String key, Integer page, String filter, |
| | | Integer order, Long uid, String notifyType, HttpSession session,HttpServletRequest request, PrintWriter out) { |
| | | Integer order, Long uid, String notifyType, HttpSession session, HttpServletRequest request, PrintWriter out) { |
| | | |
| | | if (goodsType == null || goodsType < 1 || goodsType > 5) { |
| | | out.print(JsonUtil.loadFalseResult(1, "请传递正确平台参数")); |
| | |
| | | GoodsMoneyConfigParamsDTO paramsDTO = orderHongBaoMoneyComputeService.getShowComputeRate(acceptData.getPlatform(), |
| | | acceptData.getVersion(), acceptData.getSystem()); |
| | | |
| | | List<GoodsDetailVO> list = goodsLijinMnager.loadTBMoneyInfo(acceptData.getSystem(), uid, goodsBriefList, paramsDTO,false); |
| | | List<GoodsDetailVO> list = goodsLijinMnager.loadTBMoneyInfo(acceptData.getSystem(), uid, goodsBriefList, paramsDTO, false); |
| | | |
| | | Gson gson = JsonUtil.getConvertBigDecimalToStringSubZeroBuilder(new GsonBuilder()) |
| | | .excludeFieldsWithoutExposeAnnotation().create(); |
| | |
| | | } |
| | | } catch (PDDApiException e) { |
| | | e.printStackTrace(); |
| | | if (e.getCode() == PDDApiException.CODE_NOT_AUTH) { |
| | | try { |
| | | PDDGoodsDetail pddGoodsDetail = PinDuoDuoApiUtil.getGoodsDetail(Long.parseLong(goodsId), PinDuoDuoApiUtil.PID_DEFAULT, Constant.PDD_SEARCH_CUSTOMER_PARAMS); |
| | | if (pddGoodsDetail != null) { |
| | | count = 1; |
| | | goodsList.add(pddGoodsDetail); |
| | | } |
| | | } catch (Exception e1) { |
| | | |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | PDDSearchFilter pddfilter = new PDDSearchFilter(); |