京东到家.apk(点击下载) / ServiceProtocol.java


package jd.net;

import android.app.Activity;
import android.os.Build;
import android.text.TextUtils;
import androidx.exifinterface.media.ExifInterface;
import base.net.open.RequestEntity;
import com.google.gson.Gson;
import com.huawei.hms.framework.common.hianalytics.CrashHianalyticsData;
import com.huawei.hms.push.constant.RemoteMessageConst;
import com.igexin.push.core.b;
import com.jd.libs.hybrid.HybridSDK;
import com.jd.verify.Verify;
import com.jdpay.common.bury.contants.BuryContant;
import com.jingdong.Manto;
import com.jingdong.common.videoplayer.VideoPlayerConstants;
import com.jingdong.sdk.baseinfo.BaseInfo;
import com.tencent.mapsdk.internal.m2;
import com.tencent.open.SocialConstants;
import elder.ElderViewUtil;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import jd.GetStroreByConditionSend;
import jd.LoginHelper;
import jd.LoginUser;
import jd.MyInfoFeedback;
import jd.MyInfoHelper;
import jd.MyInfoShippingAddress;
import jd.app.JDApplication;
import jd.config.Constant;
import jd.couponaction.RequestCouponData;
import jd.loginsdk.LoginSdkHelper;
import jd.open.OpenRouter;
import jd.test.TEST;
import jd.utils.ArrayUtil;
import jd.utils.MD5Calculator;
import jd.utils.RSAHelper;
import jd.utils.SearchHelper;
import jd.utils.StatisticsReportUtil;
import jd.utils.TextUtil;
import jd.utils.UrlTools;
import jd.view.suitview.data.SuitParamsKey;
import jpbury.f;
import jpbury.r;
import logo.i;
import main.discover2.fragment.DiscoverTabFragment;
import main.homenew.nearby.data.HomeBackRequestParams;
import main.homenew.nearby.data.HomeFeedsSkuRequestInfo;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import shopcart.SettleTradeInData;
import shopcart.data.CartRequest;

public class ServiceProtocol extends BaseServiceProtocol {
    /* JADX WARNING: Removed duplicated region for block: B:17:0x005f A[Catch:{ Exception -> 0x009b }] */
    public static RequestEntity getHotWords_list(Activity activity, String str, List<String> list, String str2, String str3) {
        JSONObject jSONObject = new JSONObject();
        if (list != null) {
            try {
                if (!list.isEmpty() && !"homesearch".equals(list.get(0))) {
                    JSONArray jSONArray = new JSONArray();
                    for (String str4 : list) {
                        jSONArray.put(str4);
                    }
                    jSONObject.put("storeIds", jSONArray);
                    if (!TextUtils.isEmpty(str2)) {
                        jSONObject.put(RemoteMessageConst.Notification.CHANNEL_ID, str2);
                        if (MyInfoHelper.getMyInfoShippingAddress() != null) {
                            jSONObject.put("cityId", MyInfoHelper.getMyInfoShippingAddress().getCityId() + "");
                        }
                    }
                    jSONObject.put("type", 2);
                    jSONObject.put("pageSource", str3);
                    jSONObject.put("size", 12);
                    RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
                    requestEntity.putParam("functionId", "hotWords/list");
                    baseUrl(activity, str, requestEntity);
                    return requestEntity;
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        if (MyInfoHelper.getMyInfoShippingAddress() != null) {
            jSONObject.put(i.b.an, MyInfoHelper.getMyInfoShippingAddress().getLatitude());
            jSONObject.put(i.b.am, MyInfoHelper.getMyInfoShippingAddress().getLongitude());
        }
        if (!TextUtils.isEmpty(str2)) {
        }
        jSONObject.put("type", 2);
        jSONObject.put("pageSource", str3);
        jSONObject.put("size", 12);
        RequestEntity requestEntity2 = new RequestEntity(BASE_URL, jSONObject);
        requestEntity2.putParam("functionId", "hotWords/list");
        baseUrl(activity, str, requestEntity2);
        return requestEntity2;
    }

    public static RequestEntity getNextRequestEntity(Activity activity, RequestEntity requestEntity, int i) {
        JSONObject jSONObject = requestEntity.json;
        try {
            jSONObject.remove(r.f);
            jSONObject.put(r.f, i + "");
        } catch (Exception e) {
            e.printStackTrace();
        }
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getOrderComplete(Activity activity, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
            jSONObject.put(HybridSDK.APP_VERSION, Constant.ANDROID_VERSION);
            jSONObject.put("terminalType", 3);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.method = 0;
        requestEntity.putParam("functionId", "order/finish/recommendList20");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity paySign(Activity activity, String str, String str2, String str3, boolean z) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("tradeName", str);
            jSONObject.put("tradeDescription", str);
            jSONObject.put("merchantOrderNum", str2);
            jSONObject.put("merchantUserId", str3);
            jSONObject.put(i.b.p, StatisticsReportUtil.getImei());
            if (z) {
                jSONObject.put("paySuccessUrl", Constant.KEY_SUCCESS_GROUP);
            } else {
                jSONObject.put("paySuccessUrl", Constant.KEY_SUCCESS);
            }
            jSONObject.put("newSuccessUrl", true);
            jSONObject.put("os", "OS01");
            jSONObject.put(HybridSDK.OS_VERSION, Build.VERSION.RELEASE);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "webpay/new/pay/sign");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity paySuccessSign(Activity activity, String str, String str2) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("tradeNum", str);
            jSONObject.put("token", str2);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "webpay/new/pay/finishPost");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity RequestDoFollow(Activity activity, boolean z, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("isFollow", z);
            jSONObject.put(SearchHelper.SEARCH_STORE_ID, str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "store/doFollow");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getAddresspdj(Activity activity, boolean z, MyInfoShippingAddress myInfoShippingAddress) {
        JSONObject jSONObject;
        try {
            jSONObject = new JSONObject(new Gson().toJson(myInfoShippingAddress));
        } catch (Exception e) {
            e.printStackTrace();
            jSONObject = null;
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.method = 1;
        StringBuilder sb = new StringBuilder();
        sb.append("addresspdj/");
        sb.append(z ? "addAddress" : "updateAddress");
        requestEntity.putParam("functionId", sb.toString());
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getRecommendFeedback(Activity activity, String str, String str2, String str3, String str4) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("feedbackItemId", str);
            jSONObject.put("targetId", str2);
            jSONObject.put("targetBelong", str3);
            jSONObject.put("targetSecBelong", str4);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "recommend/feedback_collect");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getHomeFeedsMatchGoods(Activity activity, String str, String str2, String str3) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put(SearchHelper.SEARCH_STORE_ID, str);
            jSONObject.put("orgCode", str2);
            jSONObject.put("skuId", str3);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "zone/recommendSkuAfterPushInCart");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getLastUsedAddress(Activity activity) {
        JSONObject jSONObject = new JSONObject();
        try {
            if (LoginHelper.getInstance().getLoginUser() != null && !TextUtils.isEmpty(LoginHelper.getInstance().getLoginUser().pin)) {
                jSONObject.put("pin", LoginHelper.getInstance().getLoginUser().pin);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "addresspdj/getLastUsedAddress");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity updateLastUsedTime(Activity activity, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put(b.x, str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.method = 1;
        requestEntity.putParam("functionId", "addresspdj/updateLastUsedTime");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getCities(Activity activity) {
        RequestEntity requestEntity = new RequestEntity(BASE_URL, new JSONObject());
        requestEntity.putParam("functionId", "addresspdj/getCities");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity clearHotCity(Activity activity) {
        RequestEntity requestEntity = new RequestEntity(BASE_URL, new JSONObject());
        requestEntity.putParam("functionId", "addresspdj/clearHotCity");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getCitiesSort(Activity activity) {
        RequestEntity requestEntity = new RequestEntity(BASE_URL, new JSONObject());
        requestEntity.putParam("functionId", "addresspdj/getCitiesSortV870");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getHotCities(Activity activity) {
        RequestEntity requestEntity = new RequestEntity(BASE_URL, new JSONObject());
        requestEntity.putParam("functionId", "addresspdj/getHotCities");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity delAddress(Activity activity, int i) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put(b.x, i);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "addresspdj/delAddress");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getAddressList(Activity activity) {
        RequestEntity requestEntity = new RequestEntity(BASE_URL, new JSONObject());
        requestEntity.putParam("functionId", "addresspdj/getAddressList");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getAddressList(Activity activity, String str, int i, int i2, String str2, SettleTradeInData settleTradeInData) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put(SearchHelper.SEARCH_STORE_ID, str);
            jSONObject.put("needCheckDelivery", i);
            jSONObject.put("opType", str2);
            jSONObject.put(SocialConstants.PARAM_SOURCE, i2);
            if (settleTradeInData != null) {
                jSONObject.put("recycleToken", settleTradeInData.getRecycleToken());
                jSONObject.put("inquirykey", settleTradeInData.getInquirykey());
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "addresspdj/getAddressList");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getStroreIdInCoordinatorAndType(Activity activity, String str, String str2, String str3) {
        GetStroreByConditionSend getStroreByConditionSend = new GetStroreByConditionSend();
        getStroreByConditionSend.setCoordType("2");
        if (MyInfoHelper.getMyInfoShippingAddress() != null) {
            if (MyInfoHelper.getMyInfoShippingAddress().getPoi() != null) {
                getStroreByConditionSend.setAddress(MyInfoHelper.getMyInfoShippingAddress().getPoi());
            }
            if (0.0d != MyInfoHelper.getMyInfoShippingAddress().getLatitude()) {
                getStroreByConditionSend.setLatitude(MyInfoHelper.getMyInfoShippingAddress().getLatitude());
            }
            if (0.0d != MyInfoHelper.getMyInfoShippingAddress().getLongitude()) {
                getStroreByConditionSend.setLongitude(MyInfoHelper.getMyInfoShippingAddress().getLongitude());
            }
            if (MyInfoHelper.getMyInfoShippingAddress().getCityId() != 0) {
                getStroreByConditionSend.setAreaCode(MyInfoHelper.getMyInfoShippingAddress().getCityId());
            }
        }
        if (!TextUtils.isEmpty(str2)) {
            getStroreByConditionSend.setLimitId(str2);
        }
        if (!TextUtils.isEmpty(str3)) {
            getStroreByConditionSend.setJumpType(str3);
        }
        ArrayList arrayList = new ArrayList();
        String[] split = str.split(",");
        if (split != null && split.length > 0) {
            for (String str4 : split) {
                arrayList.add(str4);
            }
        }
        getStroreByConditionSend.setOpenJPIndustryName(arrayList);
        JSONObject jSONObject = null;
        try {
            jSONObject = new JSONObject(new Gson().toJson(getStroreByConditionSend));
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "address/getStroreIdInCoordinatorAndTypePost");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getCouponStationList(Activity activity, String str, String str2, String str3, String str4) {
        JSONObject jSONObject;
        Exception e;
        GetStroreByConditionSend getStroreByConditionSend = new GetStroreByConditionSend();
        getStroreByConditionSend.setCoordType("2");
        if (MyInfoHelper.getMyInfoShippingAddress() != null) {
            if (MyInfoHelper.getMyInfoShippingAddress().getPoi() != null) {
                getStroreByConditionSend.setAddress(MyInfoHelper.getMyInfoShippingAddress().getPoi());
            }
            if (0.0d != MyInfoHelper.getMyInfoShippingAddress().getLatitude()) {
                getStroreByConditionSend.setLatitude(MyInfoHelper.getMyInfoShippingAddress().getLatitude());
            }
            if (0.0d != MyInfoHelper.getMyInfoShippingAddress().getLongitude()) {
                getStroreByConditionSend.setLongitude(MyInfoHelper.getMyInfoShippingAddress().getLongitude());
            }
            if (MyInfoHelper.getMyInfoShippingAddress().getCityId() != 0) {
                getStroreByConditionSend.setAreaCode(MyInfoHelper.getMyInfoShippingAddress().getCityId());
            }
        }
        if (!TextUtils.isEmpty(str2)) {
            getStroreByConditionSend.setLimitId(str2);
        }
        if (!TextUtils.isEmpty(str3)) {
            getStroreByConditionSend.setJumpType(str3);
        }
        ArrayList arrayList = new ArrayList();
        String[] split = str.split(",");
        if (split != null && split.length > 0) {
            for (String str5 : split) {
                arrayList.add(str5);
            }
        }
        getStroreByConditionSend.setOpenJPIndustryName(arrayList);
        try {
            jSONObject = new JSONObject(new Gson().toJson(getStroreByConditionSend));
            try {
                if (!TextUtils.isEmpty(str4)) {
                    jSONObject.put("couponPattern", str4);
                }
            } catch (Exception e2) {
                e = e2;
                e.printStackTrace();
                RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
                requestEntity.putParam("functionId", "coupon/getStationList");
                baseUrl(activity, requestEntity);
                return requestEntity;
            }
        } catch (Exception e3) {
            e = e3;
            jSONObject = null;
            e.printStackTrace();
            RequestEntity requestEntity2 = new RequestEntity(BASE_URL, jSONObject);
            requestEntity2.putParam("functionId", "coupon/getStationList");
            baseUrl(activity, requestEntity2);
            return requestEntity2;
        }
        RequestEntity requestEntity22 = new RequestEntity(BASE_URL, jSONObject);
        requestEntity22.putParam("functionId", "coupon/getStationList");
        baseUrl(activity, requestEntity22);
        return requestEntity22;
    }

    public static RequestEntity getStoreComments(Activity activity, String str, int i, String str2, int i2, int i3, int i4) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put(SearchHelper.SEARCH_STORE_ID, str);
            if (i > 0) {
                jSONObject.put("type", i);
            }
            if (!TextUtils.isEmpty(str2)) {
                jSONObject.put("tagKey", str2);
            }
            jSONObject.put(r.f, i4);
            jSONObject.put("pageSize", i3);
            jSONObject.put("qual", i2);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "comment/queryDetail");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getOrderNoEvaluationList(Activity activity, int i) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("startIndex", i);
            jSONObject.put("dataSize", 10);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/getCommentList");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getOrderVPlusTip(Activity activity, int i) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("jumpSource", i);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/orderListTopHint");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getEvaluationDataNew(Activity activity, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("startIndex", 0);
            jSONObject.put("dataSize", 10);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.isHandleLogin = false;
        requestEntity.putParam("functionId", "order/isExistsComment");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity CloseNoCommentList(Activity activity) {
        RequestEntity requestEntity = new RequestEntity(BASE_URL, new JSONObject());
        requestEntity.isHandleLogin = false;
        requestEntity.putParam("functionId", "order/closeComment");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity sendFeedBack(Activity activity, MyInfoFeedback myInfoFeedback) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("contact", myInfoFeedback.getContact());
            jSONObject.put("content", myInfoFeedback.getContent());
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "user/addfeedback");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getUpdateResponse() {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("code", "pdj");
            jSONObject.put("platform", "ANDROID");
            jSONObject.put("version", ExifInterface.GPS_MEASUREMENT_INTERRUPTED + StatisticsReportUtil.getVersionName());
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "version/checkVersion");
        baseUrl(null, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getAddressPosition(Activity activity, String str, String str2) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("city", str);
            jSONObject.put(OpenRouter.NOTIFICATION_TYPE_ADDRESS, str2);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "local/getLL");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getPoiListByCoordinateNew(Activity activity, String str, String str2) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put(i.b.am, str);
            jSONObject.put(i.b.an, str2);
            jSONObject.put("coord_type", "5");
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "local/getAddressN");
        baseUrl(null, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getRecommendPoiList(Activity activity, String str, String str2) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put(i.b.am, str);
            jSONObject.put(i.b.an, str2);
            jSONObject.put("coord_type", "5");
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "local/getAddressList");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getPoiListNew(Activity activity, String str, String str2, String str3) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("key", str);
            jSONObject.put("region", str2);
            jSONObject.put("areaCode", str3);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "address/searchPost");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity cancelOrder(Activity activity, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/orderCancel");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity cancelOrderLayer(Activity activity, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/cancel/page");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity jdLogin(Activity activity) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("srct", "a2");
            jSONObject.put("jdPin", LoginSdkHelper.getPin());
            jSONObject.putOpt("tgt", LoginSdkHelper.getA2());
            if (MyInfoHelper.getMyInfoShippingAddress() != null && MyInfoHelper.getMyInfoShippingAddress().getLongitude() > 0.0d && MyInfoHelper.getMyInfoShippingAddress().getLatitude() > 0.0d) {
                jSONObject.put(i.b.am, MyInfoHelper.getMyInfoShippingAddress().getLongitude() + "");
                jSONObject.put(i.b.an, MyInfoHelper.getMyInfoShippingAddress().getLatitude() + "");
            }
            StatisticsReportUtil.initDeviceInfoStrSimplify(jSONObject);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "login/jdwlogin2");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getRedDot(Activity activity) {
        RequestEntity requestEntity = new RequestEntity(BASE_URL, new JSONObject());
        requestEntity.method = 0;
        requestEntity.putParam("functionId", "user/redDot");
        baseUrl(null, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getUpdateNewRedPacketParam(Activity activity) {
        RequestEntity requestEntity = new RequestEntity(BASE_URL, new JSONObject());
        requestEntity.method = 0;
        requestEntity.putParam("functionId", "mine/updateRedPacketRead");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getUpdateNewCouponParam(Activity activity) {
        RequestEntity requestEntity = new RequestEntity(BASE_URL, new JSONObject());
        requestEntity.method = 0;
        requestEntity.putParam("functionId", "user/updatecouponread");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getUpdateCouponBubbleParam(Activity activity) {
        RequestEntity requestEntity = new RequestEntity(BASE_URL, new JSONObject());
        requestEntity.method = 0;
        requestEntity.putParam("functionId", "user/updateExpiringCoupon");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getHelpCenterH5URL(Activity activity, int i) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("type", i);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.method = 1;
        requestEntity.putParam("functionId", "gw/getH5URL");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getPayCenterH5URL(Activity activity, int i) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("type", i);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.method = 0;
        requestEntity.putParam("functionId", "gw/getPayH5URL");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getSaveDjAddress(Activity activity, MyInfoShippingAddress myInfoShippingAddress) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put(b.x, myInfoShippingAddress.getId());
            if (LoginHelper.getInstance().getLoginUser() != null) {
                jSONObject.put("pin", LoginHelper.getInstance().getLoginUser().jdPin);
            }
            jSONObject.put("poi", myInfoShippingAddress.getPoi());
            jSONObject.put(i.b.am, myInfoShippingAddress.getLongitude());
            jSONObject.put(i.b.an, myInfoShippingAddress.getLatitude());
            jSONObject.put("coordType", 2);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.method = 1;
        requestEntity.putParam("functionId", "addresspdj/exportAddress");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getPhonhNum(Activity activity) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("pdjPin", LoginHelper.getInstance().getLoginUser().pin);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.method = 1;
        requestEntity.putParam("functionId", "bind/obtainmobile2");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity sendMesOldNum(Activity activity) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("jdPin", LoginHelper.getInstance().getLoginUser().jdPin);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.method = 1;
        requestEntity.putParam("functionId", "bind/sendtooldmobile");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity verifyOldNumYanZhengMa(Activity activity, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("jdPin", LoginHelper.getInstance().getLoginUser().jdPin);
            jSONObject.put("checkNum", str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.method = 1;
        requestEntity.putParam("functionId", "verify/oldmobile");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity sendMsgNewNum(Activity activity, String str, String str2) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("jdPin", LoginHelper.getInstance().getLoginUser().jdPin);
            jSONObject.put(BaseInfo.NETWORK_TYPE_MOBILE, str);
            jSONObject.put("rkey", str2);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.method = 1;
        requestEntity.putParam("functionId", "bind/sendtonewmobile");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity verifyNewNumYanZhengMa(Activity activity, String str, String str2, String str3) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("jdPin", LoginHelper.getInstance().getLoginUser().jdPin);
            jSONObject.put("msgNum", str);
            jSONObject.put("rkey", str2);
            jSONObject.put(BaseInfo.NETWORK_TYPE_MOBILE, str3);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.method = 1;
        requestEntity.putParam("functionId", "verify/newmobile");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity verifyChangeBindingYanZhengMa(Activity activity, String str, String str2, String str3) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("jdPin", LoginHelper.getInstance().getLoginUser().jdPin);
            jSONObject.put("msgNum", str);
            jSONObject.put("rkey", str2);
            jSONObject.put(BaseInfo.NETWORK_TYPE_MOBILE, str3);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.method = 1;
        requestEntity.putParam("functionId", "verify/updatemobile");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity verifyPassword(Activity activity, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("jdPin", LoginHelper.getInstance().getLoginUser().jdPin);
            jSONObject.put("password", str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.method = 1;
        requestEntity.putParam("functionId", "verify/password");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getCmsTypeAll(Activity activity, String str, String str2) {
        JSONObject jSONObject = new JSONObject();
        MyInfoShippingAddress myInfoShippingAddress = MyInfoHelper.myInfoShippingAddress;
        String str3 = "";
        if (myInfoShippingAddress != null) {
            str3 = myInfoShippingAddress.getCityName();
        }
        try {
            if (TextUtils.isEmpty(str3)) {
                str3 = "";
            }
            jSONObject.put("city", str3);
            addAddress(jSONObject, false);
            jSONObject.put("coordType", "2");
            if (!TextUtil.isEmpty(str2)) {
                jSONObject.put("clipboardCommand", str2);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "zone/getCmsTypeAll");
        baseUrl(activity, str, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getSeckillFloor(Activity activity, String str, String str2) {
        JSONObject jSONObject = new JSONObject();
        MyInfoShippingAddress myInfoShippingAddress = MyInfoHelper.myInfoShippingAddress;
        String str3 = "";
        if (myInfoShippingAddress != null) {
            str3 = myInfoShippingAddress.getCityName();
        }
        try {
            if (!TextUtils.isEmpty(str)) {
                jSONObject.put(RemoteMessageConst.Notification.CHANNEL_ID, str);
            }
            if (!TextUtils.isEmpty(str2)) {
                jSONObject.put("floorId", str2);
            }
            if (TextUtils.isEmpty(str3)) {
                str3 = "";
            }
            jSONObject.put("city", str3);
            addAddress(jSONObject);
            jSONObject.put("coordType", "2");
            jSONObject.put("appVersion", StatisticsReportUtil.getSimpleVersionName());
            jSONObject.put("platform", "2");
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "zone/syncSeckillFloor");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getConfig() {
        String str = "";
        if (_T) {
            str = "/test";
        }
        RequestEntity requestEntity = new RequestEntity("https://storage.jd.com/dj-app-config/" + JDApplication.getInstance().getBaseContext().getPackageName() + "/android/" + StatisticsReportUtil.getSimpleVersionName() + str + "/config.txt", null);
        requestEntity.putParam("functionId", "appcConfig");
        return requestEntity;
    }

    public static RequestEntity getGroupBuyGoods(Activity activity, String str, String str2) {
        JSONObject jSONObject = new JSONObject();
        try {
            addAddress(jSONObject);
            jSONObject.put(SearchHelper.SEARCH_STORE_ID, str);
            jSONObject.put("pn", str2);
            jSONObject.put("ps", "10");
            jSONObject.put("cartUuid", StatisticsReportUtil.getUUIDMD5());
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "orderdiscount/getFloatLayerPromotion");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity sendMsgNewNumUpdate(Activity activity, String str, String str2) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("jdPin", LoginHelper.getInstance().getLoginUser().jdPin);
            jSONObject.put(BaseInfo.NETWORK_TYPE_MOBILE, str);
            jSONObject.put("rkey", str2);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.method = 1;
        requestEntity.putParam("functionId", "bind/sendtoupdatenewmobile");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getWXShareData(Activity activity) {
        RequestEntity requestEntity = new RequestEntity(BASE_URL, new JSONObject());
        requestEntity.method = 0;
        requestEntity.putParam("functionId", "share/app");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getOrderList875(Activity activity, int i, int i2) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("startIndex", i);
            jSONObject.put("dataSize", 10);
            jSONObject.put("jumpSource", i2);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/listV2.0");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity orderListRecommend(Activity activity, int i, int i2) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("currentPage", i);
            jSONObject.put("count", i2);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/orderList/recommend");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getOrderDetailNew(Activity activity, String str) {
        String[] split;
        if (!TextUtils.isEmpty(str) && (split = str.split("______")) != null && split.length == 2) {
            return getOrderDetailEncode(activity, split[0]);
        }
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/infoNew");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    private static RequestEntity getOrderDetailEncode(Activity activity, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/infoPwd");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity feeInDetail(Activity activity, String str, String str2, String str3, String str4) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
            jSONObject.put("fee", str2);
            jSONObject.put("paySource", str3);
            jSONObject.put("successUrl", str4);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/feeInDetail");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getOrderStatus(Activity activity, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/state");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getStateMap(Activity activity, String str, double d, double d2, int i, String str2) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
            jSONObject.put("deliveryManlng", d2);
            jSONObject.put("deliveryManlat", d);
            jSONObject.put("stateId", i);
            jSONObject.put("mapSize", str2);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/stateMapNew");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity CheckOrderCommentStatus(Activity activity, String str, String str2, String str3) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
            jSONObject.put("shopId", str2);
            jSONObject.put("pin", str3);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/checkOrderCommentStatus");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity cancelOrder(Activity activity, String str, String str2, String str3) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
            jSONObject.put("cancelReason", str2);
            if (!TextUtils.isEmpty(str3)) {
                jSONObject.put("reasonText", str3);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/orderCancel");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity deleteOrder(Activity activity, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/orderDelete");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity checkBeforeToStoreDetail(Activity activity, double d, double d2, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("cityId", 0);
            jSONObject.put(f.f, StatisticsReportUtil.getUUIDMD5());
            jSONObject.put(i.b.am, d);
            jSONObject.put(i.b.an, d2);
            jSONObject.put(SearchHelper.SEARCH_STORE_ID, str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "check/checkBeforeToStoreDetail");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity checkBeforeToProductDetail(Activity activity, double d, double d2, String str, String str2) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put(i.b.am, d);
            jSONObject.put(i.b.an, d2);
            jSONObject.put(SearchHelper.SEARCH_STORE_ID, str);
            jSONObject.put(VideoPlayerConstants.ACTIVITY_INTENT_PARAMS_SKU, str2);
            jSONObject.put("cityId", 0);
            jSONObject.put(f.f, StatisticsReportUtil.getUUIDMD5());
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "check/checkBeforeToProductDetail");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity CheckSingleProduct(Activity activity, String str, String str2) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
            jSONObject.put("cartUuid", str2);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "rePurchase/singleProductNew");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity checkcontainstoreId(Activity activity, String str, Double d, Double d2) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put(SearchHelper.SEARCH_STORE_ID, str);
            jSONObject.put("coordType", 2);
            jSONObject.put(i.b.am, d);
            jSONObject.put(i.b.an, d2);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "addresspdj/containsStoreId");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getRedPackActivityInfo(Activity activity, String str, String str2) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderNo", str);
            jSONObject.put("reqPage", str2);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "activity/getRedPackActivityInfo");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getDevFlashResponse(Activity activity, int i) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("cityId", "" + i);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.isHandleLogin = false;
        requestEntity.putParam("functionId", "lauch/lauchConfig");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity newPaySign(Activity activity, String str, String str2, String str3, String str4, boolean z, String str5, String str6, Integer num) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
            jSONObject.put("tradeName", str2);
            jSONObject.put("merchantOrderNum", str3);
            jSONObject.put(i.b.p, StatisticsReportUtil.getImei());
            jSONObject.put("os", "OS01");
            jSONObject.put("paySource", str4);
            jSONObject.put("fromPage", str5);
            if (LoginHelper.getInstance() == null || LoginHelper.getInstance().getLoginUser() == null) {
                jSONObject.put(Manto.Config.GATEWAY_LOGIN_TYPE, LoginUser.LOGIN_TYPE_BY_JD);
            } else {
                jSONObject.put(Manto.Config.GATEWAY_LOGIN_TYPE, LoginHelper.getInstance().getLoginUser().loginType);
            }
            jSONObject.put("successUrl", str6);
            jSONObject.put("appId", "1");
            jSONObject.put(SocialConstants.PARAM_SOURCE, "2");
            jSONObject.put("deviceType", "DT02");
            jSONObject.put(HybridSDK.OS_VERSION, Build.VERSION.RELEASE);
            jSONObject.put("payStageType", num);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "tx/core/unifiedOrder");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getStoreActivityInfo(Activity activity, String str, int i, String str2, int i2, String str3) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("activityId", i);
            jSONObject.put("currentPage", i2);
            if (!TextUtils.isEmpty(str3)) {
                jSONObject.put("downgradeInfo", str3);
            }
            if (!TextUtils.isEmpty(str)) {
                jSONObject.put(SuitParamsKey.KEY_STORE_ID, str);
            } else if (MyInfoHelper.getMyInfoShippingAddress() != null) {
                jSONObject.put(i.b.am, MyInfoHelper.getMyInfoShippingAddress().getLongitude() + "");
                jSONObject.put(i.b.an, MyInfoHelper.getMyInfoShippingAddress().getLatitude() + "");
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "act/storeActPagePost");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity grabCoupon(Activity activity, RequestCouponData requestCouponData) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("grabPlat", "2");
            jSONObject.put("platCode", "android");
            jSONObject.put("fromSource", "1");
            jSONObject.put(f.f, StatisticsReportUtil.getUUIDMD5());
            jSONObject.put("code", requestCouponData.getCode());
            jSONObject.put("isFans", requestCouponData.getIsFans());
            jSONObject.put("isFloor", requestCouponData.getIsFloor());
            jSONObject.put("platNewActivityFlag", requestCouponData.getPlatNewActivityFlag());
            jSONObject.put("needCouponGo", true);
            if (requestCouponData.getOperType() > 0) {
                jSONObject.put("operType", requestCouponData.getOperType());
            }
            if (!TextUtils.isEmpty(requestCouponData.getStoreNo())) {
                jSONObject.put("storeNo", requestCouponData.getStoreNo());
            }
            if (!TextUtils.isEmpty(requestCouponData.getChannel())) {
                jSONObject.put("channel", requestCouponData.getChannel());
            }
            if (!TextUtils.isEmpty(requestCouponData.getOrgCode())) {
                jSONObject.put("orgCode", requestCouponData.getOrgCode());
            }
            if (!TextUtils.isEmpty(requestCouponData.getSource())) {
                jSONObject.put(SocialConstants.PARAM_SOURCE, requestCouponData.getSource());
            }
            if (!TextUtils.isEmpty(requestCouponData.getEid())) {
                jSONObject.put("eid", requestCouponData.getEid());
            }
            if (!TextUtils.isEmpty(requestCouponData.getSdkToken())) {
                jSONObject.put("sdkToken", requestCouponData.getSdkToken());
            }
            if (requestCouponData.getCouponPattern() > 0) {
                jSONObject.put("couponPattern", requestCouponData.getCouponPattern());
            }
            MyInfoShippingAddress myInfoShippingAddress = MyInfoHelper.getMyInfoShippingAddress();
            if (myInfoShippingAddress != null) {
                jSONObject.put("city_id", myInfoShippingAddress.getCityId() + "");
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "coupon/grabCoupon");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getCouponToUseParams(Activity activity, RequestCouponData requestCouponData) {
        List<String> list;
        JSONObject jSONObject = new JSONObject();
        if (requestCouponData != null) {
            try {
                if (requestCouponData.getCouponData() != null) {
                    long j = 0;
                    try {
                        j = Long.parseLong(requestCouponData.getCouponData().getCouponId());
                    } catch (NumberFormatException e) {
                        e.printStackTrace();
                    } catch (NullPointerException e2) {
                        e2.printStackTrace();
                    }
                    jSONObject.put("couponId", j);
                    jSONObject.put("stationNo", requestCouponData.getStoreNo());
                    jSONObject.put("couponGoSource", requestCouponData.getCouponGoSource());
                    if (requestCouponData.getCouponPattern() > 0) {
                        jSONObject.put("couponPattern", requestCouponData.getCouponPattern());
                    }
                    Map<String, String> hashMap = new HashMap<>();
                    if (requestCouponData.getPassThroughParam() != null) {
                        hashMap = requestCouponData.getPassThroughParam();
                    } else if (requestCouponData != null) {
                        if (requestCouponData.getSkuIds() != null) {
                            list = requestCouponData.getSkuIds();
                        } else {
                            list = new ArrayList<>();
                            if (!TextUtils.isEmpty(requestCouponData.getSkuId())) {
                                list.add(requestCouponData.getSkuId());
                            }
                        }
                        if (list != null) {
                            hashMap.put("skuIds", new JSONArray((Collection) list).toString());
                        }
                        hashMap.put("orgCode", requestCouponData.getOrgCode());
                        hashMap.put(SearchHelper.SEARCH_STORE_ID, requestCouponData.getStoreNo());
                        hashMap.put("markState", String.valueOf(requestCouponData.getMarkState()));
                        if (requestCouponData.getCouponData() != null && !TextUtils.isEmpty(requestCouponData.getCouponData().getActivityCode())) {
                            hashMap.put("code", requestCouponData.getCouponData().getActivityCode());
                        } else if (!TextUtils.isEmpty(requestCouponData.getCode())) {
                            hashMap.put("code", requestCouponData.getCode());
                        }
                        hashMap.put("refPageSource", JDApplication.pageSource);
                    }
                    if (!TextUtil.isEmpty(requestCouponData.getPromotionSource())) {
                        hashMap.put("promotionSource", requestCouponData.getPromotionSource());
                    }
                    jSONObject.put("passThroughParam", new JSONObject(hashMap));
                }
            } catch (Exception e3) {
                e3.printStackTrace();
            }
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "coupon/singleCouponTready");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity bandcheck(Activity activity, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("brandId", str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "pavilionWeb/member/layerInfo");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity bandCoupon(Activity activity, String str, String str2) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("couponId", str);
            if (!TextUtils.isEmpty(str2)) {
                jSONObject.put("brandId", str2);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "pavilionWeb/member/grapCoupon");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity joinAndGetCoupon(Activity activity, RequestCouponData requestCouponData) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put(i.b.am, MyInfoHelper.getMyInfoShippingAddress().getLongitude());
            jSONObject.put(i.b.an, MyInfoHelper.getMyInfoShippingAddress().getLatitude());
            if (requestCouponData != null) {
                jSONObject.put("couponCode", requestCouponData.getCode());
                jSONObject.put("storeNo", requestCouponData.getStoreNo());
                jSONObject.put("needCouponGo", true);
                jSONObject.put("channel", requestCouponData.getChannel());
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "user/vip/free/join");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getCoupon4(Activity activity, String str, String str2, String str3, String str4, String str5, String str6) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("code", str);
            jSONObject.put("fromSource", "1");
            jSONObject.put("isFloor", "0");
            jSONObject.put(f.f, StatisticsReportUtil.getUUIDMD5());
            if (!TextUtils.isEmpty(str2)) {
                jSONObject.put("storeNo", str2);
            }
            jSONObject.put("needCouponGo", true);
            if ("1".equals(str3)) {
                jSONObject.put("isFans", "1");
            } else {
                jSONObject.put("isFans", "0");
            }
            if ("2".equals(str4)) {
                jSONObject.put("operType", "2");
            } else {
                jSONObject.put("operType", "1");
            }
            if (!TextUtils.isEmpty(str5)) {
                jSONObject.put("orgCode", str5);
            }
            if (!TextUtils.isEmpty(str6)) {
                jSONObject.put(SocialConstants.PARAM_SOURCE, str6);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "grab/grabCoupon");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity grabNewCoupon(Activity activity, String str, String str2, String str3, String str4, String str5, String str6, String str7) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("code", str);
            jSONObject.put("fromSource", "1");
            jSONObject.put("isFloor", "0");
            if (!TextUtils.isEmpty(str2)) {
                jSONObject.put("storeNo", str2);
            }
            jSONObject.put("needCouponGo", false);
            if ("1".equals(str3)) {
                jSONObject.put("isFans", "1");
            } else {
                jSONObject.put("isFans", "0");
            }
            if ("2".equals(str4)) {
                jSONObject.put("operType", "2");
            } else {
                jSONObject.put("operType", "1");
            }
            if (!TextUtils.isEmpty(str5)) {
                jSONObject.put("platNewActivityFlag", str5);
            }
            if (!TextUtils.isEmpty(str6)) {
                jSONObject.put("orgCode", str6);
            }
            if (!TextUtils.isEmpty(str7)) {
                jSONObject.put(SocialConstants.PARAM_SOURCE, str7);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "grab/grabCoupon");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getCouponGo(Activity activity, String str, String str2, String str3, Map<String, String> map) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("activityCode", str);
            jSONObject.put("couponGoSource", "4");
            jSONObject.put("passThroughParam", new JSONObject(map));
            if (!TextUtils.isEmpty(str2)) {
                jSONObject.put("couponPattern", str2);
            }
            if (!TextUtils.isEmpty(str3)) {
                JSONObject jSONObject2 = new JSONObject();
                jSONObject2.put("orgId", str3);
                jSONObject.put("ext", jSONObject2.toString());
            }
            if (MyInfoHelper.getMyInfoShippingAddress() != null) {
                jSONObject.put(i.b.am, MyInfoHelper.getMyInfoShippingAddress().getLongitude());
                jSONObject.put(i.b.an, MyInfoHelper.getMyInfoShippingAddress().getLatitude());
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "coupon/activityCouponTreaty");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getFixedResource(Activity activity, double d, double d2) {
        JSONObject jSONObject = new JSONObject();
        try {
            if (MyInfoHelper.getMyInfoShippingAddress() != null && MyInfoHelper.getMyInfoShippingAddress().getCityId() > 0) {
                jSONObject.put("cityId", MyInfoHelper.getMyInfoShippingAddress().getCityId());
            }
            jSONObject.put("channelType", 7);
            jSONObject.put("platform", 2);
            jSONObject.put("version", StatisticsReportUtil.getSimpleVersionName());
            jSONObject.put("longtitude", d);
            jSONObject.put(i.b.an, d2);
            jSONObject.put("cartUuid", StatisticsReportUtil.getUUIDMD5());
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "cartV3_3_0/getFixedResource");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getmineEncodePin(Activity activity) {
        RequestEntity requestEntity = new RequestEntity(BASE_URL, new JSONObject());
        requestEntity.putParam("functionId", "mine/encodePin");
        baseUrl(null, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getMyWallet(Activity activity) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("fromSource", 1);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "mine/getWalletInfo");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getMyMoudle(Activity activity) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("channelType", 8);
            jSONObject.put("fromSource", 1);
            jSONObject.put("platform", 2);
            jSONObject.put("version", StatisticsReportUtil.getSimpleVersionName());
            if (MyInfoHelper.getMyInfoShippingAddress() != null) {
                jSONObject.put("cityId", MyInfoHelper.getMyInfoShippingAddress().getCityId());
                jSONObject.put("longtitude", MyInfoHelper.getMyInfoShippingAddress().getLongitude());
                jSONObject.put(i.b.an, MyInfoHelper.getMyInfoShippingAddress().getLatitude());
            } else {
                jSONObject.put("cityId", -1);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "mine/getModuleInfo");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getMyInfo(Activity activity) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("fromSource", 1);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "mine/getUserAccountInfo");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getMsgCenterNotice(Activity activity) {
        String str = LoginHelper.getInstance().getLoginUser() != null ? LoginHelper.getInstance().getLoginUser().pin : null;
        if (str == null) {
            return null;
        }
        JSONObject jSONObject = new JSONObject();
        try {
            if (MyInfoHelper.getMyInfoShippingAddress() != null && MyInfoHelper.getMyInfoShippingAddress().getCityId() > 0) {
                jSONObject.put("cityId", MyInfoHelper.getMyInfoShippingAddress().getCityId());
            }
            jSONObject.put("platform", 1);
            jSONObject.put("pin", str);
            RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
            if (ElderViewUtil.isElderModeEnable()) {
                requestEntity.putParam("functionId", "msgcenter/elder/findRedPointByPin");
            } else {
                requestEntity.putParam("functionId", "msgcenter/findRedPointByPin");
            }
            requestEntity.method = 0;
            baseUrl(activity, requestEntity);
            return requestEntity;
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }

    public static RequestEntity getUpdateMsgCenterNotice(Activity activity, long j, int i) {
        JSONObject jSONObject = new JSONObject();
        try {
            if (MyInfoHelper.getMyInfoShippingAddress().getCityId() > 0) {
                jSONObject.put("cityId", MyInfoHelper.getMyInfoShippingAddress().getCityId());
            }
            jSONObject.put("platform", 1);
            jSONObject.put(RemoteMessageConst.MSGID, j);
            jSONObject.put("msgType", i);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "msgcenter/updateReadPointStatus");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static String sign(byte[] bArr) {
        return MD5Calculator.calculateMD5(mergeByteArray(bArr, "923047ae3f8d11d8b19aeb9f3d1bc002".getBytes()));
    }

    public static byte[] mergeByteArray(byte[] bArr, byte[] bArr2) {
        if (bArr == null) {
            return bArr2;
        }
        if (bArr2 == null) {
            return bArr;
        }
        byte[] bArr3 = new byte[(bArr.length + bArr2.length)];
        System.arraycopy(bArr, 0, bArr3, 0, bArr.length);
        System.arraycopy(bArr2, 0, bArr3, bArr.length, bArr2.length);
        return bArr3;
    }

    public static RequestEntity LoginOut(Activity activity) {
        RequestEntity requestEntity = new RequestEntity(BASE_URL, new JSONObject());
        requestEntity.putParam("functionId", "login/cleanSession");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getLoginTicket(Activity activity, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            if (TextUtils.isEmpty(str)) {
                str = "";
            }
            jSONObject.put("url", str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "login/ticket");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity updateAfsImg(Activity activity, String str) {
        RequestEntity requestEntity = new RequestEntity(BASE_URL, new JSONObject());
        requestEntity.putParam("functionId", "afs/updateAfsImg");
        requestEntity.putParam("afsImg", str);
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity uploadImage(Activity activity, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            if (TextUtils.isEmpty(str)) {
                str = "android";
            }
            jSONObject.put("pageSource", str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(getBaseUploadUrl(), jSONObject);
        requestEntity.putParam("functionId", "order/common/uploadImage");
        requestEntity.method = 1;
        requestEntity.urlIgnore = true;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getRedPackageFromHome(Activity activity, String str, String str2) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("userChannel", "app");
            if (!TextUtil.isEmpty(str2)) {
                jSONObject.put("clipboardCommand", str2);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "lauch/aggregation");
        requestEntity.method = 0;
        baseUrl(activity, str, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getHomeSecretToken(Activity activity, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("userChannel", "app");
            if (!TextUtils.isEmpty(str)) {
                jSONObject.put("secretKey", str);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "lauch/secretShow");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getNewFeedTabList(Activity activity, String str) {
        RequestEntity requestEntity = new RequestEntity(BASE_URL, new JSONObject());
        requestEntity.putParam("functionId", "newFeed/tabList");
        requestEntity.method = 0;
        baseUrl(activity, str, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getRefundStatus(Activity activity, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/refundInfo");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getQRCode(Activity activity, boolean z) {
        JSONObject jSONObject = new JSONObject();
        if (z) {
            try {
                jSONObject.put(i.b.am, MyInfoHelper.getMyInfoShippingAddress().getLongitude());
                jSONObject.put(i.b.an, MyInfoHelper.getMyInfoShippingAddress().getLatitude());
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "login/queryQrAndBarCode");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        if (TEST._T1) {
            requestEntity.putParam("appVersion", "4.1.0");
        }
        return requestEntity;
    }

    public static RequestEntity getVerityUrl(Activity activity, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("application", "o2o_client_app");
            jSONObject.put("dictType", "URL");
            jSONObject.put(m2.i, str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "url/verifyPost");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity uploadTencentLocation(Activity activity, String str, String str2, String str3, String str4, String str5, String str6) {
        JSONObject jSONObject = new JSONObject();
        JSONObject jSONObject2 = new JSONObject();
        JSONArray jSONArray = new JSONArray();
        try {
            jSONObject.put("api_id", str);
            jSONObject.put("request_id", str2);
            jSONObject.put(CrashHianalyticsData.TIME, System.currentTimeMillis() + "");
            jSONObject.put("data_id", str3);
            jSONObject.put("idx", str4);
            jSONObject.put("ref", "30001");
            jSONObject.put("ref_ver", StatisticsReportUtil.getSimpleVersionName());
            jSONObject.put("key", "KZ2BZ-4S4RV-2TOP6-URXZA-MQD4T-6GBOK");
            jSONObject.put("userid", StatisticsReportUtil.getUUIDMD5());
            jSONObject.put("lat", str5);
            jSONObject.put("lng", str6);
            jSONObject.put("dev", Build.BRAND);
            jSONObject.put("os", BuryContant.SYSTEM_ANDROID);
            jSONObject.put("os_ver", Build.VERSION.RELEASE);
            jSONObject.put("lang", Verify.CHINESE);
            jSONArray.put(jSONObject);
            jSONObject2.put("data", jSONArray);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject2);
        requestEntity.putParam("functionId", "local/logUpload");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getGiftCards(Activity activity) {
        RequestEntity requestEntity = new RequestEntity(BASE_URL, new JSONObject());
        requestEntity.putParam("functionId", "mine/getGiftCards");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity uploadUseDrugImg(Activity activity, String str) {
        RequestEntity requestEntity = new RequestEntity(BASE_URL, new JSONObject());
        requestEntity.putParam("functionId", "marketsettle/uploadUseDrugImg");
        requestEntity.putParam("useDrugImg", str);
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getSpuSaleAttr(Activity activity, String str, String str2, String str3, String str4, List<String> list, Integer num, boolean z, String str5) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put(SearchHelper.SEARCH_STORE_ID, str);
            jSONObject.put("orgCode", str2);
            jSONObject.put("spuId", str3);
            jSONObject.put("skuId", str4);
            if (num != null) {
                jSONObject.put("treatyType", num);
            }
            jSONObject.put("singleSettle", z);
            if (!TextUtils.isEmpty(str5) && !"0".equals(str5)) {
                jSONObject.put("saleType", str5);
            }
            if (list != null && !list.isEmpty()) {
                JSONArray jSONArray = new JSONArray();
                for (String str6 : list) {
                    jSONArray.put(str6);
                }
                jSONObject.put("showSkuList", jSONArray);
            }
        } catch (JSONException e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "spuSaleAttr/spuSaleAttrListPost");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getVirtualSpuSaleAttr(Activity activity, String str, String str2, String str3, String str4, List<String> list, Integer num, boolean z) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put(SearchHelper.SEARCH_STORE_ID, str);
            jSONObject.put("orgCode", str2);
            jSONObject.put("spuId", str3);
            jSONObject.put("skuId", str4);
            if (num != null) {
                jSONObject.put("treatyType", num);
            }
            jSONObject.put("singleSettle", z);
            if (list != null && !list.isEmpty()) {
                JSONArray jSONArray = new JSONArray();
                for (String str5 : list) {
                    jSONArray.put(str5);
                }
                jSONObject.put("showSkuList", jSONArray);
            }
        } catch (JSONException e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "virtualSpuSaleAttr/getVirtualSpuSaleAttrList");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getSpuSuitData(Activity activity, String str, String str2, String str3, String str4, List<String> list, Integer num, boolean z) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put(SearchHelper.SEARCH_STORE_ID, str);
            jSONObject.put("orgCode", str2);
            jSONObject.put("spuId", str3);
            jSONObject.put("skuId", str4);
            if (num != null) {
                jSONObject.put("treatyType", num);
            }
            jSONObject.put("singleSettle", z);
            if (list != null && !list.isEmpty()) {
                JSONArray jSONArray = new JSONArray();
                for (String str5 : list) {
                    jSONArray.put(str5);
                }
                jSONObject.put("showSkuList", jSONArray);
            }
        } catch (JSONException e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "product/suitInfo");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getDiscoverTab(Activity activity, int i, int i2, int i3, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("careType", i);
            jSONObject.put("pageSize", i2);
            jSONObject.put("currentPage", i3);
            jSONObject.put(DiscoverTabFragment.ARG_PARAM1, str);
            if (MyInfoHelper.getMyInfoShippingAddress() != null) {
                jSONObject.put(i.b.am, MyInfoHelper.getMyInfoShippingAddress().getLongitude());
                jSONObject.put(i.b.an, MyInfoHelper.getMyInfoShippingAddress().getLatitude());
            }
        } catch (JSONException e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "newFeed/contentList");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getShareData(Activity activity, String str, int i, String str2, String str3, String str4, String str5, String str6) {
        return getShareData(activity, str, i, str2, str3, str4, str5, str6, false);
    }

    public static RequestEntity getShareData(Activity activity, String str, int i, String str2, String str3, String str4, String str5, String str6, boolean z) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("type", str);
            jSONObject.put("packageVersion", i);
            if (!TextUtils.isEmpty(str3)) {
                jSONObject.put(SearchHelper.SEARCH_STORE_ID, str3);
            }
            if (!TextUtils.isEmpty(str2)) {
                jSONObject.put("orgCode", str2);
            }
            if (!TextUtils.isEmpty(str4)) {
                jSONObject.put("skuId", str4);
            }
            if (!TextUtils.isEmpty(str5)) {
                jSONObject.put("activityId", str5);
            }
            if (!TextUtils.isEmpty(str6)) {
                jSONObject.put(SearchHelper.GROUPID, str6);
            }
            addAddress(jSONObject);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", z ? "share/multiDataLogin" : "share/multiData");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getSquareData(Activity activity, String str, int i, String str2, String str3, String str4, String str5, String str6) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("type", str);
            jSONObject.put("packageVersion", i);
            if (!TextUtils.isEmpty(str3)) {
                jSONObject.put(SearchHelper.SEARCH_STORE_ID, str3);
            }
            if (!TextUtils.isEmpty(str2)) {
                jSONObject.put("orgCode", str2);
            }
            if (!TextUtils.isEmpty(str4)) {
                jSONObject.put("skuId", str4);
            }
            if (!TextUtils.isEmpty(str5)) {
                jSONObject.put("activityId", str5);
            }
            if (!TextUtils.isEmpty(str6)) {
                jSONObject.put(SearchHelper.GROUPID, str6);
            }
            addAddress(jSONObject);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "share/getSquareData");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getShareTemplate(Activity activity) {
        RequestEntity requestEntity = new RequestEntity(BASE_URL, new JSONObject());
        requestEntity.putParam("functionId", "share/templates");
        requestEntity.putParam(UrlTools.BODY, requestEntity.json.toString());
        requestEntity.method = 0;
        baseUrl(null, requestEntity);
        return requestEntity;
    }

    public static RequestEntity convertCouponCheck(Activity activity, String str, String str2, int i, String str3, String str4, boolean z, boolean z2) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("activityCode", str);
            jSONObject.put("grabChannel", str2);
            jSONObject.put("exchangeFlag", i);
            jSONObject.put("orderPageId", str3);
            jSONObject.put(SearchHelper.SEARCH_STORE_ID, str4);
            jSONObject.put("buyCouponWithOrderFlag", z);
            jSONObject.put("mockVip", z2);
        } catch (JSONException e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "vip/convertCouponCheck");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity convertCoupon(Activity activity, String str, String str2, String str3, int i, String str4, boolean z) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("activityCode", str);
            jSONObject.put("grabChannel", str2);
            jSONObject.put("consumeCode", str3);
            jSONObject.put("serviceVersion", "2");
            jSONObject.put("exchangeFlag", i);
            jSONObject.put("orderPageId", str4);
            jSONObject.put("buyCouponWithOrderFlag", z);
        } catch (JSONException e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "vip/convertCoupon");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity isImAvailable(Activity activity) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("type", 1);
        } catch (JSONException e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "lauch/getdongdongswitch");
        requestEntity.putParam(UrlTools.BODY, requestEntity.json.toString());
        requestEntity.method = 0;
        baseUrl(null, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getSortStoreNum(Activity activity, String str, String str2, boolean z) {
        JSONObject jSONObject = new JSONObject();
        try {
            if (!TextUtils.isEmpty(str)) {
                jSONObject.put("filterTagIds", str);
            }
            if (!TextUtils.isEmpty(str2)) {
                jSONObject.put(RemoteMessageConst.Notification.CHANNEL_ID, str2);
            }
        } catch (JSONException e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", z ? "zone/getNumFilterTagForElders" : "zone/getNumFilterTag");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getHomeBottomRecommendHotSale(Activity activity, int i, String str, String str2, boolean z, int i2, int i3, String str3, String str4, String str5) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("coordType", "2");
            jSONObject.put("currentPage", i);
            if (!TextUtil.isEmpty(str2)) {
                jSONObject.put("filterTagId", str2);
            }
            if (!TextUtil.isEmpty(str)) {
                jSONObject.put("firstTagId", str);
            }
            jSONObject.put("needMenu", z);
            jSONObject.put("count", i2);
            jSONObject.put("pageSource", str4);
            if (!TextUtil.isEmpty(str5)) {
                jSONObject.put("secondIndex", str5);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", i3 == 1 ? "zone/indexFeedsForElders" : "zone/recommendSkuList");
        requestEntity.method = 0;
        requestEntity.traceid = str3;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getHomeBottomRecomendNew(Activity activity, int i, int i2, String str, String str2, String str3, String str4, String str5, ArrayList<String> arrayList, ArrayList<String> arrayList2, String str6, String str7, String str8, int i3, boolean z, boolean z2) {
        JSONObject jSONObject = new JSONObject();
        MyInfoShippingAddress myInfoShippingAddress = MyInfoHelper.myInfoShippingAddress;
        String str9 = "";
        if (myInfoShippingAddress != null) {
            str9 = myInfoShippingAddress.getCityName();
        }
        try {
            if (TextUtils.isEmpty(str9)) {
                str9 = "";
            }
            jSONObject.put("city", str9);
            addAddress(jSONObject);
            jSONObject.put("coordType", "2");
            if (!TextUtils.isEmpty(str3)) {
                jSONObject.put("rankType", str3);
            }
            if (!TextUtils.isEmpty(str4)) {
                jSONObject.put("filterTagIds", str4);
            }
            if (!TextUtils.isEmpty(str)) {
                jSONObject.put(RemoteMessageConst.Notification.CHANNEL_ID, str);
            }
            if (!TextUtils.isEmpty(str2)) {
                jSONObject.put(SearchHelper.SEARCH_CHANNELBUSINESS, str2);
            }
            if (arrayList != null) {
                try {
                    jSONObject.put("venderIndustryType", new JSONArray(new Gson().toJson(arrayList)));
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
            if (arrayList2 != null) {
                try {
                    jSONObject.put("level", new JSONArray(new Gson().toJson(arrayList2)));
                } catch (Exception e2) {
                    e2.printStackTrace();
                }
            }
            if (!TextUtils.isEmpty(str6)) {
                jSONObject.put("activityId", str6);
            }
            if (!TextUtils.isEmpty(str7)) {
                jSONObject.put("sortType", str7);
            }
            if (!TextUtils.isEmpty(str8)) {
                jSONObject.put(OpenRouter.NOTIFICATION_TYPE_STOREPROMOTION, str8);
            }
            jSONObject.put("unNeedSku", z);
            jSONObject.put("appVersion", StatisticsReportUtil.getSimpleVersionName());
            jSONObject.put("platform", "2");
            jSONObject.put("currentPage", i);
            jSONObject.put("pageSize", i2);
            if (myInfoShippingAddress != null) {
                jSONObject.put("areaCode", myInfoShippingAddress.getCityId());
            }
            jSONObject.put("lastStoreId", str5);
            if (i3 != -1) {
                jSONObject.put("newChannelFlag", i3);
            }
        } catch (Exception e3) {
            e3.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", z2 ? "zone/recommendStoreListForElders" : "zone/recommendStoreListPost");
        requestEntity.method = !z2 ? 1 : 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity homeCartQuery(Activity activity, ArrayList<String> arrayList) {
        JSONObject jSONObject = new JSONObject();
        try {
            JSONArray jSONArray = new JSONArray(new Gson().toJson(arrayList));
            if (jSONArray.length() != 0) {
                jSONObject.put("chgNumReturnType", "2");
                jSONObject.put("storeIds", jSONArray);
                jSONObject.put("cartUuid", StatisticsReportUtil.getUUIDMD5());
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.method = 1;
        requestEntity.putParam("functionId", "cartV3_3_0/getstoresum");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity homeAddCartLayer(Activity activity, HomeBackRequestParams homeBackRequestParams) {
        JSONObject jSONObject = new JSONObject();
        Gson gson = new Gson();
        try {
            if (homeBackRequestParams.getType() == 1) {
                List<HomeFeedsSkuRequestInfo> beforeSkuIds = homeBackRequestParams.getBeforeSkuIds();
                List<HomeFeedsSkuRequestInfo> afterSkuIds = homeBackRequestParams.getAfterSkuIds();
                if (beforeSkuIds != null && beforeSkuIds.size() > 0) {
                    jSONObject.put("beforeSkuIds", new JSONArray(gson.toJson(beforeSkuIds)));
                }
                if (afterSkuIds != null && afterSkuIds.size() > 0) {
                    jSONObject.put("afterSkuIds", new JSONArray(gson.toJson(afterSkuIds)));
                }
            } else {
                jSONObject.put("firstOrgCode", homeBackRequestParams.getFirstOrgCode());
                jSONObject.put("firstStoreId", homeBackRequestParams.getFirstStoreId());
            }
            jSONObject.put(SearchHelper.SEARCH_STORE_ID, homeBackRequestParams.getStoreId());
            jSONObject.put("skuId", homeBackRequestParams.getSkuId());
            jSONObject.put("orgCode", homeBackRequestParams.getOrgCode());
            jSONObject.put("type", "" + homeBackRequestParams.getType());
            if (!TextUtil.isEmpty(homeBackRequestParams.getFirstTagId())) {
                jSONObject.put("firstTagId", homeBackRequestParams.getFirstTagId());
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.method = 0;
        requestEntity.putParam("functionId", "zone/recommendGuideSameStore");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity scanSku(Activity activity, String str, String str2, String str3) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orgCode", str);
            jSONObject.put(SearchHelper.SEARCH_STORE_ID, str2);
            jSONObject.put("upc", str3);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.method = 0;
        requestEntity.putParam("functionId", "store/scanSku");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getConfigInfos(Activity activity) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("groupCode", StatisticsReportUtil.getSimpleVersionName());
            jSONObject.put("sysCode", JDApplication.getInstance().getPackageName());
            if (_T) {
                jSONObject.put("token", "86f47c9bb74217185b863d60f70aafc8");
            } else {
                jSONObject.put("token", "ddbdd474bab9da217bcfb80a78893d01");
            }
        } catch (JSONException e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "/group/item/list");
        requestEntity.method = 0;
        baseUrl(null, requestEntity);
        return requestEntity;
    }

    public static RequestEntity verifyPreSaleStatus(Activity activity, List<CartRequest.Sku> list, String str, String str2) {
        JSONObject jSONObject = new JSONObject();
        try {
            JSONArray jSONArray = new JSONArray(new Gson().toJson(list));
            if (jSONArray.length() != 0) {
                jSONObject.put(SearchHelper.SEARCH_STORE_ID, str);
                jSONObject.put("orgCode", str2);
                jSONObject.put("skus", jSONArray);
                jSONObject.put("fromSource", 1);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "cartV3_3_0/verifySettleForPreSell");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity sendSecrectData() {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("dataJson", RSAHelper.getInstance().getSecretData());
        } catch (JSONException e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "deviceReport/add");
        requestEntity.method = 1;
        baseUrl(null, requestEntity);
        return requestEntity;
    }

    public static RequestEntity sendScreenData(Map map) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("dataJson", RSAHelper.getInstance().getSreenData(map));
        } catch (JSONException e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "sr/r");
        requestEntity.method = 1;
        baseUrl(null, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getStoreListByMenu(Activity activity, String str, String str2) {
        JSONObject jSONObject = new JSONObject();
        try {
            addAddress(jSONObject);
            jSONObject.put("menuId", str);
            jSONObject.put(SearchHelper.SEARCH_CHANNELBUSINESS, str2);
            jSONObject.put("coordType", "2");
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "zone/queryStoreListByMenu");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getfeedback(Activity activity) {
        RequestEntity requestEntity = new RequestEntity(BASE_URL, new JSONObject());
        requestEntity.putParam("functionId", "newFeed/getfeedback");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity discoverCommitfeedback(Activity activity, String str, String str2) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("feedId", str);
            jSONObject.put("feedBackType", str2);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "newFeed/commitfeedback");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getShortProtocol(String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("shortCode", str);
        } catch (JSONException e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "short/getProtocol");
        requestEntity.method = 0;
        baseUrl(null, requestEntity);
        return requestEntity;
    }

    public static RequestEntity encodeUrlProtocol(Activity activity, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("originalUrl", str);
        } catch (JSONException e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "mine/encodePinInUrl");
        requestEntity.method = 0;
        baseUrl(null, requestEntity);
        return requestEntity;
    }

    public static RequestEntity leaveMarketing(Activity activity, Map<String, Object> map) {
        JSONObject jSONObject = new JSONObject();
        if (map != null) {
            try {
                for (String str : map.keySet()) {
                    jSONObject.put(str, map.get(str));
                }
            } catch (JSONException e) {
                e.printStackTrace();
            }
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "lauch/leaveMarketing");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getMoziConfig() {
        RequestEntity requestEntity = new RequestEntity(BASE_URL, new JSONObject());
        requestEntity.putParam("functionId", "rpc/template/manage/getTemplateFileSrc");
        baseUrl(null, requestEntity);
        return requestEntity;
    }

    public static RequestEntity openCardByShopCartOnClick(Activity activity, String str, String str2, String str3) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put(SearchHelper.SEARCH_STORE_ID, str);
            jSONObject.put("orgCode", str2);
            jSONObject.put(SocialConstants.PARAM_SOURCE, str3);
            RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
            requestEntity.putParam("functionId", "gateway/openCardByShopCartOnClick");
            requestEntity.method = 1;
            baseUrl(activity, requestEntity);
            return requestEntity;
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }

    public static RequestEntity getCheckMiddleNumber(Activity activity, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        if (ElderViewUtil.isElderModeEnable()) {
            requestEntity.putParam("functionId", "order/elder/checkMiddleNumber");
        } else {
            requestEntity.putParam("functionId", "order/checkMiddleNumber");
        }
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getMiddleNumber(Activity activity, String str) {
        return getMiddleNumber(activity, str, null);
    }

    public static RequestEntity getMiddleNumber(Activity activity, String str, String str2) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
            if (!TextUtil.isEmpty(str2)) {
                jSONObject.put(BaseInfo.NETWORK_TYPE_MOBILE, str2);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        if (ElderViewUtil.isElderModeEnable()) {
            requestEntity.putParam("functionId", "order/elder/getMiddleNumber");
        } else {
            requestEntity.putParam("functionId", "order/getMiddleNumber");
        }
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getElderOrderList(Activity activity, int i, int i2) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("startIndex", i);
            jSONObject.put("dataSize", 10);
            jSONObject.put("jumpSource", i2);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/elder/list");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getElderOrderDetailNew(Activity activity, String str) {
        String[] split;
        if (!TextUtils.isEmpty(str) && (split = str.split("______")) != null && split.length == 2) {
            return getOrderDetailEncode(activity, split[0]);
        }
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/elder/info");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity elderCheckBeforeToStoreDetail(Activity activity, double d, double d2, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("cityId", 0);
            jSONObject.put(f.f, StatisticsReportUtil.getUUIDMD5());
            jSONObject.put(i.b.am, d);
            jSONObject.put(i.b.an, d2);
            jSONObject.put(SearchHelper.SEARCH_STORE_ID, str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "check/elder/checkBeforeToStoreDetail");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity elderCheckBeforeToProductDetail(Activity activity, double d, double d2, String str, String str2) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put(i.b.am, d);
            jSONObject.put(i.b.an, d2);
            jSONObject.put(SearchHelper.SEARCH_STORE_ID, str);
            jSONObject.put(VideoPlayerConstants.ACTIVITY_INTENT_PARAMS_SKU, str2);
            jSONObject.put("cityId", 0);
            jSONObject.put(f.f, StatisticsReportUtil.getUUIDMD5());
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "check/elder/checkBeforeToProductDetail");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getElderStateMap(Activity activity, String str, double d, double d2, int i, String str2) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
            jSONObject.put("deliveryManlng", d2);
            jSONObject.put("deliveryManlat", d);
            jSONObject.put("stateId", i);
            jSONObject.put("mapSize", str2);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/elder/stateMapNew");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity elderDeleteOrder(Activity activity, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/elder/orderDelete");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity cancelElderOrder(Activity activity, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/elder/orderCancel");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity cancelElderOrder(Activity activity, String str, String str2, String str3) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
            jSONObject.put("cancelReason", str2);
            if (!TextUtils.isEmpty(str3)) {
                jSONObject.put("reasonText", str3);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/elder/orderCancel");
        requestEntity.method = 1;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity cancelElderOrderLayer(Activity activity, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/elder/cancel/page");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getElderOrderStatus(Activity activity, String str) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orderId", str);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/elder/state");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity checkEplosiveSelf(Activity activity) {
        JSONObject jSONObject = new JSONObject();
        try {
            JSONArray jSONArray = new JSONArray();
            jSONArray.put(1);
            jSONObject.put("stateCode", 1);
            jSONObject.put("stateAfter", true);
            jSONObject.put("tags", jSONArray);
        } catch (Exception e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "order/recent/orderList");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity openCardByStoreMemberFreeOrPay(Activity activity, String str, String str2, String str3, String str4) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orgCode", str);
            jSONObject.put(SearchHelper.SEARCH_STORE_ID, str2);
            jSONObject.put(SocialConstants.PARAM_SOURCE, str3);
            jSONObject.put("notifyUrl", Constant.KEY_SUCCESS_RENEWAL_MEMBER_VIP);
            jSONObject.put("paySource", str4);
            RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
            requestEntity.putParam("functionId", "gateway/buycard");
            requestEntity.method = 0;
            baseUrl(activity, requestEntity);
            return requestEntity;
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }

    public static RequestEntity openCardByStoreMemberRenewal(Activity activity, String str, String str2, String str3, String str4) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put("orgCode", str);
            jSONObject.put(SearchHelper.SEARCH_STORE_ID, str2);
            jSONObject.put("paySource", str4);
            jSONObject.put("notifyUrl", Constant.KEY_SUCCESS_RENEWAL_MEMBER_VIP);
            jSONObject.put(SocialConstants.PARAM_SOURCE, str3);
            RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
            requestEntity.putParam("functionId", "gateway/renewcard");
            requestEntity.method = 0;
            baseUrl(activity, requestEntity);
            return requestEntity;
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }

    public static RequestEntity getBeltPromptBar(Activity activity, Map<String, Object> map) {
        JSONObject jSONObject;
        try {
            jSONObject = new JSONObject(map);
        } catch (Exception e) {
            jSONObject = new JSONObject();
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "lauch/beltPromptBar");
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getStoreRecommendSku(Activity activity, String str, String str2, String str3, List<String> list, String str4, List<String> list2, String str5) {
        JSONObject jSONObject = new JSONObject();
        try {
            jSONObject.put(SearchHelper.SEARCH_STORE_ID, str);
            jSONObject.put("orgCode", str2);
            jSONObject.put("skuId", str3);
            jSONObject.put("displayType", str5);
            if (!ArrayUtil.isEmpty((Collection<?>) list)) {
                JSONArray jSONArray = new JSONArray();
                for (String str6 : list) {
                    jSONArray.put(str6);
                }
                jSONObject.put("excludeSkuIds", jSONArray);
            }
            if (!ArrayUtil.isEmpty((Collection<?>) list2)) {
                JSONArray jSONArray2 = new JSONArray();
                for (String str7 : list2) {
                    jSONArray2.put(str7);
                }
                jSONObject.put("couponIdList", jSONArray2);
            }
            jSONObject.put("limitRate", str4);
        } catch (JSONException e) {
            e.printStackTrace();
        }
        RequestEntity requestEntity = new RequestEntity(BASE_URL, jSONObject);
        requestEntity.putParam("functionId", "zone/recommendSkuAfterPushInCart");
        requestEntity.method = 0;
        baseUrl(activity, requestEntity);
        return requestEntity;
    }

    public static RequestEntity getds() {
        String str = "https://pre-ds.jddj.com/getds";
        if (!_T || "gw-o2o.jddj.com".equals(BASE_HOST)) {
            str = "https://ds.jddj.com/getds";
        }
        RequestEntity requestEntity = new RequestEntity(str, null);
        requestEntity.putParam("functionId", "getds");
        requestEntity.method = 0;
        requestEntity.isEncrypt = true;
        requestEntity.urlIgnore = true;
        baseUrl(null, requestEntity);
        return requestEntity;
    }
}