Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lzzzzl
/
param_data
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
15efb07d
authored
Nov 11, 2020
by
lzzzzl
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
更新attr_values mongo处理
parent
dc6bfb23
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
fun/param_data.py
fun/param_data.py
View file @
15efb07d
...
@@ -219,7 +219,8 @@ class ParamData(object):
...
@@ -219,7 +219,8 @@ class ParamData(object):
@staticmethod
@staticmethod
def
get_attr_name
(
attr_id
,
class_conn
):
def
get_attr_name
(
attr_id
,
class_conn
):
sql
=
"SELECT attr_name FROM lie_class_attr WHERE attr_id=
%
s"
%
attr_id
sql
=
"SELECT attr_name FROM lie_class_attr WHERE attr_id=
%
s"
%
attr_id
return
DBHandler
.
read
(
class_conn
,
sql
)
res
=
DBHandler
.
read
(
class_conn
,
sql
)
return
res
[
0
][
0
]
if
len
(
res
)
>
0
else
''
"""
"""
获取参数值
获取参数值
...
@@ -227,7 +228,8 @@ class ParamData(object):
...
@@ -227,7 +228,8 @@ class ParamData(object):
@staticmethod
@staticmethod
def
get_attr_value
(
attr_value_id
,
class_conn
):
def
get_attr_value
(
attr_value_id
,
class_conn
):
sql
=
"SELECT value FROM lie_class_attr_value WHERE attr_value_id=
%
s"
%
attr_value_id
sql
=
"SELECT value FROM lie_class_attr_value WHERE attr_value_id=
%
s"
%
attr_value_id
return
DBHandler
.
read
(
class_conn
,
sql
)
res
=
DBHandler
.
read
(
class_conn
,
sql
)
return
res
[
0
][
0
]
if
len
(
res
)
>
0
else
''
"""
"""
获取参数单位
获取参数单位
...
@@ -235,7 +237,8 @@ class ParamData(object):
...
@@ -235,7 +237,8 @@ class ParamData(object):
@staticmethod
@staticmethod
def
get_attr_unit
(
attr_unit_id
,
class_conn
):
def
get_attr_unit
(
attr_unit_id
,
class_conn
):
sql
=
"SELECT attr_unit_name FROM lie_class_attr_unit WHERE attr_unit_id=
%
s"
%
attr_unit_id
sql
=
"SELECT attr_unit_name FROM lie_class_attr_unit WHERE attr_unit_id=
%
s"
%
attr_unit_id
return
DBHandler
.
read
(
class_conn
,
sql
)
res
=
DBHandler
.
read
(
class_conn
,
sql
)
return
res
[
0
][
0
]
if
len
(
res
)
>
0
else
''
"""
"""
获取SPU 数据
获取SPU 数据
...
...
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