Commit 5e18b93a authored by zhang_z's avatar zhang_z

常量;

parent 5b0832cc
...@@ -581,4 +581,9 @@ public class C { ...@@ -581,4 +581,9 @@ public class C {
public static final int ADD_SKU = 7; public static final int ADD_SKU = 7;
public static final int SKU_EDITOR = 8; 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; ...@@ -2,7 +2,6 @@ package com.xingdata.zzdpos.ui.settle;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.blankj.utilcode.util.StringUtils;
import com.blankj.utilcode.util.ToastUtils; import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.api.print.ZX_PrintPOS; import com.xingdata.api.print.ZX_PrintPOS;
import com.xingdata.zzdpos.C; import com.xingdata.zzdpos.C;
...@@ -259,10 +258,10 @@ public class SettlePresenter extends SettleContract.Presenter { ...@@ -259,10 +258,10 @@ public class SettlePresenter extends SettleContract.Presenter {
response -> { response -> {
com.xingdata.zzdpos.api.Pay.Response r1 = JSON.parseObject(response.replace("\\", ""), com.xingdata.zzdpos.api.Pay.Response.class); com.xingdata.zzdpos.api.Pay.Response r1 = JSON.parseObject(response.replace("\\", ""), com.xingdata.zzdpos.api.Pay.Response.class);
switch (r1.getResponseCode()) { 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()))); subscribePay(commitOrder().flatMap(orderNo -> ApiFactory.Saleorder.addOrderPayMis(mSaleorder.pay(orderNo, C.PAY_CHANNEL.WECHAT)).doFinally(() -> mView.dismissLoadingDialog())));
break; break;
case "0098": case C.PAY_STATE.PAYING:
mView.showPayingDialog(C.PAY_CHANNEL.WECHAT, r1); mView.showPayingDialog(C.PAY_CHANNEL.WECHAT, r1);
break; break;
default: default:
...@@ -309,10 +308,10 @@ public class SettlePresenter extends SettleContract.Presenter { ...@@ -309,10 +308,10 @@ public class SettlePresenter extends SettleContract.Presenter {
.subscribe(s -> { .subscribe(s -> {
com.xingdata.zzdpos.api.Pay.Response r1 = JSON.parseObject(s.replace("\\", ""), com.xingdata.zzdpos.api.Pay.Response.class); com.xingdata.zzdpos.api.Pay.Response r1 = JSON.parseObject(s.replace("\\", ""), com.xingdata.zzdpos.api.Pay.Response.class);
switch (r1.getResponseCode()) { switch (r1.getResponseCode()) {
case "0000": case C.PAY_STATE.SUCC:
subscribePay(commitOrder().flatMap(orderNo -> ApiFactory.Saleorder.addOrderPayMis(mSaleorder.pay(orderNo, payType)).doFinally(() -> mView.dismissLoadingDialog()))); subscribePay(commitOrder().flatMap(orderNo -> ApiFactory.Saleorder.addOrderPayMis(mSaleorder.pay(orderNo, payType)).doFinally(() -> mView.dismissLoadingDialog())));
break; break;
case "0098": case C.PAY_STATE.PAYING:
mView.showMsg("交易处理中"); mView.showMsg("交易处理中");
break; break;
default: 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