| | |
| | | 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;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserExtraTaoBaoInfoService userExtraTaoBaoInfoService;
|
| | |
|
| | | @Resource
|
| | | private PDDAuthService pddAuthService;
|
| | |
|
| | |
|
| | | /**
|
| | |
| | |
|
| | | /*-------- 拼多多商品 -------*/
|
| | | if (goodsType.intValue() == Constant.SOURCE_TYPE_PDD) {
|
| | | searchPDDGoods(acceptData,uid, searchkey, page, filter, order, ap, out);
|
| | | searchPDDGoods(acceptData, uid, searchkey, page, filter, order, ap, out);
|
| | | return;
|
| | | }
|
| | |
|
| | |
| | | * @param ap
|
| | | * @param out
|
| | | */
|
| | | private void searchPDDGoods(AcceptData acceptData,Long uid, 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));
|
| | |
| | | int count = 0;
|
| | | JSONObject data = new JSONObject();
|
| | | JSONArray array = new JSONArray();
|
| | | String customParams = Constant.PDD_SEARCH_CUSTOMER_PARAMS;
|
| | |
|
| | | PDDGoodsResult result = PinDuoDuoApiUtil.searchGoods(pddfilter,uid+"");
|
| | | 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();
|