Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TangKuPos
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王海
TangKuPos
Commits
52997db5
Commit
52997db5
authored
Apr 19, 2018
by
王海
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pos419
parent
9d1c7413
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
49 deletions
+60
-49
app/src/main/java/com/xingdata/zzdpos/base/BaseActivity.java
app/src/main/java/com/xingdata/zzdpos/base/BaseActivity.java
+1
-1
app/src/main/java/com/xingdata/zzdpos/ui/login/fragment/SignInFragment.java
...com/xingdata/zzdpos/ui/login/fragment/SignInFragment.java
+3
-9
app/src/main/java/com/xingdata/zzdpos/ui/statistics/StatisticsDetailActivity.java
...ngdata/zzdpos/ui/statistics/StatisticsDetailActivity.java
+1
-1
app/src/main/java/com/xingdata/zzdpos/ui/statistics/StatisticsDetailContract.java
...ngdata/zzdpos/ui/statistics/StatisticsDetailContract.java
+2
-2
app/src/main/java/com/xingdata/zzdpos/ui/statistics/StatisticsDetailPresenter.java
...gdata/zzdpos/ui/statistics/StatisticsDetailPresenter.java
+22
-6
neptune/src/main/java/com/xingdata/pay/neptune/ipc/C.java
neptune/src/main/java/com/xingdata/pay/neptune/ipc/C.java
+2
-1
neptune/src/main/java/com/xingdata/pay/neptune/ipc/Factory.java
...e/src/main/java/com/xingdata/pay/neptune/ipc/Factory.java
+29
-29
No files found.
app/src/main/java/com/xingdata/zzdpos/base/BaseActivity.java
View file @
52997db5
...
...
@@ -149,7 +149,7 @@ public abstract class BaseActivity<P extends BasePresenter, B extends ViewDataBi
@Override
protected
void
onStop
()
{
C
.
SYSTEM
.
mStateEnable
=
false
;
//
C.SYSTEM.mStateEnable = false;
super
.
onStop
();
}
...
...
app/src/main/java/com/xingdata/zzdpos/ui/login/fragment/SignInFragment.java
View file @
52997db5
...
...
@@ -16,7 +16,6 @@ import com.xingdata.zzdpos.R;
import
com.xingdata.zzdpos.base.BaseActivity
;
import
com.xingdata.zzdpos.base.BaseFragment
;
import
com.xingdata.zzdpos.databinding.FragmentSignInBinding
;
import
com.xingdata.zzdpos.ui.dialog.LoadingDialog
;
import
com.xingdata.zzdpos.ui.dialog.PromptDialog
;
import
com.xingdata.zzdpos.ui.login.LoginPresenter
;
import
com.xingdata.zzdpos.util.OnClickListener
;
...
...
@@ -87,18 +86,13 @@ public class SignInFragment extends BaseFragment<LoginPresenter,
break
;
case
R
.
id
.
btn_login
:
{
if
(
mViewBinding
.
etPwd
.
getText
().
toString
().
isEmpty
()
||
mViewBinding
.
etPhone
.
getText
().
toString
().
isEmpty
())
{
mViewBinding
.
etPhone
.
getText
().
toString
().
isEmpty
())
{
ToastUtils
.
showLong
(
"账号密码不能为空"
);
}
else
{
promptDialog
=
new
PromptDialog
().
setDialogType
(
PromptDialog
.
PROMPTDIALOG_ING
,
"正在登录"
);
promptDialog
=
new
PromptDialog
().
setDialogType
(
PromptDialog
.
PROMPTDIALOG_ING
,
"正在登录"
);
mLoadingDialog
.
show
((
BaseActivity
)
getActivity
());
mPresenter
.
signIn
(
mViewBinding
.
etPhone
.
getText
().
toString
(),
mViewBinding
.
etPwd
.
getText
().
toString
(),
promptDialog
,
mLoadingDialog
);
mViewBinding
.
etPwd
.
getText
().
toString
(),
promptDialog
,
mLoadingDialog
);
}
}
...
...
app/src/main/java/com/xingdata/zzdpos/ui/statistics/StatisticsDetailActivity.java
View file @
52997db5
...
...
@@ -286,7 +286,7 @@ public class StatisticsDetailActivity extends BaseActivity<StatisticsDetailPrese
DialogInterface
.
OnClickListener
()
{
@Override
public
void
onClick
(
DialogInterface
dialogInterface
,
int
i
)
{
mPresenter
.
returnOrder
(
mSaleorder
.
getOrderNo
()
+
""
);
mPresenter
.
returnOrder
(
mSaleorder
);
}
}).
create
().
show
();
...
...
app/src/main/java/com/xingdata/zzdpos/ui/statistics/StatisticsDetailContract.java
View file @
52997db5
...
...
@@ -31,9 +31,9 @@ public interface StatisticsDetailContract {
/**
* 退货
*
* @param
orderId 订单id
* @param
saleorder 订单
*/
public
abstract
void
returnOrder
(
S
tring
orderId
);
public
abstract
void
returnOrder
(
S
aleorder
saleorder
);
}
}
app/src/main/java/com/xingdata/zzdpos/ui/statistics/StatisticsDetailPresenter.java
View file @
52997db5
package
com
.
xingdata
.
zzdpos
.
ui
.
statistics
;
import
com.blankj.utilcode.util.ToastUtils
;
import
com.xingdata.pay.neptune.NeptuneCenter
;
import
com.xingdata.zzdpos.App
;
import
com.xingdata.zzdpos.api.ApiFactory
;
import
com.xingdata.zzdpos.model.Saleorder
;
/**
* Created by Administrator on 2017/12/27.
...
...
@@ -28,12 +31,25 @@ public class StatisticsDetailPresenter extends StatisticsDetailContract.Presente
@Override
public
void
returnOrder
(
String
orderId
)
{
ApiFactory
.
Test
.
returnOrder
(
orderId
).
subscribe
(
s
->
{
ToastUtils
.
showLong
(
"成功"
);
mView
.
returnOrderSuss
();
},
throwable
->
{
ToastUtils
.
showLong
(
throwable
.
getMessage
());
public
void
returnOrder
(
Saleorder
saleorder
)
{
NeptuneCenter
.
getInstance
().
init
(
App
.
instance
).
refund
(
saleorder
.
getOrderNo
(),
saleorder
.
getPayType
(),
saleorder
.
getOrderPayAmt
()).
subscribe
(
response
->
{
switch
(
response
.
getCode
())
{
case
com
.
xingdata
.
zxpay
.
C
.
PAY_STATE
.
SUCCESS
:
ApiFactory
.
Test
.
returnOrder
(
saleorder
.
getOrderNo
()).
subscribe
(
s
->
{
ToastUtils
.
showLong
(
"退货成功"
);
mView
.
returnOrderSuss
();
},
throwable
->
{
ToastUtils
.
showLong
(
throwable
.
getMessage
());
});
break
;
default
:
{
}
break
;
}
});
}
}
neptune/src/main/java/com/xingdata/pay/neptune/ipc/C.java
View file @
52997db5
...
...
@@ -34,7 +34,8 @@ public class C {
/**
* 银联支付
*/
final
static
String
UNIONPAY
=
"CHANPAY"
;
// final static String UNIONPAY = "CHANPAY";
final
static
String
UNIONPAY
=
"BANKCARD"
;
/**
* 微信支付
*/
...
...
neptune/src/main/java/com/xingdata/pay/neptune/ipc/Factory.java
View file @
52997db5
...
...
@@ -162,35 +162,35 @@ public class Factory {
}
break
;
}
new
Thread
(
new
Runnable
()
{
@Override
public
void
run
()
{
while
(
mPayService
==
null
)
{
LogUtils
.
e
(
"PayService获取失败,"
+
C
.
RETRY_DELAY_TIME
+
"ms后尝试重连"
);
if
(
mRetry
<
C
.
RETRY_COUNT
)
{
try
{
Thread
.
sleep
(
C
.
RETRY_DELAY_TIME
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
}
}
IResponse
iResponse
;
String
str
=
null
;
try
{
str
=
mPayService
.
doTrans
(
JSON
.
toJSONString
(
iRequest
));
}
catch
(
RemoteException
e
)
{
e
.
printStackTrace
();
}
try
{
iResponse
=
JSON
.
parseObject
(
str
,
IResponse
.
class
);
}
catch
(
Exception
e
)
{
iResponse
=
new
IResponse
();
}
}
}).
start
();
//
new Thread(new Runnable() {
//
@Override
//
public void run() {
//
while (mPayService == null) {
//
LogUtils.e("PayService获取失败," + C.RETRY_DELAY_TIME + "ms后尝试重连");
//
if (mRetry < C.RETRY_COUNT) {
//
try {
//
Thread.sleep(C.RETRY_DELAY_TIME);
//
} catch (InterruptedException e) {
//
e.printStackTrace();
//
}
//
}
//
}
//
IResponse iResponse;
//
String str = null;
//
try {
//
str = mPayService.doTrans(JSON.toJSONString(iRequest));
//
} catch (RemoteException e) {
//
e.printStackTrace();
//
}
//
try {
//
iResponse = JSON.parseObject(str, IResponse.class);
//
} catch (Exception e) {
//
iResponse = new IResponse();
//
}
//
//
//
}
//
}).start();
return
run
(
Observable
.
just
(
iRequest
).
flatMap
(
iRequest1
->
{
while
(
mPayService
==
null
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment