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
03a1aaf2
Commit
03a1aaf2
authored
Apr 22, 2021
by
etscript
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
推广接口
parent
f25135d2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletion
+22
-1
curriculum_order.py
app/model/curriculum_order.py
+1
-0
order_service.py
app/service/order_service.py
+21
-1
No files found.
app/model/curriculum_order.py
View file @
03a1aaf2
...
...
@@ -62,3 +62,4 @@ class OrderFlow(Base, BaseModel):
deletetag
=
Column
(
String
(
3
),
default
=
"0"
,
comment
=
'删除标识'
)
unionid
=
Column
(
String
(
64
),
comment
=
'微信unionid'
)
transaction_serial_no
=
Column
(
String
(
64
),
comment
=
'交易流水号'
)
register_phone
=
Column
(
String
(
20
),
comment
=
'授权手机号'
)
app/service/order_service.py
View file @
03a1aaf2
...
...
@@ -33,6 +33,8 @@ import requests
course_price_api
=
"http://s-nginx/course/res/money/price"
course_rollback_api
=
"http://s-nginx/course/fatools/pay/course/rollback"
class
TopUpOrderService
:
""""""
def
__init__
(
self
):
...
...
@@ -268,7 +270,8 @@ class CurriculumOrderService:
}
amount
=
requests
.
post
(
course_price_api
,
headers
=
headers
,
json
=
data
)
json
=
data
,
timeout
=
5
)
try
:
amount
=
amount
.
json
()
'''
...
...
@@ -423,6 +426,23 @@ def consumeSucessAction(order_no, transaction_id):
'complete_time'
:
datetime
.
datetime
.
now
()
})
if
curriculum_order
.
ab_type
==
'300'
:
data
=
{
"resId"
:
curriculum_order
.
ab_proid
],
"userId"
:
curriculum_order
.
user_id
,
"phone"
:
curriculum_order
.
register_phone
}
headers
=
{
"Content-Type"
:
"application/json"
,
"env"
:
"ios"
}
try
:
requests
.
post
(
course_rollback_api
,
headers
=
headers
,
json
=
data
,
timeout
=
5
)
except
:
print
(
"用户提升级别接口失败"
)
def
getAccountBalance
(
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