得物.apk(点击下载) / CSKfDelegate.java


package com.shizhuang.duapp.modules.servizio.helper.csim;

import android.content.Context;
import android.os.SystemClock;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import bk.d;
import com.alibaba.fastjson.JSONObject;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.meizu.cloud.pushsdk.constants.PushConstants;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.common.bean.IMEnvConfig;
import com.shizhuang.duapp.common.bean.UsersModel;
import com.shizhuang.duapp.libs.customer_service.activity.BizConversationActivity;
import com.shizhuang.duapp.libs.customer_service.api.OctopusConsultSource;
import com.shizhuang.duapp.libs.customer_service.api.OctopusHttpHelper;
import com.shizhuang.duapp.libs.customer_service.api.OctopusJumpSource;
import com.shizhuang.duapp.libs.customer_service.api.OctopusLogReporter;
import com.shizhuang.duapp.libs.customer_service.api.OctopusOption;
import com.shizhuang.duapp.libs.customer_service.api.OctopusOrderInfo;
import com.shizhuang.duapp.libs.customer_service.api.OctopusOrderParams;
import com.shizhuang.duapp.libs.customer_service.api.OctopusOrderQuestionInfo;
import com.shizhuang.duapp.libs.customer_service.api.OctopusProductInfo;
import com.shizhuang.duapp.libs.customer_service.api.OctopusSourceInfo;
import com.shizhuang.duapp.libs.customer_service.api.OctopusUbtHelper;
import com.shizhuang.duapp.libs.customer_service.api.OctopusUserInfoGetter;
import com.shizhuang.duapp.libs.customer_service.api.b;
import com.shizhuang.duapp.libs.customer_service.dubiz.DuBizDelegate;
import com.shizhuang.duapp.libs.customer_service.model.entity.send.ActionCommon;
import com.shizhuang.duapp.libs.customer_service.service.CustomerConfig;
import com.shizhuang.duapp.libs.customer_service.service.ObserverWrapper;
import com.shizhuang.duapp.modules.router.ServiceManager;
import com.shizhuang.duapp.modules.router.model.KfChatOption;
import com.shizhuang.duapp.modules.router.model.KfJumpSource;
import com.shizhuang.duapp.modules.router.model.KfOrderDetail;
import com.shizhuang.duapp.modules.router.model.KfSourceInfo;
import com.shizhuang.duapp.modules.router.service.IDeveloperService;
import com.shizhuang.duapp.modules.router.service.IServizioService;
import df.c;
import ib1.e;
import ib1.g;
import ib1.h;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import qc.f;
import uk.l;
import uk.n;
import yh.a;

public class CSKfDelegate implements IServizioService {
    public static ChangeQuickRedirect changeQuickRedirect;
    private static volatile CSKfDelegate instance;

    /* renamed from: a  reason: collision with root package name */
    public Context f25184a;

    private CSKfDelegate() {
        e eVar = e.f33388a;
        if (!PatchProxy.proxy(new Object[]{eVar}, null, b.changeQuickRedirect, true, 23136, new Class[]{OctopusLogReporter.class}, Void.TYPE).isSupported) {
            ei1.e.i(new d(eVar));
        }
        if (ServiceManager.h() != null) {
            if (!PatchProxy.proxy(new Object[]{new Byte((byte) 1)}, null, b.changeQuickRedirect, true, 23141, new Class[]{Boolean.TYPE}, Void.TYPE).isSupported) {
                oi1.e.b(true);
            }
        }
    }

    public static CSKfDelegate a() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], null, changeQuickRedirect, true, 320610, new Class[0], CSKfDelegate.class);
        if (proxy.isSupported) {
            return (CSKfDelegate) proxy.result;
        }
        if (instance == null) {
            synchronized (CSKfDelegate.class) {
                if (instance == null) {
                    instance = new CSKfDelegate();
                }
            }
        }
        return instance;
    }

    /* renamed from: b */
    public OctopusOption getOptions(Context context) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{context}, this, changeQuickRedirect, false, 320611, new Class[]{Context.class}, OctopusOption.class);
        if (proxy.isSupported) {
            return (OctopusOption) proxy.result;
        }
        OctopusOption octopusOption = new OctopusOption();
        IMEnvConfig e = f.e();
        if (e == null) {
            e = IMEnvConfig.RELEASE;
        }
        IDeveloperService h12 = ServiceManager.h();
        if (h12 != null) {
            String debugNetInfo = h12.getDebugNetInfo();
            if (!TextUtils.isEmpty(debugNetInfo)) {
                octopusOption.debugNetInfo = debugNetInfo;
            }
        }
        octopusOption.host = e.getHost();
        octopusOption.channelCode = e.getChannel();
        octopusOption.appKey = e.getAppKey();
        octopusOption.appName = e.getAppName();
        octopusOption.isSSL = e.isSsl();
        octopusOption.deviceId = "Android";
        octopusOption.appVersion = c.h(context);
        octopusOption.fileUploader = new ib1.c(context);
        octopusOption.httpHelper = new ib1.d();
        octopusOption.priceFontTypeFace = a.e(context).b();
        ib1.a aVar = ib1.a.d;
        String str = octopusOption.host;
        if (!PatchProxy.proxy(new Object[]{str}, aVar, ib1.a.changeQuickRedirect, false, 320607, new Class[]{String.class}, Void.TYPE).isSupported) {
            aVar.f33384c = str;
        }
        octopusOption.hostFactory = aVar;
        octopusOption.routeHelper = g.f33391a;
        octopusOption.imagePicker = ib1.b.f33385a;
        return octopusOption;
    }

    @Override // com.shizhuang.duapp.modules.router.service.IServizioService
    public void checkInit(Context context) {
        if (!PatchProxy.proxy(new Object[]{context}, this, changeQuickRedirect, false, 320627, new Class[]{Context.class}, Void.TYPE).isSupported && this.f25184a == null && context != null) {
            b.d(context, getOptions(context));
            bk.b bVar = bk.b.b;
            if (!PatchProxy.proxy(new Object[]{bVar}, null, b.changeQuickRedirect, true, 23124, new Class[]{OctopusUserInfoGetter.class}, Void.TYPE).isSupported) {
                b.f8739a = bVar;
            }
            h hVar = h.f33392a;
            if (!PatchProxy.proxy(new Object[]{hVar}, null, b.changeQuickRedirect, true, 23140, new Class[]{OctopusUbtHelper.class}, Void.TYPE).isSupported) {
                al.c.f1394a.b(hVar);
            }
            ib1.f fVar = ib1.f.f33389a;
            if (!PatchProxy.proxy(new Object[]{fVar}, null, b.changeQuickRedirect, true, 23142, new Class[]{DuBizDelegate.class}, Void.TYPE).isSupported) {
                dk.c.f31536a.a(fVar);
            }
            this.f25184a = context.getApplicationContext();
        }
    }

    @Override // com.shizhuang.duapp.modules.router.service.IServizioService
    public void dispatchScreenshot(@NonNull String str) {
        boolean z;
        String str2;
        boolean z4 = false;
        if (!PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 320625, new Class[]{String.class}, Void.TYPE).isSupported) {
            if (!PatchProxy.proxy(new Object[]{str}, null, b.changeQuickRedirect, true, 23138, new Class[]{String.class}, Void.TYPE).isSupported) {
                com.shizhuang.duapp.libs.customer_service.service.a a02 = com.shizhuang.duapp.libs.customer_service.service.a.a0();
                if (!PatchProxy.proxy(new Object[]{str}, a02, com.shizhuang.duapp.libs.customer_service.service.a.changeQuickRedirect, false, 26601, new Class[]{String.class}, Void.TYPE).isSupported) {
                    l lVar = a02.p;
                    PatchProxyResult proxy = PatchProxy.proxy(new Object[0], lVar, l.changeQuickRedirect, false, 26688, new Class[0], Boolean.TYPE);
                    if (proxy.isSupported) {
                        z = ((Boolean) proxy.result).booleanValue();
                    } else {
                        ObserverWrapper observerWrapper = lVar.b;
                        if (observerWrapper != null && observerWrapper.e) {
                            z4 = true;
                        }
                        z = z4;
                    }
                    if (z) {
                        if (a02.getCurrentSessionMode() == 1) {
                            String currentSessionId = a02.getCurrentSessionId();
                            CustomerConfig.MsgType msgType = CustomerConfig.MsgType.SCREEN_SHOOT_ACTION;
                            ActionCommon actionCommon = new ActionCommon();
                            actionCommon.sessionId = currentSessionId;
                            a02.O(actionCommon, msgType.code(), msgType.ct());
                            str2 = PushConstants.PUSH_TYPE_UPLOAD_LOG;
                        } else {
                            a02.f9051q.showScreenShotFeedback(str, 400);
                            str2 = "1";
                        }
                        HashMap hashMap = new HashMap();
                        hashMap.put("service_state", str2);
                        al.b.c("common_screen_shot", "261", null, hashMap);
                    }
                }
            }
        }
    }

    @Override // com.shizhuang.duapp.modules.router.service.IServizioService
    @Nullable
    public String getMessageDescByContent(String str) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{str}, this, changeQuickRedirect, false, 320624, new Class[]{String.class}, String.class);
        if (proxy.isSupported) {
            return (String) proxy.result;
        }
        PatchProxyResult proxy2 = PatchProxy.proxy(new Object[]{str}, null, b.changeQuickRedirect, true, 23139, new Class[]{String.class}, String.class);
        if (proxy2.isSupported) {
            return (String) proxy2.result;
        }
        return com.shizhuang.duapp.libs.customer_service.service.c.e(str);
    }

    @Override // com.shizhuang.duapp.modules.router.service.IServizioService
    public String getQyAppKey() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 320617, new Class[0], String.class);
        if (proxy.isSupported) {
            return (String) proxy.result;
        }
        return null;
    }

    @Override // com.shizhuang.duapp.modules.router.service.IServizioService
    public int getUnreadCount() {
        Class cls = Integer.TYPE;
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 320621, new Class[0], cls);
        if (proxy.isSupported) {
            return ((Integer) proxy.result).intValue();
        }
        PatchProxyResult proxy2 = PatchProxy.proxy(new Object[0], null, b.changeQuickRedirect, true, 23134, new Class[0], cls);
        if (proxy2.isSupported) {
            return ((Integer) proxy2.result).intValue();
        }
        return 0;
    }

    @Override // com.alibaba.android.arouter.facade.template.IProvider
    public void init(Context context) {
        boolean z = PatchProxy.proxy(new Object[]{context}, this, changeQuickRedirect, false, 320626, new Class[]{Context.class}, Void.TYPE).isSupported;
    }

    @Override // com.shizhuang.duapp.modules.router.service.IServizioService
    public void initKfSdk(Context context) {
        if (!PatchProxy.proxy(new Object[]{context}, this, changeQuickRedirect, false, 320628, new Class[]{Context.class}, Void.TYPE).isSupported && this.f25184a != null && context != null) {
            b.e(context);
        }
    }

    @Override // com.shizhuang.duapp.modules.router.service.IServizioService
    public void initUserInfo(Context context) {
        if (!PatchProxy.proxy(new Object[]{context}, this, changeQuickRedirect, false, 320618, new Class[]{Context.class}, Void.TYPE).isSupported && this.f25184a != null && !PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 320619, new Class[0], Void.TYPE).isSupported) {
            gn1.a.h("customer_service").h("initUserInfo", new Object[0]);
            UsersModel usersModel = (UsersModel) ServiceManager.d().getUserInfo();
            if (usersModel != null) {
                bk.h hVar = new bk.h();
                hVar.f(usersModel.userId);
                hVar.e(ServiceManager.d().getJwtToken());
                hVar.g(usersModel.userName);
                hVar.d(usersModel.icon);
                b.g(hVar);
            }
        }
    }

    @Override // com.shizhuang.duapp.modules.router.service.IServizioService
    public boolean isQyCustomerIm() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 320623, new Class[0], Boolean.TYPE);
        if (proxy.isSupported) {
            return ((Boolean) proxy.result).booleanValue();
        }
        return false;
    }

    @Override // com.shizhuang.duapp.modules.router.service.IServizioService
    public void logout() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 320620, new Class[0], Void.TYPE).isSupported) {
            b.f();
        }
    }

    @Override // com.shizhuang.duapp.modules.router.service.IServizioService
    public void sendOrderDetail(KfOrderDetail kfOrderDetail) {
        if (!PatchProxy.proxy(new Object[]{kfOrderDetail}, this, changeQuickRedirect, false, 320622, new Class[]{KfOrderDetail.class}, Void.TYPE).isSupported) {
            OctopusOrderInfo octopusOrderInfo = new OctopusOrderInfo();
            octopusOrderInfo.setTitle(kfOrderDetail.getTitle());
            octopusOrderInfo.setPicture(kfOrderDetail.getPicture());
            octopusOrderInfo.setTradeStatus(kfOrderDetail.getTradeStatus());
            octopusOrderInfo.setCreateTime(kfOrderDetail.getCreateTime());
            octopusOrderInfo.setSkuProp(kfOrderDetail.getSkuProp());
            octopusOrderInfo.setSkuQuantity(kfOrderDetail.getSkuQuantity());
            octopusOrderInfo.setPrice(kfOrderDetail.getPrice());
            octopusOrderInfo.setOrderNum(kfOrderDetail.getOrderNum());
            octopusOrderInfo.setCreateTime(kfOrderDetail.getCreateTime());
            if (!PatchProxy.proxy(new Object[]{octopusOrderInfo}, null, b.changeQuickRedirect, true, 23133, new Class[]{OctopusOrderInfo.class}, Void.TYPE).isSupported) {
                com.shizhuang.duapp.libs.customer_service.service.a.a0().getSenderHelper().sendMsgOrder(octopusOrderInfo);
            }
        }
    }

    @Override // com.shizhuang.duapp.modules.router.service.IServizioService
    public void startChattingActivity(Context context, KfChatOption kfChatOption) {
        if (!PatchProxy.proxy(new Object[]{context, kfChatOption}, this, changeQuickRedirect, false, 320613, new Class[]{Context.class, KfChatOption.class}, Void.TYPE).isSupported && kfChatOption != null) {
            OctopusConsultSource octopusConsultSource = new OctopusConsultSource(kfChatOption.uri, kfChatOption.title);
            octopusConsultSource.sourceId = kfChatOption.sourceId;
            octopusConsultSource.productCategory = kfChatOption.productCategory;
            octopusConsultSource.spuId = kfChatOption.spuId;
            octopusConsultSource.orderNo = kfChatOption.orderNo;
            octopusConsultSource.articleNumber = kfChatOption.articleNumber;
            octopusConsultSource.taskId = kfChatOption.taskId;
            KfSourceInfo kfSourceInfo = kfChatOption.sourceInfo;
            if (kfSourceInfo != null) {
                OctopusSourceInfo octopusSourceInfo = new OctopusSourceInfo();
                List<KfJumpSource> kfJumpSources = kfSourceInfo.getKfJumpSources();
                if (kfJumpSources != null && kfJumpSources.size() > 0) {
                    ArrayList arrayList = new ArrayList();
                    for (int i = 0; i < kfJumpSources.size(); i++) {
                        KfJumpSource kfJumpSource = kfJumpSources.get(i);
                        if (kfJumpSource != null) {
                            OctopusJumpSource octopusJumpSource = new OctopusJumpSource();
                            octopusJumpSource.sourceId = kfJumpSource.getSourceId();
                            octopusJumpSource.orderNo = kfJumpSource.getOrderNo();
                            arrayList.add(octopusJumpSource);
                        }
                    }
                    octopusSourceInfo.setJumpSourceList(arrayList);
                }
                octopusConsultSource.sourceInfo = octopusSourceInfo;
            }
            if (kfChatOption.productInfo != null) {
                OctopusProductInfo octopusProductInfo = new OctopusProductInfo();
                octopusProductInfo.spuId = kfChatOption.productInfo.getSpuId();
                octopusProductInfo.picture = kfChatOption.productInfo.getLogoUrl();
                octopusProductInfo.price = kfChatOption.productInfo.getPrice();
                octopusProductInfo.skuName = kfChatOption.productInfo.getSkuName();
                octopusProductInfo.brandId = kfChatOption.productInfo.getBrandId();
                octopusProductInfo.brandLogo = kfChatOption.productInfo.getBrandLogo();
                octopusProductInfo.brandName = kfChatOption.productInfo.getBrandName();
                octopusProductInfo.soldNum = kfChatOption.productInfo.getSoldNum();
                octopusProductInfo.url = kfChatOption.productInfo.getUrl();
                octopusProductInfo.productSizeFlag = kfChatOption.productInfo.getProductSizeFlag();
                octopusConsultSource.productInfo = octopusProductInfo;
            }
            if (kfChatOption.orderQuestionInfo != null) {
                OctopusOrderQuestionInfo octopusOrderQuestionInfo = new OctopusOrderQuestionInfo();
                octopusOrderQuestionInfo.questionId = kfChatOption.orderQuestionInfo.getId();
                octopusOrderQuestionInfo.questionContent = kfChatOption.orderQuestionInfo.getContent();
                octopusConsultSource.orderQuestionInfo = octopusOrderQuestionInfo;
            }
            if (kfChatOption.orderDetail != null) {
                OctopusOrderInfo octopusOrderInfo = new OctopusOrderInfo();
                octopusOrderInfo.setOrderNum(kfChatOption.orderDetail.getOrderNum());
                octopusOrderInfo.setPicture(kfChatOption.orderDetail.getPicture());
                octopusOrderInfo.setPrice(kfChatOption.orderDetail.getPrice());
                octopusOrderInfo.setSkuProp(kfChatOption.orderDetail.getSkuProp());
                octopusOrderInfo.setSkuQuantity(kfChatOption.orderDetail.getSkuQuantity());
                octopusOrderInfo.setTitle(kfChatOption.orderDetail.getTitle());
                octopusOrderInfo.setTradeStatus(kfChatOption.orderDetail.getTradeStatus());
                if ("10006".equals(kfChatOption.sourceId)) {
                    octopusOrderInfo.setType(1);
                }
                octopusOrderInfo.setRouteUrl(kfChatOption.orderDetail.getRouteUrl());
                octopusOrderInfo.setOrderSource(kfChatOption.orderDetail.getOrderSource());
                octopusOrderInfo.setCreateTime(kfChatOption.orderDetail.getCreateTime());
                octopusConsultSource.orderInfo = octopusOrderInfo;
            }
            String str = octopusConsultSource.sourceId;
            if (str != null) {
                char c5 = 65535;
                switch (str.hashCode()) {
                    case 46730196:
                        if (str.equals("10014")) {
                            c5 = 0;
                            break;
                        }
                        break;
                    case 46730197:
                        if (str.equals("10015")) {
                            c5 = 1;
                            break;
                        }
                        break;
                    case 46730198:
                        if (str.equals("10016")) {
                            c5 = 2;
                            break;
                        }
                        break;
                    case 46730199:
                        if (str.equals("10017")) {
                            c5 = 3;
                            break;
                        }
                        break;
                    case 46730200:
                        if (str.equals("10018")) {
                            c5 = 4;
                            break;
                        }
                        break;
                    case 46730201:
                        if (str.equals("10019")) {
                            c5 = 5;
                            break;
                        }
                        break;
                    case 46730223:
                        if (str.equals("10020")) {
                            c5 = 6;
                            break;
                        }
                        break;
                    case 46730224:
                        if (str.equals("10021")) {
                            c5 = 7;
                            break;
                        }
                        break;
                    case 46730225:
                        if (str.equals("10022")) {
                            c5 = '\b';
                            break;
                        }
                        break;
                }
                switch (c5) {
                    case 0:
                        OctopusOrderParams octopusOrderParams = new OctopusOrderParams();
                        octopusConsultSource.orderParams = octopusOrderParams;
                        octopusOrderParams.orderTypes = new ArrayList();
                        octopusConsultSource.orderParams.orderTypes.add(new OctopusOrderParams.OrderType("买家订单", 0));
                        octopusConsultSource.orderParams.orderTypes.add(new OctopusOrderParams.OrderType("卖家订单", 1));
                        break;
                    case 1:
                    case 2:
                        OctopusOrderParams octopusOrderParams2 = new OctopusOrderParams();
                        octopusConsultSource.orderParams = octopusOrderParams2;
                        octopusOrderParams2.orderTypes = new ArrayList();
                        octopusConsultSource.orderParams.orderTypes.add(new OctopusOrderParams.OrderType("我的洗护订单"));
                        break;
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                    case 7:
                    case '\b':
                        OctopusOrderParams octopusOrderParams3 = new OctopusOrderParams();
                        octopusConsultSource.orderParams = octopusOrderParams3;
                        octopusOrderParams3.orderTypes = new ArrayList();
                        octopusConsultSource.orderParams.orderTypes.add(new OctopusOrderParams.OrderType("抽盒订单"));
                        break;
                }
            }
            String str2 = kfChatOption.title;
            if (!PatchProxy.proxy(new Object[]{context, str2, octopusConsultSource}, this, changeQuickRedirect, false, 320612, new Class[]{Context.class, String.class, OctopusConsultSource.class}, Void.TYPE).isSupported) {
                if (TextUtils.isEmpty(str2)) {
                    str2 = context.getString(R.string.du_app_kf_title);
                }
                UsersModel usersModel = (UsersModel) ServiceManager.d().getUserInfo();
                if (usersModel != null) {
                    octopusConsultSource.userAvatar = usersModel.icon;
                }
                if (!PatchProxy.proxy(new Object[]{context, str2, octopusConsultSource}, null, b.changeQuickRedirect, true, 23128, new Class[]{Context.class, String.class, OctopusConsultSource.class}, Void.TYPE).isSupported) {
                    n.c("CUSTOM_LOG", "startChatting:source=" + octopusConsultSource);
                    n.c("customer_dpm", "startChatting time=" + SystemClock.elapsedRealtime());
                    if ("10013".equals(octopusConsultSource.sourceId)) {
                        BizConversationActivity.l.a(context, str2, octopusConsultSource);
                    } else if ("10002".equals(octopusConsultSource.sourceId) || "10004".equals(octopusConsultSource.sourceId) || "10033".equals(octopusConsultSource.sourceId) || "10030".equals(octopusConsultSource.sourceId)) {
                        uk.f customerContext = com.shizhuang.duapp.libs.customer_service.service.a.a0().getCustomerContext();
                        HashMap<String, Object> hashMap = new HashMap<>();
                        hashMap.put("spuid", octopusConsultSource.spuId);
                        hashMap.put("deviceId", customerContext.b);
                        hashMap.put("version", customerContext.f38999a);
                        hashMap.put("channel", "10001");
                        hashMap.put("source", octopusConsultSource.sourceId);
                        hashMap.put("orderNum", octopusConsultSource.orderNo);
                        try {
                            hashMap.put("userId", Integer.valueOf(Integer.parseInt(ei1.e.b().a().f35613a)));
                        } catch (Exception e) {
                            e.printStackTrace();
                        }
                        OctopusHttpHelper a5 = bl.b.f1722a.a();
                        if (a5 != null) {
                            a5.request("/api/v1/app/kefu-msd-gateway/businessmen/query/merchantCustomerServiceConfig", hashMap, new com.shizhuang.duapp.libs.customer_service.api.a(context, octopusConsultSource, str2));
                        }
                    } else {
                        b.i(context, str2, octopusConsultSource);
                    }
                }
            }
        }
    }

    @Override // com.shizhuang.duapp.modules.router.service.IServizioService
    public void startConversionListActivity(Context context, KfChatOption kfChatOption) {
        if (!PatchProxy.proxy(new Object[]{context, kfChatOption}, this, changeQuickRedirect, false, 320614, new Class[]{Context.class, KfChatOption.class}, Void.TYPE).isSupported && kfChatOption != null) {
            OctopusConsultSource octopusConsultSource = new OctopusConsultSource(kfChatOption.uri, kfChatOption.title);
            octopusConsultSource.sourceId = kfChatOption.sourceId;
            octopusConsultSource.productCategory = kfChatOption.productCategory;
            octopusConsultSource.spuId = kfChatOption.spuId;
            octopusConsultSource.orderNo = kfChatOption.orderNo;
            octopusConsultSource.articleNumber = kfChatOption.articleNumber;
            octopusConsultSource.sessionStart = kfChatOption.sessionStart;
            if (kfChatOption.productInfo != null) {
                OctopusProductInfo octopusProductInfo = new OctopusProductInfo();
                octopusProductInfo.spuId = kfChatOption.productInfo.getSpuId();
                octopusProductInfo.picture = kfChatOption.productInfo.getLogoUrl();
                octopusProductInfo.price = kfChatOption.productInfo.getPrice();
                octopusProductInfo.skuName = kfChatOption.productInfo.getSkuName();
                octopusProductInfo.brandId = kfChatOption.productInfo.getBrandId();
                octopusProductInfo.brandLogo = kfChatOption.productInfo.getBrandLogo();
                octopusProductInfo.brandName = kfChatOption.productInfo.getBrandName();
                octopusProductInfo.soldNum = kfChatOption.productInfo.getSoldNum();
                octopusProductInfo.url = kfChatOption.productInfo.getUrl();
                octopusProductInfo.productSizeFlag = kfChatOption.productInfo.getProductSizeFlag();
                octopusConsultSource.productInfo = octopusProductInfo;
            }
            if (kfChatOption.orderDetail != null) {
                OctopusOrderInfo octopusOrderInfo = new OctopusOrderInfo();
                octopusOrderInfo.setOrderNum(kfChatOption.orderDetail.getOrderNum());
                octopusOrderInfo.setPicture(kfChatOption.orderDetail.getPicture());
                octopusOrderInfo.setPrice(kfChatOption.orderDetail.getPrice());
                octopusOrderInfo.setSkuProp(kfChatOption.orderDetail.getSkuProp());
                octopusOrderInfo.setSkuQuantity(kfChatOption.orderDetail.getSkuQuantity());
                octopusOrderInfo.setTitle(kfChatOption.orderDetail.getTitle());
                octopusOrderInfo.setTradeStatus(kfChatOption.orderDetail.getTradeStatus());
                if ("10006".equals(kfChatOption.sourceId)) {
                    octopusOrderInfo.setType(1);
                }
                octopusOrderInfo.setRouteUrl(kfChatOption.orderDetail.getRouteUrl());
                octopusOrderInfo.setOrderSource(kfChatOption.orderDetail.getOrderSource());
                octopusOrderInfo.setCreateTime(kfChatOption.orderDetail.getCreateTime());
                octopusConsultSource.orderInfo = octopusOrderInfo;
            }
            String str = octopusConsultSource.sourceId;
            if (str != null) {
                char c5 = 65535;
                switch (str.hashCode()) {
                    case 46730196:
                        if (str.equals("10014")) {
                            c5 = 0;
                            break;
                        }
                        break;
                    case 46730197:
                        if (str.equals("10015")) {
                            c5 = 1;
                            break;
                        }
                        break;
                    case 46730198:
                        if (str.equals("10016")) {
                            c5 = 2;
                            break;
                        }
                        break;
                    case 46730199:
                        if (str.equals("10017")) {
                            c5 = 3;
                            break;
                        }
                        break;
                    case 46730200:
                        if (str.equals("10018")) {
                            c5 = 4;
                            break;
                        }
                        break;
                    case 46730201:
                        if (str.equals("10019")) {
                            c5 = 5;
                            break;
                        }
                        break;
                    case 46730223:
                        if (str.equals("10020")) {
                            c5 = 6;
                            break;
                        }
                        break;
                    case 46730224:
                        if (str.equals("10021")) {
                            c5 = 7;
                            break;
                        }
                        break;
                    case 46730225:
                        if (str.equals("10022")) {
                            c5 = '\b';
                            break;
                        }
                        break;
                }
                switch (c5) {
                    case 0:
                        OctopusOrderParams octopusOrderParams = new OctopusOrderParams();
                        octopusConsultSource.orderParams = octopusOrderParams;
                        octopusOrderParams.orderTypes = new ArrayList();
                        octopusConsultSource.orderParams.orderTypes.add(new OctopusOrderParams.OrderType("买家订单", 0));
                        octopusConsultSource.orderParams.orderTypes.add(new OctopusOrderParams.OrderType("卖家订单", 1));
                        break;
                    case 1:
                    case 2:
                        OctopusOrderParams octopusOrderParams2 = new OctopusOrderParams();
                        octopusConsultSource.orderParams = octopusOrderParams2;
                        octopusOrderParams2.orderTypes = new ArrayList();
                        octopusConsultSource.orderParams.orderTypes.add(new OctopusOrderParams.OrderType("我的洗护订单"));
                        break;
                    case 3:
                    case 4:
                    case 5:
                    case 6:
                    case 7:
                    case '\b':
                        OctopusOrderParams octopusOrderParams3 = new OctopusOrderParams();
                        octopusConsultSource.orderParams = octopusOrderParams3;
                        octopusOrderParams3.orderTypes = new ArrayList();
                        octopusConsultSource.orderParams.orderTypes.add(new OctopusOrderParams.OrderType("抽盒订单"));
                        break;
                }
            }
            String str2 = kfChatOption.title;
            if (!PatchProxy.proxy(new Object[]{context, str2, octopusConsultSource}, null, b.changeQuickRedirect, true, 23127, new Class[]{Context.class, String.class, OctopusConsultSource.class}, Void.TYPE).isSupported) {
                BizConversationActivity.l.a(context, str2, octopusConsultSource);
            }
        }
    }

    @Override // com.shizhuang.duapp.modules.router.service.IServizioService
    public void startCustomerServiceCenterActivity(@NonNull Context context, @NonNull KfChatOption kfChatOption) {
        if (!PatchProxy.proxy(new Object[]{context, kfChatOption}, this, changeQuickRedirect, false, 320615, new Class[]{Context.class, KfChatOption.class}, Void.TYPE).isSupported) {
            JSONObject jSONObject = new JSONObject();
            jSONObject.put("sourceId", (Object) kfChatOption.sourceId);
            u91.e.C(context, "https://m.poizon.com/router/mini/open?miniId=customer_service&options=" + jSONObject.toJSONString());
        }
    }

    @Override // com.shizhuang.duapp.modules.router.service.IServizioService
    public void startServiceOrderListActivity(@NonNull Context context, int i, String str) {
        if (!PatchProxy.proxy(new Object[]{context, new Integer(i), str}, this, changeQuickRedirect, false, 320616, new Class[]{Context.class, Integer.TYPE, String.class}, Void.TYPE).isSupported) {
            h.b.g("/servizio/OrderListPage", "serviceType", i, "serviceTypeDes", str).navigation(context);
        }
    }
}