From cca287441f277a3049cc280ae0d1e622d99d22ef Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 08 六月 2021 18:40:31 +0800
Subject: [PATCH] 特价bug修复

---
 app/src/main/java/com/tejia/lijin/app/ShoppingApi.java |   84 ++++++++++++++++++++++++++++++++++++++---
 1 files changed, 77 insertions(+), 7 deletions(-)

diff --git a/app/src/main/java/com/tejia/lijin/app/ShoppingApi.java b/app/src/main/java/com/tejia/lijin/app/ShoppingApi.java
index 40c83b2..26e9e97 100644
--- a/app/src/main/java/com/tejia/lijin/app/ShoppingApi.java
+++ b/app/src/main/java/com/tejia/lijin/app/ShoppingApi.java
@@ -65,7 +65,7 @@
 
     public static OkHttpClient mOkHttpClientSoon;//okHttpClient 瀹炰緥
 
-    private final static  String API_PACKAGE_NAME="com.youhuiquan.android";
+    private final static String API_PACKAGE_NAME = "com.youhuiquan.android";
 
     static {
         mOkHttpClient = new OkHttpClient.Builder()
@@ -121,6 +121,10 @@
         params.put("page", page);
         if (subId != null)
             params.put("subId", subId);
+        if (UserUtil.getUid(context) != null) {
+            params.put("uid", UserUtil.getUid(context) + "");
+        }
+
         commonPostWithFailture(context, BASE_URL2 + "hotsell/getList", params, handler);
     }
 
@@ -259,6 +263,10 @@
         if (!StringUtils.isEmpty(page))
             params.put("page", page);
         params.put("goodsType", goodsType);
+        if (UserUtil.getUid(context) != null) {
+            params.put("uid", UserUtil.getUid(context) + "");
+        }
+
         commonPostWithFailture(context, BASE_URL2 + "recommend/getGoodList", params, handler);
     }
 
@@ -371,7 +379,8 @@
     public static void sendCircle(Context context, Long uid, String id,
                                   BasicTextHttpResponseHandler handler) {
         LinkedHashMap<String, String> params = new LinkedHashMap<>();
-        params.put("uid", uid + "");
+        if (uid != null)
+            params.put("uid", uid + "");
         params.put("id", id + "");
         commonPostWithFailture(context, BASE_URL2 + "user/cloud/sendCircle", params, handler);
     }
@@ -391,7 +400,8 @@
         if (!LoginAndInviteStatusUtil.acessNext(context, uid, true))
             return;
         LinkedHashMap<String, String> params = new LinkedHashMap<>();
-        params.put("uid", uid + "");
+        if (uid != null)
+            params.put("uid", uid + "");
         params.put("type", type + "");
         params.put("id", id);
         if (goodsId != null)
@@ -412,11 +422,47 @@
      */
     public static void evaluateCopyComment(Context context, Long uid, String id, String cid, BasicTextHttpResponseHandler handler) {
         LinkedHashMap<String, String> params = new LinkedHashMap<>();
-        params.put("uid", uid + "");
+        if (uid != null)
+            params.put("uid", uid + "");
         params.put("cid", cid);
         params.put("id", id);
         commonPostWithFailture(context, BASE_URL2 + "dynamic/evaluateComment", params, handler);
     }
+
+
+    /**
+     * 澶嶅埗鎺ㄨ崘璇�
+     *
+     * @param context
+     * @param uid
+     * @param id
+     * @param handler
+     */
+    public static void evaluateCopyRecommend(Context context, Long uid, String id, BasicTextHttpResponseHandler handler) {
+        LinkedHashMap<String, String> params = new LinkedHashMap<>();
+        if (uid != null)
+            params.put("uid", uid + "");
+        params.put("id", id);
+        commonPostWithFailture(context, BASE_URL2 + "dynamic/evaluateCopyRecommend", params, handler);
+    }
+
+
+    /**
+     * 杞摼
+     *
+     * @param context
+     * @param uid
+     * @param link
+     * @param handler
+     */
+    public static void evaluateConvertLink(Context context, Long uid, String link, BasicTextHttpResponseHandler handler) {
+        LinkedHashMap<String, String> params = new LinkedHashMap<>();
+        if (uid != null)
+            params.put("uid", uid + "");
+        params.put("link", link);
+        commonPostWithFailture(context, BASE_URL2 + "dynamic/convertLink", params, handler);
+    }
+
 
     /**
      * 棣栭〉椤堕儴鍒嗙被鍒嗙被鏁版嵁
@@ -547,6 +593,9 @@
         params.put("startprice", startprice);
         params.put("endprice", endprice);
         params.put("totalSales", totalSales);
+        if (UserUtil.getUid(context) != null) {
+            params.put("uid", UserUtil.getUid(context) + "");
+        }
         commonPostWithFailture(context, BASE_URL2 + "class/getSubGoods", params, handler);
     }
 
@@ -560,6 +609,9 @@
         LinkedHashMap<String, String> params = new LinkedHashMap<String, String>();
         params.put("gcid", key);
         params.put("page", page);
+        if (UserUtil.getUid(context) != null) {
+            params.put("uid", UserUtil.getUid(context) + "");
+        }
         commonPostWithFailture(context, BASE_URL2 + "class/getClassGoods", params, handler);
     }
 
@@ -668,6 +720,11 @@
         if (type != null && !type.equals("") && !type.equals("null") && !type.equals("0")) {
             params.put("type", type);
         }
+
+        if (UserUtil.getUid(context) != null) {
+            params.put("uid", UserUtil.getUid(context) + "");
+        }
+
         commonPostWithFailture(context, BASE_URL2 + "commoncontent/getNavGoodsList", params, handler);
     }
 
@@ -683,8 +740,7 @@
         LinkedHashMap<String, String> params = new LinkedHashMap<String, String>();
         params.put("orderId", orderId);
         params.put("userInfo.id", uid + "");
-        params.put("type", type);
-        commonPostWithFailture(context, BASE_URL + "lostOrder/findLostOrder", params, handler);
+        commonPostWithFailture(context, BASE_URL2 + "lostOrder/findLostOrder", params, handler);
     }
 
     /**
@@ -828,7 +884,7 @@
         params.put("page", page);
         if (type != null)
             params.put("type", type);
-        commonPost(context, BASE_URL + "user/msg/getMsgList", params, handler);
+        commonPost(context, BASE_URL2 + "user/msg/getMsgList", params, handler);
     }
 
     /**
@@ -1340,6 +1396,12 @@
         params.put("slideVerify", slideVerify);
         params.put("phone", phone);
         commonPostWithFailture(context, BASE_URL + "sms/sendMSMLogin", params, handler);
+    }
+
+
+    public static void allowOneKeyLogin(Context context, BasicTextHttpResponseHandler handler) {
+        LinkedHashMap<String, String> params = new LinkedHashMap<>();
+        commonPostWithFailture(context, BASE_URL + "sms/allowOneKeyLogin", params, handler);
     }
 
     /**
@@ -2423,6 +2485,10 @@
         LinkedHashMap<String, String> params = new LinkedHashMap<String, String>();
         params.put("page", page + "");
         params.put("cid", cid);
+        if (UserUtil.getUid(context) != null) {
+            params.put("uid", UserUtil.getUid(context) + "");
+        }
+
         commonPostWithFailture(context, BASE_URL2 + "dynamic/getList", params, handler);
     }
 
@@ -2971,6 +3037,10 @@
         params.put("page", page);
         if (uid != null) params.put("uid", uid + "");
         params.put("goodsType", goodsType);
+        if (UserUtil.getUid(context) != null) {
+            params.put("uid", UserUtil.getUid(context) + "");
+        }
+
         commonPostWithFailture(context, BASE_URL2 + "shraeStorage/getlist", params, handler);
     }
 

--
Gitblit v1.8.0