From cc88ea25dc395b5d1b9b5ac9ddba7713c667c1c1 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 17 十二月 2019 12:45:38 +0800
Subject: [PATCH] 专题与banner设置版本管理

---
 fanli/src/main/java/com/yeshi/fanli/util/jd/JDUtil.java |   30 ++++++++++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/util/jd/JDUtil.java b/fanli/src/main/java/com/yeshi/fanli/util/jd/JDUtil.java
index 4140021..cb97e00 100644
--- a/fanli/src/main/java/com/yeshi/fanli/util/jd/JDUtil.java
+++ b/fanli/src/main/java/com/yeshi/fanli/util/jd/JDUtil.java
@@ -29,6 +29,7 @@
 import org.yeshi.utils.HttpUtil;
 
 import com.yeshi.fanli.dto.GoodsClassDTO;
+import com.yeshi.fanli.dto.douyin.DouYinGoods;
 import com.yeshi.fanli.dto.jd.JDCommissionInfo;
 import com.yeshi.fanli.dto.jd.JDCouponInfo;
 import com.yeshi.fanli.dto.jd.JDPingouInfo;
@@ -625,6 +626,35 @@
 		return null;
 	}
 
+	
+	/**
+	 * 閫氳繃閾炬帴id
+	 * @param url
+	 * @return
+	 */
+	public static String getJDGoodsIdByWeiXin(String url) {
+		if (StringUtil.isNullOrEmpty(url)) 
+			return null;
+		
+		try {
+			String id = null;
+			int indexOf = url.indexOf("?");
+			url = url.substring(indexOf + 1, url.length()-1);
+			String[] temp = url.split("&");
+			for (int i =0; i < temp.length; i ++) {
+				 String content = temp[i];
+				if (content.startsWith("sku")) {
+					id = content.split("=")[content.split("=").length-1];
+					break;
+				} 
+			}
+			return id;
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		return null;
+	}
+	
 	/**
 	 * 鏌ヨ澶╃尗鍟嗗搧鍥剧墖銆佹爣棰�
 	 * 

--
Gitblit v1.8.0