Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
Automat
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冯佳佳
Automat
Commits
935cd900
Commit
935cd900
authored
Nov 18, 2021
by
Aeolus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
圈存接口
parent
a7d0e3c8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
myapps/sukang24h/api/nfc_card_portal.py
+4
-4
utils/middlewares.py
+0
-0
No files found.
myapps/sukang24h/api/nfc_card_portal.py
View file @
935cd900
...
@@ -361,12 +361,12 @@ def run_nfc_card_user_pay_record():
...
@@ -361,12 +361,12 @@ def run_nfc_card_user_pay_record():
}
}
result_data
.
append
(
tmp_data
)
result_data
.
append
(
tmp_data
)
return
BaseResponse
(
data
=
result_data
,
total
=
0
,
page
=
page
,
page_size
=
page_size
)
return
BaseResponse
(
data
=
result_data
,
total
=
total_count
,
page
=
page
,
page_size
=
page_size
)
# 充值成功后改变数据库
# 充值成功后改变数据库
@nfc_card_route.route
(
'/
user_pay
_succeed'
,
methods
=
[
'POST'
])
@nfc_card_route.route
(
'/
load
_succeed'
,
methods
=
[
'POST'
])
def
run_nfc_card_
pay
_succeed
():
def
run_nfc_card_
load
_succeed
():
json_data
=
request
.
get_json
()
json_data
=
request
.
get_json
()
secret
=
json_data
[
"secret"
]
secret
=
json_data
[
"secret"
]
record_nos
=
json_data
[
"record_nos"
]
record_nos
=
json_data
[
"record_nos"
]
...
@@ -377,7 +377,7 @@ def run_nfc_card_pay_succeed():
...
@@ -377,7 +377,7 @@ def run_nfc_card_pay_succeed():
card_result
=
NfcCard
.
query
.
filter_by
(
card_no
=
card_no
)
.
first
()
# 查询到卡号
card_result
=
NfcCard
.
query
.
filter_by
(
card_no
=
card_no
)
.
first
()
# 查询到卡号
if
not
card_result
:
if
not
card_result
:
return
jsonify
(
N
O_NFC_CARD_ERROR
)
return
jsonify
(
N
FC_CARD_NOT_EXIST
)
for
record_no
in
record_nos
:
for
record_no
in
record_nos
:
card_record
=
NfcCardPayRecord
.
query
.
filter_by
(
rent_no
=
record_no
)
.
first
()
# 查询到充值记录
card_record
=
NfcCardPayRecord
.
query
.
filter_by
(
rent_no
=
record_no
)
.
first
()
# 查询到充值记录
card_result
.
money
+=
card_record
.
pay_money
card_result
.
money
+=
card_record
.
pay_money
...
...
utils/middlewares.py
View file @
935cd900
This diff is collapsed.
Click to expand it.
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