Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
F
fund_report
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
彭熊
fund_report
Commits
f69c2cca
Commit
f69c2cca
authored
4 years ago
by
赵杰
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/app' into app
parents
bee93934
67b8a002
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
engine.py
app/api/engine.py
+4
-3
report.py
app/controller/report.py
+5
-2
6a12a5d3-e826-4b49-82df-16fd2d0d67c1.pdf
app/pdf/6a12a5d3-e826-4b49-82df-16fd2d0d67c1.pdf
+0
-0
No files found.
app/api/engine.py
View file @
f69c2cca
...
...
@@ -20,10 +20,10 @@ env = sys.argv[-1]
work_dir
=
os
.
getcwd
()
CFG_FILEPATH
=
work_dir
+
'/app/config/config.yaml'
template_folder
=
work_dir
+
'/app/templates'
pdf_folder
=
work_dir
+
'/app/pdf/'
config
=
yaml
.
load
(
open
(
CFG_FILEPATH
,
'r'
),
Loader
=
yaml
.
FullLoader
)
config
=
yaml
.
load
(
open
(
CFG_FILEPATH
,
'r'
),
Loader
=
yaml
.
FullLoader
)
pdf_folder
=
os
.
path
.
join
(
work_dir
,
"app/pdf"
,
config
[
env
][
'PDF'
][
'pdf_folder'
])
tamp_product_engine
=
create_engine
(
'mysql+mysqldb://{user}:{password}@{host}:{port}/{db}?charset={charset}'
.
format
(
...
...
@@ -99,7 +99,8 @@ tamp_diagnose_app_engine = create_engine(
redis
=
redis
.
StrictRedis
(
host
=
config
[
env
][
'redis'
][
'host'
],
port
=
config
[
env
][
'redis'
][
'port'
],
db
=
config
[
env
][
'redis'
][
'db'
]
db
=
config
[
env
][
'redis'
][
'db'
],
password
=
config
[
env
][
'redis'
][
'password'
]
)
# logging.basicConfig(level=logging.INFO,
...
...
This diff is collapsed.
Click to expand it.
app/controller/report.py
View file @
f69c2cca
...
...
@@ -38,7 +38,10 @@ class ReportHandlers(Resource):
ifa_id
=
redis
.
get
(
token
)
.
decode
()
if
not
ifa_id
:
return
{
"code"
:
40005
,
"data"
:
None
,
"lang"
:
"zh_CN"
,
"msg"
:
"请登陆"
}
ifa_id
=
ifa_id
.
replace
(
'
\'
'
,
''
)
if
'
\'
'
in
ifa_id
:
ifa_id
=
ifa_id
.
replace
(
'
\'
'
,
''
)
if
'
\"
'
in
ifa_id
:
ifa_id
=
ifa_id
.
replace
(
'
\"
'
,
''
)
customer_id
=
args
[
'customer_id'
]
pdf_name
=
str
(
ifa_id
)
+
str
(
customer_id
)
+
'.pdf'
...
...
@@ -64,7 +67,7 @@ class ReportHandlers(Resource):
bucket
=
oss2
.
Bucket
(
auth
,
'http://oss-cn-shanghai.aliyuncs.com'
,
config
[
env
][
'oss'
][
'env'
])
# 生成下载文件的签名URL,有效时间为60s。
path
=
bucket
.
sign_url
(
'GET'
,
config
[
env
][
'oss'
][
'path'
]
+
pdf_name
,
60
)
path
=
bucket
.
sign_url
(
'GET'
,
config
[
env
][
'oss'
][
'path'
]
+
pdf_name
,
config
[
env
][
'oss'
][
'validtime'
]
)
with
TAMP_SQL
(
tamp_diagnose_app_engine
)
as
tamp_diagnose_app
:
tamp_diagnose_app_session
=
tamp_diagnose_app
.
session
sql
=
"update hold_report set update_time='{}', update_status='{}', file='{}' where ifa_id='{}' and customer_id='{}'"
.
format
(
...
...
This diff is collapsed.
Click to expand it.
app/pdf/6a12a5d3-e826-4b49-82df-16fd2d0d67c1.pdf
deleted
100644 → 0
View file @
bee93934
File deleted
This diff is collapsed.
Click to expand it.
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