Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
岳巧源
/
jd_data_process
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
2b1f27ac
authored
Sep 29, 2024
by
岳巧源
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add update attr
parent
e0a0941a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
update_jd_attr.py
update_jd_attr.py
View file @
2b1f27ac
import
pymysql
# 主要用于从 lie_shop_class 表中获取到class_id 后,将对应的属性和拓展属性 写入lie_shop_attr表(或者它的copy表)。
def
get_class_ids
():
db
=
pymysql
.
connect
(
host
=
'192.168.1.238'
,
port
=
3306
,
user
=
'liexin_data_distribution'
,
password
=
'liexin_data_distribution#zsyM'
,
database
=
'liexin_data_distribution'
)
query_sql
=
"select distinct class_id from lie_shop_class"
cursor
=
db
.
cursor
()
cursor
.
execute
(
query
=
query_sql
)
results
=
cursor
.
fetchall
()
data
=
[]
for
i
in
range
(
len
(
results
)):
data
.
append
(
results
[
i
][
0
])
cursor
.
close
()
db
.
close
()
return
data
def
insert_attr
():
db
=
pymysql
.
connect
(
host
=
'192.168.1.238'
,
port
=
3306
,
user
=
'liexin_data_distribution'
,
password
=
'liexin_data_distribution#zsyM'
,
database
=
'liexin_data_distribution'
)
def
get_attr
():
pass
def
get_ext_attr
():
pass
if
__name__
==
'__main__'
:
pass
\ No newline at end of file
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