Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
岳巧源
/
my-awesome-project
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
39be1b02
authored
Jun 26, 2024
by
岳巧源
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
sql modify
parent
bcd55da6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
107 additions
and
39 deletions
api_count.txt
release_crm.py
release_liexin.py
release_pur.py
api_count.txt
View file @
39be1b02
...
...
@@ -114,3 +114,30 @@ db=liexin_purchase
采购----------------
--------------------------------------------------线上
[db_crmv2]
host=trading-master.ichunt.db
user=LxCrmUserV2
passwd="xUTmu0XsdUqoZIim2yV2"
db=liexin_crm
-------------------------------------
[db_liexin]
host=172.18.137.21
user=huntdbuser
passwd='mLssy2@@!!@$#yy'
db=hunt2016
----------------------------------------
[db_purchase]
host=trading-master.ichunt.db
user=PurUxts
passwd=sxmsgxt0t2025067A03AtIljs
db=liexin_purchase
-------------------------
release_crm.py
View file @
39be1b02
import
json
import
mysql.connector
import
pymysql
import
requests
import
logging
# 线上地址需要更改
dev_url
=
"http://united_data.
liexindev
.net/sync/Address/updateAddress"
#测试环境url
dev_url
=
"http://united_data.
ichunt
.net/sync/Address/updateAddress"
#测试环境url
prod_url
=
""
#生产环境
#日志配置
...
...
@@ -16,12 +17,29 @@ logging.basicConfig(format='%(asctime)s - %(filename)s[line:%(lineno)d] - %(leve
def
get_user_detail_address_by_code
(
province
:
int
,
city
:
int
,
district
:
int
,
detail_address
:
str
)
->
str
:
db
=
mysql
.
connector
.
connect
(
host
=
"232.db.liexindev.me"
,
user
=
"liexin"
,
password
=
"liexin#zsyM"
,
database
=
"liexin"
)
# db = mysql.connector.connect(
# host="232.db.liexindev.me",
# user="liexin",
# password="liexin#zsyM",
# database="liexin"
# )
conf
=
{
'host'
:
"172.18.137.21"
,
'port'
:
3306
,
'user'
:
"huntdbuser"
,
'password'
:
"mLssy2@@!!@$#yy"
,
'db'
:
"hunt2016"
,
'charset'
:
'utf8'
}
# conf = {
# 'host': "232.db.liexindev.me",
# 'port': 3306,
# 'user': "liexin",
# 'password': "liexin#zsyM",
# 'db': "liexin",
# 'charset': 'utf8'
# }
db
=
pymysql
.
connect
(
**
conf
)
sql1
=
"select region_name from lie_region where region_id = "
+
str
(
province
)
sql2
=
"select region_name from lie_region where region_id = "
+
str
(
city
)
sql3
=
"select region_name from lie_region where region_id = "
+
str
(
district
)
...
...
@@ -56,12 +74,21 @@ def get_user_detail_address_by_code(province: int, city: int, district: int, det
#########################################################################
def
crm
():
db
=
mysql
.
connector
.
connect
(
host
=
"master.db2.liexindev.me"
,
user
=
"liexin_crmv2"
,
password
=
"liexin_crmv2#zsyM"
,
database
=
"liexin_crmv2"
)
# db = mysql.connector.connect(
# host="trading-master.ichunt.db",
# user="LxCrmUserV2",
# password="xUTmu0XsdUqoZIim2yV2",
# database="liexin_crm"
# )
conf
=
{
'host'
:
"trading-master.ichunt.db"
,
'port'
:
3306
,
'user'
:
"LxCrmUserV2"
,
'password'
:
"xUTmu0XsdUqoZIim2yV2"
,
'db'
:
"liexin_crm"
,
'charset'
:
'utf8'
}
db
=
pymysql
.
connect
(
**
conf
)
cursor
=
db
.
cursor
()
cursor
.
execute
(
"select com_name, business_license_src, creator_id, creator_name, id, com_addr from lie_company where com_category in (0, 1)"
)
...
...
release_liexin.py
View file @
39be1b02
import
json
import
mysql.connector
import
pymysql
import
requests
import
logging
# 线上地址需要更改
dev_url
=
"http://united_data.
liexindev
.net/sync/Address/updateAddress"
#测试环境url
dev_url
=
"http://united_data.
ichunt
.net/sync/Address/updateAddress"
#测试环境url
prod_url
=
""
#生产环境
#日志配置
...
...
@@ -16,12 +17,15 @@ logging.basicConfig(format='%(asctime)s - %(filename)s[line:%(lineno)d] - %(leve
def
get_user_detail_address_by_code
(
province
:
int
,
city
:
int
,
district
:
int
,
detail_address
:
str
)
->
str
:
db
=
mysql
.
connector
.
connect
(
host
=
"232.db.liexindev.me"
,
user
=
"liexin"
,
password
=
"liexin#zsyM"
,
database
=
"liexin"
)
conf
=
{
'host'
:
"172.18.137.21"
,
'port'
:
3306
,
'user'
:
"huntdbuser"
,
'password'
:
"mLssy2@@!!@$#yy"
,
'db'
:
"hunt2016"
,
'charset'
:
'utf8'
}
db
=
pymysql
.
connect
(
**
conf
)
sql1
=
"select region_name from lie_region where region_id = "
+
str
(
province
)
sql2
=
"select region_name from lie_region where region_id = "
+
str
(
city
)
sql3
=
"select region_name from lie_region where region_id = "
+
str
(
district
)
...
...
@@ -54,12 +58,15 @@ def get_user_detail_address_by_code(province: int, city: int, district: int, det
######################################################
def
liexin
():
db
=
mysql
.
connector
.
connect
(
host
=
"232.db.liexindev.me"
,
user
=
"liexin"
,
password
=
"liexin#zsyM"
,
database
=
"liexin"
)
conf
=
{
'host'
:
"172.18.137.21"
,
'port'
:
3306
,
'user'
:
"huntdbuser"
,
'password'
:
"mLssy2@@!!@$#yy"
,
'db'
:
"hunt2016"
,
'charset'
:
'utf8'
}
db
=
pymysql
.
connect
(
**
conf
)
cursor
=
db
.
cursor
()
cursor
.
execute
(
"select tax_title, business_license, tax_id, user_sn, company_address, consignee_province, consignee_city, consignee_district, consignee_address, uc_id from lie_taxinfo"
)
result
=
cursor
.
fetchall
()
...
...
release_pur.py
View file @
39be1b02
import
json
import
mysql.connector
import
pymysql
import
requests
import
logging
# 线上地址需要更改
dev_url
=
"http://united_data.
liexindev
.net/sync/Address/updateAddress"
#测试环境url
dev_url
=
"http://united_data.
ichunt
.net/sync/Address/updateAddress"
#测试环境url
prod_url
=
""
#生产环境
#日志配置
...
...
@@ -16,12 +17,15 @@ logging.basicConfig(format='%(asctime)s - %(filename)s[line:%(lineno)d] - %(leve
def
get_user_detail_address_by_code
(
province
:
int
,
city
:
int
,
district
:
int
,
detail_address
:
str
)
->
str
:
db
=
mysql
.
connector
.
connect
(
host
=
"232.db.liexindev.me"
,
user
=
"liexin"
,
password
=
"liexin#zsyM"
,
database
=
"liexin"
)
conf
=
{
'host'
:
"172.18.137.21"
,
'port'
:
3306
,
'user'
:
"huntdbuser"
,
'password'
:
"mLssy2@@!!@$#yy"
,
'db'
:
"hunt2016"
,
'charset'
:
'utf8'
}
db
=
pymysql
.
connect
(
**
conf
)
sql1
=
"select region_name from lie_region where region_id = "
+
str
(
province
)
sql2
=
"select region_name from lie_region where region_id = "
+
str
(
city
)
sql3
=
"select region_name from lie_region where region_id = "
+
str
(
district
)
...
...
@@ -52,12 +56,15 @@ def get_user_detail_address_by_code(province: int, city: int, district: int, det
def
pur
():
db
=
mysql
.
connector
.
connect
(
host
=
"master.db2.liexindev.me"
,
user
=
"liexin_purchase"
,
password
=
"liexin_purchase#zsyM"
,
database
=
"liexin_purchase"
)
conf
=
{
'host'
:
"trading-master.ichunt.db"
,
'port'
:
3306
,
'user'
:
"PurUxts"
,
'password'
:
"sxmsgxt0t2025067A03AtIljs"
,
'db'
:
"liexin_purchase"
,
'charset'
:
'utf8'
}
db
=
pymysql
.
connect
(
**
conf
)
cursor
=
db
.
cursor
()
cursor
.
execute
(
"select end_cust_cn, end_cust_en, create_uid, create_name, end_cust_id, com_addr from lie_end_cust_info"
)
result
=
cursor
.
fetchall
()
...
...
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