admin
2021-01-27 e1a62ec62e7331d97af9302e90e1ce44af8235eb
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
@@ -9,6 +9,7 @@
import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import com.yeshi.fanli.service.inter.pdd.PDDAuthService;
import com.yeshi.fanli.service.inter.user.tb.UserExtraTaoBaoInfoService;
import org.springframework.core.task.TaskExecutor;
import org.springframework.stereotype.Controller;
@@ -139,6 +140,9 @@
    @Resource
    private UserExtraTaoBaoInfoService userExtraTaoBaoInfoService;
    @Resource
    private PDDAuthService pddAuthService;
    /**
@@ -564,7 +568,7 @@
        /*-------- 拼多多商品  -------*/
        if (goodsType.intValue() == Constant.SOURCE_TYPE_PDD) {
            searchPDDGoods(acceptData, searchkey, page, filter, order, ap, out);
            searchPDDGoods(acceptData, uid, searchkey, page, filter, order, ap, out);
            return;
        }
@@ -934,7 +938,7 @@
     * @param ap
     * @param out
     */
    private void searchPDDGoods(AcceptData acceptData, String key, Integer page, String filter, Integer order,
    private void searchPDDGoods(AcceptData acceptData, Long uid, String key, Integer page, String filter, Integer order,
                                AppPageNotification ap, PrintWriter out) {
        PDDSearchFilter pddfilter = new PDDSearchFilter();
        pddfilter.setKw(SearchFilterUtil.filterSearchContent(key));
@@ -978,8 +982,16 @@
        int count = 0;
        JSONObject data = new JSONObject();
        JSONArray array = new JSONArray();
        String customParams = Constant.PDD_SEARCH_CUSTOMER_PARAMS;
        PDDGoodsResult result = PinDuoDuoApiUtil.searchGoods(pddfilter);
        if (uid != null) {
            String cp = pddAuthService.getFanliCustomParams(uid);
            if (PinDuoDuoApiUtil.isAuth(PinDuoDuoApiUtil.PID_FANLI, cp)) {
                customParams = cp;
            }
        }
        PDDGoodsResult result = PinDuoDuoApiUtil.searchGoods(pddfilter, customParams);
        if (result != null) {
            count = result.getTotalCount();
            Gson gson = JsonUtil.getApiCommonGson();