得物.apk(点击下载) / SellerValidHelper.java
package com.shizhuang.duapp.modules.mall_seller.sell.apply_sell.helper;
import android.app.Activity;
import android.text.TextUtils;
import androidx.fragment.app.FragmentActivity;
import com.afollestad.materialdialogs.DialogAction;
import com.afollestad.materialdialogs.MaterialDialog;
import com.meituan.robust.ChangeQuickRedirect;
import com.meituan.robust.PatchProxy;
import com.meituan.robust.PatchProxyResult;
import com.shizhuang.duapp.modules.du_mall_common.dialog.LimitBiddingDialogContent;
import com.shizhuang.duapp.modules.du_mall_common.dialog.MallBidRiskDialog;
import com.shizhuang.duapp.modules.du_mall_common.model.mall.BidArticleNumberTipsModel;
import com.shizhuang.duapp.modules.du_mall_common.model.mall.BiddingValidModel;
import com.shizhuang.duapp.modules.mall_seller.http.SellerFacade;
import dv0.c;
import dv0.d;
import dv0.f;
import kotlin.Metadata;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import td.p;
import u91.e;
/* compiled from: SellerValidHelper.kt */
public final class SellerValidHelper {
public static ChangeQuickRedirect changeQuickRedirect;
@Nullable
/* renamed from: a reason: collision with root package name */
public OnSellerValidListener f20492a;
public final FragmentActivity b;
@Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u0002\n\u0000\bf\u0018\u00002\u00020\u0001J\b\u0010\u0002\u001a\u00020\u0003H&¨\u0006\u0004"}, d2 = {"Lcom/shizhuang/duapp/modules/mall_seller/sell/apply_sell/helper/SellerValidHelper$OnSellerValidListener;", "", "onSellerValidSuccess", "", "du_mall_seller_release"}, k = 1, mv = {1, 4, 2})
/* compiled from: SellerValidHelper.kt */
public interface OnSellerValidListener {
void onSellerValidSuccess();
}
/* compiled from: SellerValidHelper.kt */
public static final class a implements MaterialDialog.SingleButtonCallback {
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ SellerValidHelper b;
public a(SellerValidHelper sellerValidHelper) {
this.b = sellerValidHelper;
}
@Override // com.afollestad.materialdialogs.MaterialDialog.SingleButtonCallback
public final void onClick(@NotNull MaterialDialog materialDialog, @NotNull DialogAction dialogAction) {
if (!PatchProxy.proxy(new Object[]{materialDialog, dialogAction}, this, changeQuickRedirect, false, 230118, new Class[]{MaterialDialog.class, DialogAction.class}, Void.TYPE).isSupported) {
e.S(this.b.b, "https://m.dewu.com/hybird/h5merchant/merchantEnterIntroduction");
}
}
}
/* compiled from: SellerValidHelper.kt */
public static final class b extends p<BiddingValidModel> {
public static ChangeQuickRedirect changeQuickRedirect;
public final /* synthetic */ SellerValidHelper b;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public b(SellerValidHelper sellerValidHelper, Activity activity, boolean z) {
super(activity, z);
this.b = sellerValidHelper;
}
@Override // com.shizhuang.duapp.common.helper.net.facade.IViewHandler, td.a
public void onSuccess(Object obj) {
BiddingValidModel biddingValidModel = (BiddingValidModel) obj;
if (!PatchProxy.proxy(new Object[]{biddingValidModel}, this, changeQuickRedirect, false, 230120, new Class[]{BiddingValidModel.class}, Void.TYPE).isSupported) {
super.onSuccess(biddingValidModel);
SellerValidHelper sellerValidHelper = this.b;
if (PatchProxy.proxy(new Object[]{biddingValidModel}, sellerValidHelper, SellerValidHelper.changeQuickRedirect, false, 230116, new Class[]{BiddingValidModel.class}, Void.TYPE).isSupported || biddingValidModel == null) {
return;
}
if (biddingValidModel.isMerchant == 1) {
if (!TextUtils.isEmpty(biddingValidModel.serviceUpdateTips)) {
MaterialDialog.b bVar = new MaterialDialog.b(sellerValidHelper.b);
bVar.b = "卖家服务规则更新通知";
bVar.b(biddingValidModel.serviceUpdateTips);
bVar.l = "修改卖家服务";
bVar.f2882u = new dv0.b(sellerValidHelper);
bVar.l();
} else if (!sellerValidHelper.a(biddingValidModel)) {
sellerValidHelper.b(biddingValidModel);
}
} else if (biddingValidModel.userRealName == 0) {
e.G0(sellerValidHelper.b, false);
} else if (biddingValidModel.isSettingService == 0) {
qf1.a.t("100101");
MaterialDialog.b bVar2 = new MaterialDialog.b(sellerValidHelper.b);
bVar2.b = "完善身份信息";
bVar2.b(biddingValidModel.merchantTips);
bVar2.l = "立即完善";
bVar2.n = "稍后再说";
bVar2.f2882u = new c(sellerValidHelper);
bVar2.f2883v = d.b;
bVar2.l();
} else if (biddingValidModel.isRecharge == 1) {
qf1.a.t("300105");
MaterialDialog.b bVar3 = new MaterialDialog.b(sellerValidHelper.b);
bVar3.b(biddingValidModel.isRechargeTip);
bVar3.l = "去充值";
bVar3.n = "取消";
bVar3.f2882u = dv0.e.b;
bVar3.f2883v = f.b;
bVar3.l();
} else if (!sellerValidHelper.a(biddingValidModel)) {
sellerValidHelper.b(biddingValidModel);
}
}
}
}
public SellerValidHelper(@NotNull FragmentActivity fragmentActivity) {
this.b = fragmentActivity;
}
public final boolean a(BiddingValidModel biddingValidModel) {
PatchProxyResult proxy = PatchProxy.proxy(new Object[]{biddingValidModel}, this, changeQuickRedirect, false, 230117, new Class[]{BiddingValidModel.class}, Boolean.TYPE);
if (proxy.isSupported) {
return ((Boolean) proxy.result).booleanValue();
}
int i = biddingValidModel.checkBiddingAuth;
if (i == 1 && biddingValidModel.showCheckBiddingAuthLink) {
MaterialDialog.b bVar = new MaterialDialog.b(this.b);
bVar.b = "该商品限制出价";
bVar.e(new LimitBiddingDialogContent(this.b, null, 0, 6).a(biddingValidModel.checkBiddingAuthTip), true);
bVar.n = "取消";
bVar.l = "入驻企业商家";
bVar.f2882u = new a(this);
bVar.l();
return true;
} else if (i != 1) {
return false;
} else {
MaterialDialog.b bVar2 = new MaterialDialog.b(this.b);
bVar2.b = "该商品限制出价";
bVar2.b(biddingValidModel.checkBiddingAuthTip);
bVar2.l = "我知道了";
bVar2.l();
return true;
}
}
public final void b(BiddingValidModel biddingValidModel) {
if (!PatchProxy.proxy(new Object[]{biddingValidModel}, this, changeQuickRedirect, false, 230115, new Class[]{BiddingValidModel.class}, Void.TYPE).isSupported) {
BidArticleNumberTipsModel bidArticleNumberTipsModel = biddingValidModel.articleNumberTips;
if (bidArticleNumberTipsModel != null) {
MallBidRiskDialog a5 = MallBidRiskDialog.f13369h.a(bidArticleNumberTipsModel);
a5.x(new SellerValidHelper$checkIsRisk$$inlined$let$lambda$1(this));
a5.k(this.b.getSupportFragmentManager());
return;
}
OnSellerValidListener onSellerValidListener = this.f20492a;
if (onSellerValidListener != null) {
onSellerValidListener.onSellerValidSuccess();
}
}
}
public final void c(long j) {
if (!PatchProxy.proxy(new Object[]{new Long(j)}, this, changeQuickRedirect, false, 230114, new Class[]{Long.TYPE}, Void.TYPE).isSupported) {
SellerFacade.f20177a.H(j, 1, new b(this, this.b, false));
}
}
public final void d(@Nullable OnSellerValidListener onSellerValidListener) {
if (!PatchProxy.proxy(new Object[]{onSellerValidListener}, this, changeQuickRedirect, false, 230113, new Class[]{OnSellerValidListener.class}, Void.TYPE).isSupported) {
this.f20492a = onSellerValidListener;
}
}
}