Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lzzzzl
/
PipData
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
595562b0
authored
Mar 28, 2022
by
刘豪
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
更改ts_crm逻辑
parent
197615c8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
20 deletions
SendEmail.py
config/conn_list.py
config/db.py
pipeline/pi_daily.py
translate/ts_crm.py
SendEmail.py
View file @
595562b0
...
...
@@ -26,7 +26,7 @@ if __name__ == '__main__':
PiGoods
.
pipeline_zm_warn
()
if
sys
.
argv
[
1
]
==
'safe_stock'
:
PiPurchase
.
pipeline_safe_stock
()
if
sys
.
argv
[
1
]
==
'search_no_r'
:
if
sys
.
argv
[
1
]
==
'search_no_r'
:
# 每日搜索关键词数据
PiSearch
.
search_no_result
()
if
sys
.
argv
[
1
]
==
'sku_expose'
:
# 获取HDFS数据
...
...
config/conn_list.py
View file @
595562b0
...
...
@@ -87,8 +87,7 @@ class ConnList(Base):
@staticmethod
def
Credit
():
conf
=
credit_server
return
pymysql
.
connect
(
str
(
conf
[
'host'
]),
conf
[
'user'
],
conf
[
'password'
],
conf
[
'db_name'
],
charset
=
'utf8'
)
return
pymysql
.
connect
(
**
conf
)
@staticmethod
def
CreditSource
():
...
...
@@ -176,8 +175,7 @@ class ConnList(Base):
@staticmethod
def
WrCrm
():
conf
=
wr_crm_server
return
pymysql
.
connect
(
str
(
conf
[
'host'
]),
conf
[
'user'
],
conf
[
'password'
],
conf
[
'db_name'
],
charset
=
'utf8'
)
return
pymysql
.
connect
(
**
conf
)
@staticmethod
def
LxDb
():
...
...
config/db.py
View file @
595562b0
...
...
@@ -166,14 +166,16 @@ wr_crm_server = {
'host'
:
'172.18.137.21'
,
'user'
:
'LxCrmUser'
,
'password'
:
'xUTmu0XsdUqoZIim2y'
,
'db_name'
:
'liexin_crm'
'db'
:
'liexin_crm'
,
'charset'
:
'utf8'
}
credit_server
=
{
'host'
:
'fkdb-master.ichunt.cc'
,
'user'
:
'Cdimz200o'
,
'password'
:
'mLssyDxmsySZmBomy'
,
'db_name'
:
'liexin_credit'
'db'
:
'liexin_credit'
,
'charset'
:
'utf8'
}
credit_source_server
=
{
...
...
pipeline/pi_daily.py
View file @
595562b0
...
...
@@ -582,24 +582,12 @@ class PiDaily:
start_time
=
0
end_time
=
DateHandler
.
now_datetime
()
# db = ConnList.Order()
lx_order_db
=
ConnList
.
LxOrderDb
()
wr_db
=
ConnList
.
WrCrm
()
user
=
ExCrm
(
''
)
.
crm_user
(
start_time
,
end_time
)
ts_user
=
TsCrm
(
lx_order_db
,
wr_db
,
user
)
print
(
len
(
user
))
ts_user
.
is_order
()
ts_user
.
last_order
()
ts_user
.
order_num
()
ts_user
.
model_num
()
ts_user
.
order_amount
()
ts_user
.
paid_amount
()
ts_user
.
contact_info
()
ts_user
.
iap_data
()
print
(
len
(
user
))
ts_user
.
handle_data
()
translate/ts_crm.py
View file @
595562b0
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