From 54c250656c2e471ad48ecaa8ccce16ec9d7eb8bd Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期二, 03 十二月 2019 13:52:38 +0800
Subject: [PATCH] Merge branch 'div' of ssh://193.112.35.168:29418/fanli-server into div

---
 fanli/src/main/java/com/yeshi/fanli/util/pinduoduo/PinDuoDuoApiUtil.java |   33 ++++++++++++++++++++++-----------
 1 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/util/pinduoduo/PinDuoDuoApiUtil.java b/fanli/src/main/java/com/yeshi/fanli/util/pinduoduo/PinDuoDuoApiUtil.java
index 136122b..c127299 100644
--- a/fanli/src/main/java/com/yeshi/fanli/util/pinduoduo/PinDuoDuoApiUtil.java
+++ b/fanli/src/main/java/com/yeshi/fanli/util/pinduoduo/PinDuoDuoApiUtil.java
@@ -124,6 +124,17 @@
 		return new PDDGoodsResult(totalCount, goodsList);
 	}
 
+	public static List<PDDGoodsDetail> listGoodsDetail(List<Long> goodsIds) {
+		PDDSearchFilter filter = new PDDSearchFilter();
+		Long[] ids = new Long[goodsIds.size()];
+		goodsIds.toArray(ids);
+		filter.setGoodsIdList(ids);
+		PDDGoodsResult result = searchGoods(filter);
+		if (result != null)
+			return result.getGoodsList();
+		return null;
+	}
+
 	/**
 	 * 杩愯惀棰戦亾鍟嗗搧鏌ヨAPI
 	 * 
@@ -435,36 +446,36 @@
 		return null;
 	}
 
-	
 	/**
 	 * 鑾峰彇鍟嗗搧璇︽儏
 	 * 
 	 * @param goodsId
 	 */
-	public static PDDShopResult getShopList(Integer page,Long catId) {
+	public static PDDShopResult getShopList(Integer page, Long catId) {
 		JSONArray arrayType = new JSONArray();
 		arrayType.add(3);
-		
+
 		Map<String, String> map = new HashMap<>();
 		map.put("type", "pdd.ddk.merchant.list.get");
 		if (catId != null)
-			map.put("cat_id", catId +"");
+			map.put("cat_id", catId + "");
 		if (page != null)
-			map.put("page_number", page +"");
-		
+			map.put("page_number", page + "");
+
 		if (page != null)
-			map.put("page_number", page +"");
-		
+			map.put("page_number", page + "");
+
 		map.put("merchant_type_list", arrayType.toString());
-		
+
 		String result = baseRequest(map);
 		JSONObject resultJson = JSONObject.fromObject(result);
 		JSONObject root = resultJson.optJSONObject("merchant_list_response");
 		if (root != null) {
 			int totalCount = root.optInt("total");
-			
+
 			JSONArray array = root.optJSONArray("mall_search_info_vo_list");
-			Type type = new TypeToken<List<PDDShopDetail>>() {}.getType();
+			Type type = new TypeToken<List<PDDShopDetail>>() {
+			}.getType();
 			List<PDDShopDetail> listShop = new Gson().fromJson(array.toString(), type);
 			return new PDDShopResult(totalCount, listShop);
 		}

--
Gitblit v1.8.0