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
73234f6d
authored
May 09, 2020
by
pye52
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新文档及注释离线支付的说明
parent
7e3eab32
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
app/src/main/java/com/bgycc/smartcanteen/viewModel/PayOfflineViewModel.java
+4
-5
智慧食堂开发文档.docx
+0
-0
No files found.
app/src/main/java/com/bgycc/smartcanteen/viewModel/PayOfflineViewModel.java
View file @
73234f6d
...
...
@@ -30,11 +30,10 @@ import static com.bgycc.smartcanteen.utils.SmartCanteenUtils.TAG;
/**
* 负责处理离线支付订单 <br/>
* 每当WebSocket建立链接时,都搜索数据库所有标记需要"离线支付"的订单 <br/>
* 将其{@link PayData#getPayCode()}打包发送到后台 <br/>
* 当后台响应操作后,更新待处理离线订单状态为"支付成功" <br/>
* 支付状态(标记成功、空闲、发送订单信息、支付成功、支付失败)都会通过{@link PayOfflineState}发出通知 <br/><br/>
* "标记成功"状态: 在WebSocket未链接时,"在线支付"订单直接标记为"离线支付",并更新到数据库成功的状态
* 每当WebSocket建立链接时,都会搜索数据库标记为"离线支付"(即{@link PayData#getPayState()})为{@link PayData#offline()}的订单 <br/>
* 将所有搜索到的订单信息组装为{@link PayRequest}发送到后台 <br/>
* 后台会在接收到订单时下发"操作完成"通知,此时更新订单的{@link PayData#getUploadTime()} <br/>
* 后台会在离线订单写入到数据库时下发"写入成功"通知,此时更新订单状态为"支付成功" <br/>
*/
public
class
PayOfflineViewModel
extends
ViewModel
{
private
static
final
long
TIMEOUT
=
10
*
1000
;
...
...
智慧食堂开发文档.docx
View file @
73234f6d
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