Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
T
tamp_course_order
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭熊
tamp_course_order
Commits
50ab388c
Commit
50ab388c
authored
Dec 15, 2020
by
pengxiong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询
parent
362af992
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
engine.py
app/api/engine.py
+1
-1
order_service.py
app/service/order_service.py
+5
-5
No files found.
app/api/engine.py
View file @
50ab388c
...
...
@@ -110,7 +110,7 @@ class TAMP_SQL(object):
except
:
try
:
self
.
session
.
rollback
()
except
:
except
:
pass
finally
:
self
.
session
.
close
()
app/service/order_service.py
View file @
50ab388c
...
...
@@ -44,7 +44,7 @@ class TopUpOrderService:
and_
(
OrderFlow
.
createby
==
user_id
,
OrderFlow
.
ab_type
==
'6'
,
OrderFlow
.
ab_status
==
'SUCCESS'
))
.
count
()
res
=
tamp_user_session
.
query
(
OrderFlow
)
.
filter
(
and_
(
OrderFlow
.
createby
==
user_id
,
OrderFlow
.
ab_type
==
'6'
,
OrderFlow
.
ab_status
==
'SUCCESS'
))
.
order_by
(
OrderFlow
.
createtime
.
desc
())
.
offset
(
offset
)
.
limit
(
pageSize
)
res
=
[
r
.
to_dict
()
for
r
in
res
]
res
=
[
r
.
to_dict
()
for
r
in
res
]
allowed
=
{
'id'
,
'ab_ordernum'
,
'transaction_serial_no'
,
'ab_payment'
,
'ab_pay_mode'
,
'createtime'
,
'pay_time'
,
'complete_time'
,
'ab_type'
}
for
r
in
res
:
keys
=
set
(
r
.
keys
())
-
allowed
...
...
@@ -142,10 +142,10 @@ class CurriculumOrderService:
res
=
tamp_user_session
.
query
(
OrderFlow
)
.
filter
(
and_
(
OrderFlow
.
createby
==
user_id
,
OrderFlow
.
ab_type
!=
'6'
,
OrderFlow
.
ab_status
==
'SUCCESS'
)
)
.
order_by
(
OrderFlow
.
createtime
.
desc
())
.
offset
(
offset
)
.
limit
(
pageSize
)
curriculum_column
=
{
r
[
0
]:
{
'title'
:
r
[
1
],
'cover'
:
r
[
2
],
'info'
:
r
[
3
]}
for
r
in
curriculum_column
}
curriculum_res
=
{
r
[
0
]:
{
'title'
:
r
[
1
],
'cover'
:
r
[
2
],
'info'
:
r
[
3
]}
for
r
in
curriculum_res
}
zhibo
=
{
r
[
0
]:
{
'title'
:
r
[
1
],
'cover'
:
r
[
2
],
'info'
:
r
[
3
],
'zb_start_time'
:
int
(
r
[
4
]
.
timestamp
())
if
r
[
4
]
else
0
}
for
r
in
zhibo
}
orders
=
[
r
.
to_dict
()
for
r
in
res
if
r
.
to_dict
()[
'ab_status'
]
==
'SUCCESS'
]
curriculum_column
=
{
r
[
0
]:
{
'title'
:
r
[
1
],
'cover'
:
r
[
2
],
'info'
:
r
[
3
]}
for
r
in
curriculum_column
}
curriculum_res
=
{
r
[
0
]:
{
'title'
:
r
[
1
],
'cover'
:
r
[
2
],
'info'
:
r
[
3
]}
for
r
in
curriculum_res
}
zhibo
=
{
r
[
0
]:
{
'title'
:
r
[
1
],
'cover'
:
r
[
2
],
'info'
:
r
[
3
],
'zb_start_time'
:
int
(
r
[
4
]
.
timestamp
())
if
r
[
4
]
else
0
}
for
r
in
zhibo
}
orders
=
[
r
.
to_dict
()
for
r
in
res
if
r
.
to_dict
()[
'ab_status'
]
==
'SUCCESS'
]
temp_orders
=
[]
for
order
in
orders
:
prod_type
=
order
.
get
(
'ab_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