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
f6f6783b
Commit
f6f6783b
authored
Dec 01, 2020
by
pengxiong@wealthgrow.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消费订单通知
parent
1419a266
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
6 deletions
+2
-6
errorhandler.py
app/controller/errorhandler.py
+1
-3
order_service.py
app/service/order_service.py
+1
-3
No files found.
app/controller/errorhandler.py
View file @
f6f6783b
...
@@ -76,9 +76,7 @@ def add_errorhandler(app):
...
@@ -76,9 +76,7 @@ def add_errorhandler(app):
# resp = res.json()
# resp = res.json()
# if resp['statusCode'] != "0000":
# if resp['statusCode'] != "0000":
# request.user_id = resp['attributes']
# request.user_id = resp['attributes']
print
(
'key'
,
's:sid:'
+
token
)
user_id
=
redis
.
get
(
's:sid:'
+
token
)
user_id
=
redis
.
get
(
's:sid:'
+
token
)
print
(
'user_id'
,
user_id
)
if
not
user_id
:
if
not
user_id
:
logging
.
error
(
'鉴权失败,token:'
+
token
)
logging
.
error
(
'鉴权失败,token:'
+
token
)
raise
CustomFlaskErr
(
Errors
.
TOKEN_INVALID
)
raise
CustomFlaskErr
(
Errors
.
TOKEN_INVALID
)
...
...
app/service/order_service.py
View file @
f6f6783b
...
@@ -65,7 +65,6 @@ class TopUpOrderService:
...
@@ -65,7 +65,6 @@ class TopUpOrderService:
args
[
'ab_status'
]
=
'WAIT'
args
[
'ab_status'
]
=
'WAIT'
subject
=
'探普币充值'
subject
=
'探普币充值'
out_trade_no
=
args
[
'ab_ordernum'
]
out_trade_no
=
args
[
'ab_ordernum'
]
# notify_url = args['host_url'] + 'tamp_order/micro_shop/topUpOrderNotify'
notify_url
=
config
[
env
][
'pay_url_prefix'
]
+
'/tamp_order/micro_shop/topUpOrderNotify'
notify_url
=
config
[
env
][
'pay_url_prefix'
]
+
'/tamp_order/micro_shop/topUpOrderNotify'
pay_params
=
None
pay_params
=
None
if
args
[
'pay_method'
]
==
5
:
if
args
[
'pay_method'
]
==
5
:
...
@@ -183,8 +182,7 @@ class CurriculumOrderService:
...
@@ -183,8 +182,7 @@ class CurriculumOrderService:
args
[
'ab_status'
]
=
'WAIT'
args
[
'ab_status'
]
=
'WAIT'
subject
=
args
.
get
(
'prod_name'
,
''
)
subject
=
args
.
get
(
'prod_name'
,
''
)
out_trade_no
=
args
[
'ab_ordernum'
]
out_trade_no
=
args
[
'ab_ordernum'
]
# notify_url = args['host_url'] + 'tamp_order/micro_shop/consumeOrderNotify'
notify_url
=
config
[
env
][
'pay_url_prefix'
]
+
'/tamp_order/micro_shop/consumeOrderNotify'
notify_url
=
config
[
env
][
'pay_url_prefix'
]
+
'tamp_order/micro_shop/consumeOrderNotify'
pay_params
=
None
pay_params
=
None
# 该用户是否重复购买同一商品
# 该用户是否重复购买同一商品
repeat_buy
=
tamp_user_session
.
query
(
OrderFlow
.
id
)
.
filter
(
and_
(
OrderFlow
.
createby
==
args
[
'user_id'
]),
repeat_buy
=
tamp_user_session
.
query
(
OrderFlow
.
id
)
.
filter
(
and_
(
OrderFlow
.
createby
==
args
[
'user_id'
]),
...
...
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