|
@@ -9,15 +9,38 @@ import java.util.Map;
|
|
|
|
|
|
public class TaobaoConfig {
|
|
|
|
|
|
+ /**
|
|
|
+ * 爱贝源淘宝店铺 rst id
|
|
|
+ */
|
|
|
+ public static final int STORE_ID_IAMBERRY = 86;
|
|
|
+ /**
|
|
|
+ * 美塔璞儿淘宝店铺 rst id
|
|
|
+ */
|
|
|
+ public static final int STORE_ID_METAPURE = 186;
|
|
|
+
|
|
|
public static final String TAOBAO_URL = "https://eco.taobao.com/router/rest";
|
|
|
|
|
|
public static final String appkey = "33060815";
|
|
|
|
|
|
public static final String secret = "16e44445788f75485fd03e6b333e8484";
|
|
|
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 淘宝爱贝源
|
|
|
+ */
|
|
|
public static Map<String, Object> getToken() {
|
|
|
- String taobaoSession = RedisUtils.get("TAOBAO_SESSION");
|
|
|
+ return getToken("TAOBAO_SESSION");
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 淘宝美塔璞儿
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public static Map<String, Object> getMetaureToken() {
|
|
|
+ return getToken("TAOBAO_METAPURE_SESSION");
|
|
|
+ }
|
|
|
+
|
|
|
+ public static Map<String, Object> getToken(String redisKey) {
|
|
|
+ String taobaoSession = RedisUtils.get(redisKey);
|
|
|
// 判断数据
|
|
|
if (taobaoSession == null) {
|
|
|
return null;
|