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


package com.shizhuang.duapp.modules.merchant_cash_loan.ui.activity;

import android.os.Bundle;
import android.os.CountDownTimer;
import android.view.View;
import android.widget.TextView;
import androidx.annotation.Keep;
import com.alibaba.android.arouter.facade.annotation.Autowired;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.knightboost.weaver.api.Scope;
import com.knightboost.weaver.api.annotations.Insert;
import com.knightboost.weaver.api.annotations.TargetClass;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.shizhuang.duapp.R;
import com.shizhuang.duapp.common.ui.BaseLeftBackActivity;
import com.shizhuang.duapp.libs.duimageloaderview.DuImageLoaderView;
import com.shizhuang.duapp.modules.merchant_cash_loan.MCLTransferStatus;
import com.shizhuang.duapp.modules.merchant_cash_loan.MCLTransferVerifyType;
import com.shizhuang.duapp.modules.merchant_cash_loan.event.MClTransSuccessEvent;
import com.shizhuang.duapp.modules.merchant_cash_loan.model.MClTransResultModel;
import java.util.Arrays;
import java.util.HashMap;
import jn.b;
import kotlin.Lazy;
import kotlin.LazyKt__LazyJVMKt;
import kotlin.Metadata;
import kotlin.jvm.JvmField;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.StringCompanionObject;
import org.greenrobot.eventbus.EventBus;
import org.jetbrains.annotations.Nullable;

@Route(path = "/mclCashLoan/MCLTransferResultActivity")
@Metadata(bv = {}, d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0007\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003¨\u0006\u0004"}, d2 = {"Lcom/shizhuang/duapp/modules/merchant_cash_loan/ui/activity/MClTransferResultActivity;", "Lcom/shizhuang/duapp/common/ui/BaseLeftBackActivity;", "<init>", "()V", "du_merchant_cash_loan_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: MClTransferResultActivity.kt */
public final class MClTransferResultActivity extends BaseLeftBackActivity {
    public static ChangeQuickRedirect changeQuickRedirect;
    @Autowired(name = "transNo")
    @JvmField
    @Nullable

    /* renamed from: c  reason: collision with root package name */
    public String f20636c = "";
    @Autowired(name = "transType")
    @JvmField
    @Nullable
    public String d = "";
    public boolean e;
    public boolean f = true;

    /* renamed from: g  reason: collision with root package name */
    public final Lazy f20637g = LazyKt__LazyJVMKt.lazy(new MClTransferResultActivity$countDownTimer$2(this));

    /* renamed from: h  reason: collision with root package name */
    public HashMap f20638h;

    public class _boostWeave {
        public static ChangeQuickRedirect changeQuickRedirect;

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
        @Insert(mayCreateSuper = true, value = "onCreate")
        @Keep
        public static void ActivityMethodWeaver_onCreate(@androidx.annotation.Nullable MClTransferResultActivity mClTransferResultActivity, Bundle bundle) {
            if (!PatchProxy.proxy(new Object[]{mClTransferResultActivity, bundle}, null, changeQuickRedirect, true, 234198, new Class[]{MClTransferResultActivity.class, Bundle.class}, Void.TYPE).isSupported) {
                b bVar = b.f34396a;
                if (!bVar.b()) {
                    bVar.d(true);
                }
                long currentTimeMillis = System.currentTimeMillis();
                MClTransferResultActivity.d(mClTransferResultActivity, bundle);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (mClTransferResultActivity.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.merchant_cash_loan.ui.activity.MClTransferResultActivity")) {
                    bVar.activityOnCreateMethod(mClTransferResultActivity, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
        @Insert(mayCreateSuper = true, value = "onResume")
        @Keep
        public static void ActivityMethodWeaver_onResume(MClTransferResultActivity mClTransferResultActivity) {
            if (!PatchProxy.proxy(new Object[]{mClTransferResultActivity}, null, changeQuickRedirect, true, 234200, new Class[]{MClTransferResultActivity.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                MClTransferResultActivity.f(mClTransferResultActivity);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (mClTransferResultActivity.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.merchant_cash_loan.ui.activity.MClTransferResultActivity")) {
                    b.f34396a.activityOnResumeMethod(mClTransferResultActivity, currentTimeMillis, currentTimeMillis2);
                }
            }
        }

        @TargetClass(scope = Scope.ALL_CHILDREN, value = "androidx.appcompat.app.AppCompatActivity")
        @Insert(mayCreateSuper = true, value = "onStart")
        @Keep
        public static void ActivityMethodWeaver_onStart(MClTransferResultActivity mClTransferResultActivity) {
            if (!PatchProxy.proxy(new Object[]{mClTransferResultActivity}, null, changeQuickRedirect, true, 234199, new Class[]{MClTransferResultActivity.class}, Void.TYPE).isSupported) {
                long currentTimeMillis = System.currentTimeMillis();
                MClTransferResultActivity.e(mClTransferResultActivity);
                long currentTimeMillis2 = System.currentTimeMillis();
                if (mClTransferResultActivity.getClass().getCanonicalName().equals("com.shizhuang.duapp.modules.merchant_cash_loan.ui.activity.MClTransferResultActivity")) {
                    b.f34396a.activityOnStartMethod(mClTransferResultActivity, currentTimeMillis, currentTimeMillis2);
                }
            }
        }
    }

    public static void d(MClTransferResultActivity mClTransferResultActivity, Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, mClTransferResultActivity, changeQuickRedirect, false, 234192, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            super.onCreate(bundle);
        }
    }

    public static void e(MClTransferResultActivity mClTransferResultActivity) {
        if (!PatchProxy.proxy(new Object[0], mClTransferResultActivity, changeQuickRedirect, false, 234194, new Class[0], Void.TYPE).isSupported) {
            super.onStart();
        }
    }

    public static void f(MClTransferResultActivity mClTransferResultActivity) {
        if (!PatchProxy.proxy(new Object[0], mClTransferResultActivity, changeQuickRedirect, false, 234196, new Class[0], Void.TYPE).isSupported) {
            super.onResume();
        }
    }

    public View _$_findCachedViewById(int i) {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[]{new Integer(i)}, this, changeQuickRedirect, false, 234189, new Class[]{Integer.TYPE}, View.class);
        if (proxy.isSupported) {
            return (View) proxy.result;
        }
        if (this.f20638h == null) {
            this.f20638h = new HashMap();
        }
        View view = (View) this.f20638h.get(Integer.valueOf(i));
        if (view != null) {
            return view;
        }
        View findViewById = findViewById(i);
        this.f20638h.put(Integer.valueOf(i), findViewById);
        return findViewById;
    }

    public final void g() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 234187, new Class[0], Void.TYPE).isSupported) {
            h().cancel();
            this.e = false;
            this.f = true;
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public int getLayout() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 234183, new Class[0], Integer.TYPE);
        return proxy.isSupported ? ((Integer) proxy.result).intValue() : R.layout.activity_mcl_transfer_reslut;
    }

    public final CountDownTimer h() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 234170, new Class[0], CountDownTimer.class);
        return (CountDownTimer) (proxy.isSupported ? proxy.result : this.f20637g.getValue());
    }

    public final void i() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 234173, new Class[0], Void.TYPE).isSupported && this.e) {
            this.f = true;
            l();
            g();
        }
    }

    @Override // com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public void initData() {
        boolean z = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 234184, new Class[0], Void.TYPE).isSupported;
    }

    @Override // com.shizhuang.duapp.common.ui.BaseLeftBackActivity, com.shizhuang.duapp.common.ui.BaseActivity, com.shizhuang.duapp.common.base.inter.IViewController
    public void initView(@Nullable Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 234185, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            super.initView(bundle);
            this.e = true;
            if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 234181, new Class[0], Void.TYPE).isSupported) {
                ((DuImageLoaderView) _$_findCachedViewById(R.id.img)).i("https://cdn.poizon.com/node-common/5abf914d8316761d7556da6384193365.gif").x();
            }
            h().start();
            ((TextView) _$_findCachedViewById(R.id.tv_to_bill)).setOnClickListener(new MClTransferResultActivity$initView$1(this));
        }
    }

    public final void j() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 234171, new Class[0], Void.TYPE).isSupported) {
            this.f = false;
        }
    }

    public final void k(MClTransResultModel mClTransResultModel) {
        if (!PatchProxy.proxy(new Object[]{mClTransResultModel}, this, changeQuickRedirect, false, 234172, new Class[]{MClTransResultModel.class}, Void.TYPE).isSupported && this.e) {
            this.f = true;
            String status = mClTransResultModel.getStatus();
            if (Intrinsics.areEqual(status, MCLTransferStatus.TRANS_STATUS_ING.getStatus())) {
                if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 234180, new Class[0], Void.TYPE).isSupported) {
                    ((TextView) _$_findCachedViewById(R.id.tv_1)).setText(getString(R.string.mcl_trans_ing));
                    ((TextView) _$_findCachedViewById(R.id.tv_1)).setTextColor(getResources().getColor(R.color.fs_color_blue_01c2c3));
                    ((TextView) _$_findCachedViewById(R.id.tv_2)).setText(getString(R.string.mcl_do_not_repeat_transfer));
                    ((TextView) _$_findCachedViewById(R.id.tv_2)).setVisibility(0);
                    ((TextView) _$_findCachedViewById(R.id.tv_to_bill)).setVisibility(8);
                }
            } else if (Intrinsics.areEqual(status, MCLTransferStatus.TRANS_STATUS_SUCCESS.getStatus())) {
                if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 234179, new Class[0], Void.TYPE).isSupported) {
                    ((DuImageLoaderView) _$_findCachedViewById(R.id.img)).k();
                    ((DuImageLoaderView) _$_findCachedViewById(R.id.img)).h(R.mipmap.mcl_ic_success).x();
                    StringCompanionObject stringCompanionObject = StringCompanionObject.INSTANCE;
                    ((TextView) _$_findCachedViewById(R.id.tv_1)).setText(String.format(getString(R.string.mcl_trans_success), Arrays.copyOf(new Object[]{m()}, 1)));
                    ((TextView) _$_findCachedViewById(R.id.tv_1)).setTextColor(getResources().getColor(R.color.fs_color_blue_01c2c3));
                    ((TextView) _$_findCachedViewById(R.id.tv_2)).setVisibility(4);
                    ((TextView) _$_findCachedViewById(R.id.tv_to_bill)).setText(getString(R.string.mcl_finish));
                    ((TextView) _$_findCachedViewById(R.id.tv_to_bill)).setVisibility(0);
                    EventBus.b().f(new MClTransSuccessEvent());
                }
                g();
            } else if (Intrinsics.areEqual(status, MCLTransferStatus.TRANS_STATUS_FAILED.getStatus())) {
                if (!PatchProxy.proxy(new Object[]{mClTransResultModel}, this, changeQuickRedirect, false, 234178, new Class[]{MClTransResultModel.class}, Void.TYPE).isSupported) {
                    ((DuImageLoaderView) _$_findCachedViewById(R.id.img)).h(R.mipmap.mcl_ic_failed).x();
                    StringCompanionObject stringCompanionObject2 = StringCompanionObject.INSTANCE;
                    ((TextView) _$_findCachedViewById(R.id.tv_1)).setText(String.format(getString(R.string.mcl_trans_failed), Arrays.copyOf(new Object[]{m()}, 1)));
                    ((TextView) _$_findCachedViewById(R.id.tv_1)).setTextColor(getResources().getColor(R.color.fs_color_black_14151a));
                    ((TextView) _$_findCachedViewById(R.id.tv_2)).setVisibility(0);
                    TextView textView = (TextView) _$_findCachedViewById(R.id.tv_2);
                    String content = mClTransResultModel.getContent();
                    if (content == null) {
                        content = "";
                    }
                    textView.setText(content);
                    ((TextView) _$_findCachedViewById(R.id.tv_to_bill)).setText(getString(R.string.mcl_trans_again));
                    ((TextView) _$_findCachedViewById(R.id.tv_to_bill)).setVisibility(0);
                }
                g();
            }
        }
    }

    public final void l() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 234182, new Class[0], Void.TYPE).isSupported) {
            ((DuImageLoaderView) _$_findCachedViewById(R.id.img)).h(R.mipmap.mcl_ic_processing).x();
            ((TextView) _$_findCachedViewById(R.id.tv_1)).setText(R.string.mcl_transfer_processing);
            ((TextView) _$_findCachedViewById(R.id.tv_1)).setTextColor(getResources().getColor(R.color.fs_color_blue_01c2c3));
            ((TextView) _$_findCachedViewById(R.id.tv_2)).setVisibility(0);
            ((TextView) _$_findCachedViewById(R.id.tv_2)).setText(R.string.mcl_do_not_repeat_transfer);
            ((TextView) _$_findCachedViewById(R.id.tv_to_bill)).setVisibility(8);
        }
    }

    public final String m() {
        PatchProxyResult proxy = PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 234177, new Class[0], String.class);
        if (proxy.isSupported) {
            return (String) proxy.result;
        }
        String str = this.d;
        if (Intrinsics.areEqual(str, MCLTransferVerifyType.TRANS_OUT.getType())) {
            return "出";
        }
        return Intrinsics.areEqual(str, MCLTransferVerifyType.TRANS_IN.getType()) ? "入" : "";
    }

    @Override // androidx.activity.ComponentActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onBackPressed() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 234186, new Class[0], Void.TYPE).isSupported) {
            super.onBackPressed();
            setResult(-1);
            finish();
        }
    }

    @Override // androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseLeftBackActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onCreate(Bundle bundle) {
        if (!PatchProxy.proxy(new Object[]{bundle}, this, changeQuickRedirect, false, 234191, new Class[]{Bundle.class}, Void.TYPE).isSupported) {
            _boostWeave.ActivityMethodWeaver_onCreate(this, bundle);
        }
    }

    @Override // androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onDestroy() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 234188, new Class[0], Void.TYPE).isSupported) {
            super.onDestroy();
            g();
        }
    }

    @Override // androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseLeftBackActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onResume() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 234195, new Class[0], Void.TYPE).isSupported) {
            _boostWeave.ActivityMethodWeaver_onResume(this);
        }
    }

    @Override // androidx.appcompat.app.AppCompatActivity, androidx.fragment.app.FragmentActivity, com.shizhuang.duapp.common.ui.BaseLeftBackActivity, com.shizhuang.duapp.common.ui.BaseActivity
    public void onStart() {
        if (!PatchProxy.proxy(new Object[0], this, changeQuickRedirect, false, 234193, new Class[0], Void.TYPE).isSupported) {
            _boostWeave.ActivityMethodWeaver_onStart(this);
        }
    }
}