Commit 5e18b93a authored by zhang_z's avatar zhang_z

常量;

parent 5b0832cc
......@@ -581,4 +581,9 @@ public class C {
public static final int ADD_SKU = 7;
public static final int SKU_EDITOR = 8;
}
public final class PAY_STATE {
public static final String PAYING = "0098";
public static final String SUCC = "0000";
}
}
......@@ -2,7 +2,6 @@ package com.xingdata.zzdpos.ui.settle;
import com.alibaba.fastjson.JSON;
import com.blankj.utilcode.util.StringUtils;
import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.api.print.ZX_PrintPOS;
import com.xingdata.zzdpos.C;
......@@ -259,10 +258,10 @@ public class SettlePresenter extends SettleContract.Presenter {
response -> {
com.xingdata.zzdpos.api.Pay.Response r1 = JSON.parseObject(response.replace("\\", ""), com.xingdata.zzdpos.api.Pay.Response.class);
switch (r1.getResponseCode()) {
case "0000":
case C.PAY_STATE.SUCC:
subscribePay(commitOrder().flatMap(orderNo -> ApiFactory.Saleorder.addOrderPayMis(mSaleorder.pay(orderNo, C.PAY_CHANNEL.WECHAT)).doFinally(() -> mView.dismissLoadingDialog())));
break;
case "0098":
case C.PAY_STATE.PAYING:
mView.showPayingDialog(C.PAY_CHANNEL.WECHAT, r1);
break;
default:
......@@ -309,10 +308,10 @@ public class SettlePresenter extends SettleContract.Presenter {
.subscribe(s -> {
com.xingdata.zzdpos.api.Pay.Response r1 = JSON.parseObject(s.replace("\\", ""), com.xingdata.zzdpos.api.Pay.Response.class);
switch (r1.getResponseCode()) {
case "0000":
case C.PAY_STATE.SUCC:
subscribePay(commitOrder().flatMap(orderNo -> ApiFactory.Saleorder.addOrderPayMis(mSaleorder.pay(orderNo, payType)).doFinally(() -> mView.dismissLoadingDialog())));
break;
case "0098":
case C.PAY_STATE.PAYING:
mView.showMsg("交易处理中");
break;
default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment