Commit 39be1b02 by 岳巧源

sql modify

parent bcd55da6
......@@ -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
-------------------------
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)")
......
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()
......
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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment