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
80aa9f2c
Commit
80aa9f2c
authored
Nov 18, 2021
by
Aeolus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
圈存接口修改
parent
935cd900
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
myapps/sukang24h/api/nfc_card_portal.py
+10
-6
No files found.
myapps/sukang24h/api/nfc_card_portal.py
View file @
80aa9f2c
...
@@ -379,14 +379,18 @@ def run_nfc_card_load_succeed():
...
@@ -379,14 +379,18 @@ def run_nfc_card_load_succeed():
if
not
card_result
:
if
not
card_result
:
return
jsonify
(
NFC_CARD_NOT_EXIST
)
return
jsonify
(
NFC_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
,
status
=
1
)
.
first
()
# 查询到充值记录
card_result
.
money
+=
card_record
.
pay_money
if
card_record
:
card_record
.
status
=
2
card_result
.
money
+=
card_record
.
pay_money
db
.
session
.
add
(
card_record
)
card_record
.
status
=
2
db
.
session
.
add
(
card_record
)
try
:
try
:
db
.
session
.
add
(
card_result
)
db
.
session
.
add
(
card_result
)
db
.
session
.
commit
()
db
.
session
.
commit
()
except
SQLAlchemyError
as
e
:
except
SQLAlchemyError
as
e
:
db
.
session
.
rollback
()
db
.
session
.
rollback
()
return_data
=
{
return
BaseResponse
()
"card_no"
:
card_result
.
card_no
,
"money"
:
card_result
.
money
}
return
BaseResponse
(
data
=
return_data
)
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