admin
2022-08-25 146dbd5ed24c1fe63766aa45e0ce602caa39748e
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
@@ -171,7 +171,7 @@
        // 去除前后空格
        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);
@@ -188,7 +188,7 @@
                        @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;
                            }
@@ -201,7 +201,7 @@
                            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);
@@ -223,17 +223,17 @@
                                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);
                                }
@@ -241,7 +241,7 @@
                                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);
@@ -301,7 +301,7 @@
                                                            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));
@@ -439,7 +439,7 @@
        }
        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));
        // 去网页
@@ -453,7 +453,7 @@
            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));
        }
@@ -528,7 +528,7 @@
     */
    @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, "请传递正确平台参数"));
@@ -727,7 +727,7 @@
     */
    private void searchTaoBaoGoods(AcceptData acceptData, Long uid, String key, Integer page, String filter, Integer order,
                                   AppPageNotification ap, PrintWriter out) {
        Long goodsId = null;
        String goodsId = null;
        //是否包含淘宝链接/口令
        if (page == 1) {
            List<String> linkList = HttpUtil.getUrlListFromText(key);
@@ -741,7 +741,7 @@
                    e.printStackTrace();
                }
                if (goodsId == null) {
                    Long id = DaTaoKeApiUtil.parseTaoBaoToken(key);
                    String id = DaTaoKeApiUtil.parseTaoBaoToken(key);
                    if (id != null) {
                        goodsId = id;
                    }
@@ -751,7 +751,7 @@
                    if (linkList != null && linkList.size() > 0) {
                        String tempGoodsId = clipboardAnalysisManager.parseTBAuctionIdFromLink(linkList.get(0));
                        if (!StringUtil.isNullOrEmpty(tempGoodsId)) {
                            goodsId = Long.parseLong(tempGoodsId);
                            goodsId = tempGoodsId;
                        }
                    }
                }
@@ -878,7 +878,7 @@
        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();
@@ -1177,6 +1177,17 @@
                }
            } 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();