Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
huangzhicong
/
SmartCanteen
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e9f2136f
authored
May 28, 2020
by
pye52
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1、更新文档,增加客户端上传日志的指令说明
2、去掉离线支付的时间间隔限制(每次重连完毕都会尝试扫描离线订单) 3、更新第三方库版本
parent
71ca66c6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 additions
and
11 deletions
+1
-11
app/build.gradle
+1
-1
app/src/main/java/com/bgycc/smartcanteen/viewModel/PayOfflineViewModel.java
+0
-10
智慧食堂开发文档.docx
+0
-0
No files found.
app/build.gradle
View file @
e9f2136f
...
...
@@ -116,7 +116,7 @@ dependencies {
androidTestImplementation
'androidx.test.ext:junit:1.1.1'
androidTestImplementation
'androidx.test.espresso:espresso-core:3.2.0'
implementation
"org.java-websocket:Java-WebSocket:1.5.1"
implementation
'com.blankj:utilcodex:1.2
8.4
'
implementation
'com.blankj:utilcodex:1.2
9.0
'
def
okhttp_version
=
"4.6.0"
implementation
"com.squareup.okhttp3:okhttp:$okhttp_version"
implementation
"com.squareup.okhttp3:logging-interceptor:$okhttp_version"
...
...
app/src/main/java/com/bgycc/smartcanteen/viewModel/PayOfflineViewModel.java
View file @
e9f2136f
...
...
@@ -103,21 +103,11 @@ public class PayOfflineViewModel extends ViewModel {
private
static
final
String
RESPONSE_SUCCESS
=
"0"
;
// 每心跳多少次后进行一次离线订单检测
private
static
final
int
PAY_OFFLINE_CHECK
=
30
;
// 当链接频繁断开时,给予离线订单检测一定缓冲时间
private
static
final
long
PAY_OFFLINE_INTERVAL
=
30
*
60
*
1000
;
private
long
lastPayTime
=
-
1
;
private
int
heartbeatCount
=
0
;
@Override
public
void
onOpen
(
ServerHandshake
data
)
{
heartbeatCount
=
0
;
long
currentTime
=
System
.
currentTimeMillis
();
if
((
currentTime
-
lastPayTime
)
<
PAY_OFFLINE_INTERVAL
)
{
LogUtils
.
w
(
TAG
,
"离线检测过于频繁,可能是链接频繁断开导致"
);
return
;
}
lastPayTime
=
currentTime
;
traversalPayOfflineData
();
}
...
...
智慧食堂开发文档.docx
View file @
e9f2136f
No preview for this file type
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