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
0772014e
Commit
0772014e
authored
Nov 03, 2021
by
Aeolus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
c30d5082
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletions
+8
-1
myapps/sukang24h/api/nfc_card_portal.py
+8
-1
No files found.
myapps/sukang24h/api/nfc_card_portal.py
View file @
0772014e
...
...
@@ -11,6 +11,7 @@ import re
import
time
from
flask
import
Blueprint
,
request
,
jsonify
,
g
from
sqlalchemy
import
extract
from
config.commen_config
import
USER_RENT_PREPAY_ID
from
config.wechat_config
import
platform_appid_config_list
,
pay_config_list
,
NFC_PAY_CALLBCK_URL
...
...
@@ -153,11 +154,17 @@ def run_nfc_card_pay_record():
json_data
=
request
.
get_json
()
page
=
json_data
[
"page"
]
page_size
=
json_data
[
"pageSize"
]
pay_month
=
json_data
[
"pay_month"
]
pay_year
=
json_data
.
get
(
"pay_year"
,
None
)
pay_month
=
json_data
.
get
(
"pay_month"
,
None
)
filter_list
=
[
NfcCardPayRecord
.
user_id
==
g
.
user
.
id
]
if
pay_year
and
pay_month
:
filter_list
.
append
(
extract
(
'year'
,
NfcCardPayRecord
.
create_date
)
==
pay_year
)
filter_list
.
append
(
extract
(
'month'
,
NfcCardPayRecord
.
create_date
)
==
pay_month
)
order_list
=
[
NfcCardPayRecord
.
created_at
.
desc
()]
rent_list
=
NfcCardPayRecord
.
query
.
filter
(
*
filter_list
)
.
order_by
(
*
order_list
)
.
offset
((
page
-
1
)
*
page_size
)
.
limit
(
page_size
)
.
all
()
...
...
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