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
806bac94
authored
Oct 17, 2024
by
岳巧源
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add attr
parent
108374fa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1498 additions
and
3 deletions
pop_attr.json
test5.py
pop_attr.json
0 → 100644
View file @
806bac94
{
"jingdong_category_read_findAttrsByCategoryIdUnlimitCate_responce"
:
{
"code"
:
"0"
,
"request_id"
:
"3058974.39587.17291605297854323"
,
"findattrsbycategoryidunlimitcate_result"
:
[
{
"originCategoryId"
:
33593
,
"orderSort"
:
0
,
"isRequired"
:
false
,
"features"
:
[
{
"fvalue"
:
"1"
,
"key"
:
"color"
},
{
"fvalue"
:
"0"
,
"key"
:
"required"
},
{
"fvalue"
:
"1"
,
"key"
:
"dim"
}
],
"catId"
:
33593
,
"attributeType"
:
4
,
"name"
:
"颜色"
,
"attrValueList"
:
[
{
"features"
:
[
{
"fvalue"
:
"#FF0000"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
1
,
"name"
:
"红色"
,
"id"
:
23184070217
},
{
"features"
:
[
{
"fvalue"
:
"#990000"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
2
,
"name"
:
"深红色"
,
"id"
:
23184070218
},
{
"features"
:
[
{
"fvalue"
:
"#FF9900"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
3
,
"name"
:
"橙色"
,
"id"
:
23184070219
},
{
"features"
:
[
{
"fvalue"
:
"#FFFF00"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
4
,
"name"
:
"黄色"
,
"id"
:
23184070220
},
{
"features"
:
[
{
"fvalue"
:
"#FFFF99"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
5
,
"name"
:
"浅黄色"
,
"id"
:
23184070221
},
{
"features"
:
[
{
"fvalue"
:
"#66CC33"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
6
,
"name"
:
"草绿色"
,
"id"
:
23184070222
},
{
"features"
:
[
{
"fvalue"
:
"#339933"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
7
,
"name"
:
"绿色"
,
"id"
:
23184070223
},
{
"features"
:
[
{
"fvalue"
:
"#0099FF"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
8
,
"name"
:
"浅蓝色"
,
"id"
:
23184070224
},
{
"features"
:
[
{
"fvalue"
:
"#0033CC"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
9
,
"name"
:
"蓝色"
,
"id"
:
23184070225
},
{
"features"
:
[
{
"fvalue"
:
"#000066"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
10
,
"name"
:
"深蓝色"
,
"id"
:
23184070226
},
{
"features"
:
[
{
"fvalue"
:
"#CC99FF"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
11
,
"name"
:
"浅紫色"
,
"id"
:
23184070227
},
{
"features"
:
[
{
"fvalue"
:
"#660066"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
12
,
"name"
:
"紫色"
,
"id"
:
23184070228
},
{
"features"
:
[
{
"fvalue"
:
"#FF6666"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
13
,
"name"
:
"玫瑰红色"
,
"id"
:
23184070229
},
{
"features"
:
[
{
"fvalue"
:
"#FF0066"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
14
,
"name"
:
"粉红色"
,
"id"
:
23184070230
},
{
"features"
:
[
{
"fvalue"
:
"#CCCC66"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
15
,
"name"
:
"卡其色"
,
"id"
:
23184070231
},
{
"features"
:
[
{
"fvalue"
:
"#996600"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
16
,
"name"
:
"茶色"
,
"id"
:
23184070232
},
{
"features"
:
[
{
"fvalue"
:
"#663300"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
17
,
"name"
:
"褐色"
,
"id"
:
23184070233
},
{
"features"
:
[
{
"fvalue"
:
"#336600"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
18
,
"name"
:
"军绿色"
,
"id"
:
23184070234
},
{
"features"
:
[
{
"fvalue"
:
"#CCFFFF"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
19
,
"name"
:
"天蓝色"
,
"id"
:
23184070235
},
{
"features"
:
[
{
"fvalue"
:
"#CCFF00"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
20
,
"name"
:
"荧光色"
,
"id"
:
23184070236
},
{
"features"
:
[
{
"fvalue"
:
"#FFFFFF"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
21
,
"name"
:
"白色"
,
"id"
:
23184070237
},
{
"features"
:
[
{
"fvalue"
:
"#CCCCCC"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
22
,
"name"
:
"浅灰色"
,
"id"
:
23184070238
},
{
"features"
:
[
{
"fvalue"
:
"#666666"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
23
,
"name"
:
"灰色"
,
"id"
:
23184070239
},
{
"features"
:
[
{
"fvalue"
:
"#000000"
,
"key"
:
"class"
}
],
"attId"
:
1001074447
,
"catId"
:
33593
,
"orderSort"
:
24
,
"name"
:
"黑色"
,
"id"
:
23184070241
}
],
"inputType"
:
2
,
"id"
:
1001074447
},
{
"originCategoryId"
:
33593
,
"orderSort"
:
0
,
"isRequired"
:
false
,
"features"
:
[
{
"fvalue"
:
"2"
,
"key"
:
"dim"
},
{
"fvalue"
:
"1"
,
"key"
:
"size"
},
{
"fvalue"
:
"0"
,
"key"
:
"required"
}
],
"catId"
:
33593
,
"attributeType"
:
4
,
"name"
:
"尺码"
,
"attrValueList"
:
[],
"inputType"
:
2
,
"id"
:
1001074448
},
{
"originCategoryId"
:
33593
,
"orderSort"
:
0
,
"isRequired"
:
false
,
"features"
:
[
{
"fvalue"
:
"0"
,
"key"
:
"required"
},
{
"fvalue"
:
"5"
,
"key"
:
"dim"
}
],
"catId"
:
33593
,
"attributeType"
:
4
,
"name"
:
"系列"
,
"attrValueList"
:
[],
"inputType"
:
2
,
"id"
:
1001087770
},
{
"originCategoryId"
:
33593
,
"orderSort"
:
0
,
"isRequired"
:
false
,
"features"
:
[
{
"fvalue"
:
"4"
,
"key"
:
"dim"
},
{
"fvalue"
:
"0"
,
"key"
:
"required"
}
],
"catId"
:
33593
,
"attributeType"
:
4
,
"name"
:
"型号"
,
"attrValueList"
:
[],
"inputType"
:
2
,
"id"
:
1001088112
},
{
"orderSort"
:
0
,
"isRequired"
:
false
,
"features"
:
[
{
"fvalue"
:
"0"
,
"key"
:
"attributeLock"
},
{
"fvalue"
:
"000"
,
"key"
:
"options"
},
{
"fvalue"
:
"GGCS"
,
"key"
:
"erpAttType"
},
{
"fvalue"
:
"237878"
,
"key"
:
"newErpId"
},
{
"fvalue"
:
"0"
,
"key"
:
"isShow"
},
{
"fvalue"
:
"0"
,
"key"
:
"isChoosePurchase"
},
{
"fvalue"
:
"0"
,
"key"
:
"isCStore"
},
{
"fvalue"
:
"0"
,
"key"
:
"attrLevel"
},
{
"fvalue"
:
"0"
,
"key"
:
"isCoreProperty"
},
{
"fvalue"
:
"0"
,
"key"
:
"isRequired"
},
{
"fvalue"
:
"[{
\"
unit
\"
:[
\"
V
\"
],
\"
prefix
\"
:
\"\"
}]"
,
"key"
:
"combinationValue"
},
{
"fvalue"
:
"50"
,
"key"
:
"xzstr"
},
{
"fvalue"
:
"0"
,
"key"
:
"isCStoreRequired"
},
{
"fvalue"
:
"1"
,
"key"
:
"isSearch"
}
],
"catId"
:
33593
,
"attributeType"
:
3
,
"name"
:
"电源电压"
,
"attrValueList"
:
[],
"inputType"
:
10
,
"id"
:
237878
,
"graphic"
:
""
},
{
"orderSort"
:
0
,
"isRequired"
:
false
,
"features"
:
[
{
"fvalue"
:
"0"
,
"key"
:
"isRequired"
},
{
"fvalue"
:
"000"
,
"key"
:
"options"
},
{
"fvalue"
:
"GGCS"
,
"key"
:
"erpAttType"
},
{
"fvalue"
:
"[{
\"
unit
\"
:[
\"
us
\"
,
\"
ns
\"
,
\"
ms
\"
],
\"
prefix
\"
:
\"\"
}]"
,
"key"
:
"combinationValue"
},
{
"fvalue"
:
"0"
,
"key"
:
"isSearch"
},
{
"fvalue"
:
"50"
,
"key"
:
"xzstr"
},
{
"fvalue"
:
"0"
,
"key"
:
"isCStoreRequired"
},
{
"fvalue"
:
"0"
,
"key"
:
"isShow"
},
{
"fvalue"
:
"0"
,
"key"
:
"attrLevel"
},
{
"fvalue"
:
"237880"
,
"key"
:
"newErpId"
}
],
"catId"
:
33593
,
"attributeType"
:
3
,
"name"
:
"导通时间"
,
"attrValueList"
:
[],
"inputType"
:
10
,
"id"
:
237880
,
"graphic"
:
""
},
{
"orderSort"
:
0
,
"isRequired"
:
false
,
"features"
:
[
{
"fvalue"
:
"0"
,
"key"
:
"isRequired"
},
{
"fvalue"
:
"000"
,
"key"
:
"options"
},
{
"fvalue"
:
"GGCS"
,
"key"
:
"erpAttType"
},
{
"fvalue"
:
"0"
,
"key"
:
"isSearch"
},
{
"fvalue"
:
"50"
,
"key"
:
"xzstr"
},
{
"fvalue"
:
"0"
,
"key"
:
"isCStoreRequired"
},
{
"fvalue"
:
"237881"
,
"key"
:
"newErpId"
},
{
"fvalue"
:
"0"
,
"key"
:
"isShow"
},
{
"fvalue"
:
"0"
,
"key"
:
"attrLevel"
},
{
"fvalue"
:
"[{
\"
unit
\"
:[
\"
ms
\"
,
\"
us
\"
,
\"
ns
\"
],
\"
prefix
\"
:
\"\"
}]"
,
"key"
:
"combinationValue"
}
],
"catId"
:
33593
,
"attributeType"
:
3
,
"name"
:
"关闭时间"
,
"attrValueList"
:
[],
"inputType"
:
10
,
"id"
:
237881
,
"graphic"
:
""
},
{
"orderSort"
:
0
,
"isRequired"
:
false
,
"features"
:
[
{
"fvalue"
:
"25"
,
"key"
:
"xzstr"
},
{
"fvalue"
:
"0"
,
"key"
:
"isRequired"
},
{
"fvalue"
:
"270352"
,
"key"
:
"newErpId"
},
{
"fvalue"
:
"000"
,
"key"
:
"options"
},
{
"fvalue"
:
"GGCS"
,
"key"
:
"erpAttType"
},
{
"fvalue"
:
"0"
,
"key"
:
"isShow"
}
],
"catId"
:
33458
,
"attributeType"
:
3
,
"name"
:
"生产批次"
,
"attrValueList"
:
[],
"inputType"
:
3
,
"id"
:
270352
,
"graphic"
:
""
},
{
"orderSort"
:
0
,
"isRequired"
:
false
,
"features"
:
[
{
"fvalue"
:
"0"
,
"key"
:
"isQuJianZhi"
},
{
"fvalue"
:
"000"
,
"key"
:
"options"
},
{
"fvalue"
:
"GGCS"
,
"key"
:
"erpAttType"
},
{
"fvalue"
:
"270353"
,
"key"
:
"newErpId"
},
{
"fvalue"
:
"25"
,
"key"
:
"xznum"
},
{
"fvalue"
:
"0"
,
"key"
:
"isShow"
},
{
"fvalue"
:
"0"
,
"key"
:
"isChoosePurchase"
},
{
"fvalue"
:
"0"
,
"key"
:
"isCStore"
},
{
"fvalue"
:
"0"
,
"key"
:
"attrLevel"
},
{
"fvalue"
:
"0"
,
"key"
:
"isCoreProperty"
},
{
"fvalue"
:
"psc"
,
"key"
:
"valUnit"
},
{
"fvalue"
:
"0"
,
"key"
:
"isRequired"
},
{
"fvalue"
:
"0"
,
"key"
:
"isSearch"
},
{
"fvalue"
:
"0"
,
"key"
:
"isCStoreRequired"
}
],
"catId"
:
33458
,
"attributeType"
:
3
,
"name"
:
"包装规格(MPQ)"
,
"attrValueList"
:
[],
"inputType"
:
3
,
"id"
:
270353
,
"graphic"
:
""
},
{
"orderSort"
:
0
,
"isRequired"
:
true
,
"features"
:
[
{
"fvalue"
:
"1"
,
"key"
:
"isRequired"
},
{
"fvalue"
:
"0"
,
"key"
:
"isCoreProperty"
},
{
"fvalue"
:
"0"
,
"key"
:
"isQuJianZhi"
},
{
"fvalue"
:
"GGCS"
,
"key"
:
"erpAttType"
},
{
"fvalue"
:
"0"
,
"key"
:
"isSearch"
},
{
"fvalue"
:
"100"
,
"key"
:
"options"
},
{
"fvalue"
:
"270354"
,
"key"
:
"newErpId"
},
{
"fvalue"
:
"0"
,
"key"
:
"isCStoreRequired"
},
{
"fvalue"
:
"0"
,
"key"
:
"isChoosePurchase"
},
{
"fvalue"
:
"0"
,
"key"
:
"isShow"
},
{
"fvalue"
:
"0"
,
"key"
:
"isCStore"
},
{
"fvalue"
:
"0"
,
"key"
:
"attrLevel"
}
],
"catId"
:
33458
,
"attributeType"
:
3
,
"name"
:
"销售单位"
,
"attrValueList"
:
[
{
"attId"
:
270354
,
"catId"
:
33458
,
"orderSort"
:
0
,
"name"
:
"包"
,
"id"
:
1639264
},
{
"attId"
:
270354
,
"catId"
:
33458
,
"orderSort"
:
1
,
"name"
:
"颗"
,
"id"
:
1639265
},
{
"attId"
:
270354
,
"catId"
:
33458
,
"orderSort"
:
2
,
"name"
:
"张"
,
"id"
:
1639266
},
{
"attId"
:
270354
,
"catId"
:
33458
,
"orderSort"
:
3
,
"name"
:
"个"
,
"id"
:
1639267
},
{
"attId"
:
270354
,
"catId"
:
33458
,
"orderSort"
:
4
,
"name"
:
"支"
,
"id"
:
1639268
},
{
"attId"
:
270354
,
"catId"
:
33458
,
"orderSort"
:
5
,
"name"
:
"本"
,
"id"
:
1639269
},
{
"attId"
:
270354
,
"catId"
:
33458
,
"orderSort"
:
6
,
"name"
:
"箱"
,
"id"
:
1639270
},
{
"attId"
:
270354
,
"catId"
:
33458
,
"orderSort"
:
7
,
"name"
:
"根"
,
"id"
:
1639271
},
{
"attId"
:
270354
,
"catId"
:
33458
,
"orderSort"
:
8
,
"name"
:
"片"
,
"id"
:
1639272
},
{
"attId"
:
270354
,
"catId"
:
33458
,
"orderSort"
:
9
,
"name"
:
"盒"
,
"id"
:
1639273
},
{
"attId"
:
270354
,
"catId"
:
33458
,
"orderSort"
:
10
,
"name"
:
"套"
,
"id"
:
1639274
},
{
"attId"
:
270354
,
"catId"
:
33458
,
"orderSort"
:
11
,
"name"
:
"打"
,
"id"
:
1639275
},
{
"attId"
:
270354
,
"catId"
:
33458
,
"orderSort"
:
12
,
"name"
:
"盘"
,
"id"
:
1639276
},
{
"attId"
:
270354
,
"catId"
:
33458
,
"orderSort"
:
13
,
"name"
:
"条"
,
"id"
:
1639277
},
{
"attId"
:
270354
,
"catId"
:
33458
,
"orderSort"
:
14
,
"name"
:
"部"
,
"id"
:
1639278
},
{
"attId"
:
270354
,
"catId"
:
33458
,
"orderSort"
:
15
,
"name"
:
"百个"
,
"id"
:
1639279
},
{
"attId"
:
270354
,
"catId"
:
33458
,
"orderSort"
:
16
,
"name"
:
"只"
,
"id"
:
1639280
},
{
"attId"
:
270354
,
"catId"
:
33458
,
"orderSort"
:
17
,
"name"
:
"米"
,
"id"
:
1639281
},
{
"attId"
:
270354
,
"catId"
:
33458
,
"orderSort"
:
18
,
"name"
:
"件"
,
"id"
:
1639282
},
{
"attId"
:
270354
,
"catId"
:
33458
,
"orderSort"
:
19
,
"name"
:
"卷"
,
"id"
:
1639283
},
{
"attId"
:
270354
,
"catId"
:
33458
,
"orderSort"
:
20
,
"name"
:
"台"
,
"id"
:
1639284
},
{
"attId"
:
270354
,
"catId"
:
33458
,
"orderSort"
:
21
,
"name"
:
"板"
,
"id"
:
1639285
}
],
"inputType"
:
1
,
"id"
:
270354
,
"graphic"
:
""
},
{
"orderSort"
:
9
,
"isRequired"
:
false
,
"features"
:
[
{
"fvalue"
:
"0"
,
"key"
:
"attributeLock"
},
{
"fvalue"
:
"0"
,
"key"
:
"isRequired"
},
{
"fvalue"
:
"000"
,
"key"
:
"options"
},
{
"fvalue"
:
"237667"
,
"key"
:
"newErpId"
},
{
"fvalue"
:
"KZSX"
,
"key"
:
"erpAttType"
},
{
"fvalue"
:
"0"
,
"key"
:
"isCStoreRequired"
},
{
"fvalue"
:
"1"
,
"key"
:
"isSearch"
},
{
"fvalue"
:
"0"
,
"key"
:
"attrLevel"
}
],
"catId"
:
33593
,
"attributeType"
:
3
,
"name"
:
"行业应用"
,
"attrValueList"
:
[
{
"attId"
:
237667
,
"catId"
:
33593
,
"orderSort"
:
57
,
"name"
:
"工业"
,
"id"
:
1345727
},
{
"attId"
:
237667
,
"catId"
:
33593
,
"orderSort"
:
58
,
"name"
:
"航空"
,
"id"
:
1345743
},
{
"attId"
:
237667
,
"catId"
:
33593
,
"orderSort"
:
59
,
"name"
:
"航天"
,
"id"
:
1345804
},
{
"attId"
:
237667
,
"catId"
:
33593
,
"orderSort"
:
60
,
"name"
:
"其它"
,
"id"
:
1345779
},
{
"attId"
:
237667
,
"catId"
:
33593
,
"orderSort"
:
61
,
"name"
:
"汽车"
,
"id"
:
1345760
},
{
"attId"
:
237667
,
"catId"
:
33593
,
"orderSort"
:
62
,
"name"
:
"通信"
,
"id"
:
1345823
},
{
"attId"
:
237667
,
"catId"
:
33593
,
"orderSort"
:
63
,
"name"
:
"消费"
,
"id"
:
1345841
},
{
"attId"
:
237667
,
"catId"
:
33593
,
"orderSort"
:
64
,
"name"
:
"医疗"
,
"id"
:
1345861
}
],
"inputType"
:
2
,
"id"
:
237667
,
"graphic"
:
""
},
{
"orderSort"
:
70
,
"isRequired"
:
false
,
"features"
:
[
{
"fvalue"
:
"0"
,
"key"
:
"attributeLock"
},
{
"fvalue"
:
"25"
,
"key"
:
"xzstr"
},
{
"fvalue"
:
"0"
,
"key"
:
"isRequired"
},
{
"fvalue"
:
"000"
,
"key"
:
"options"
},
{
"fvalue"
:
"GGCS"
,
"key"
:
"erpAttType"
},
{
"fvalue"
:
"0"
,
"key"
:
"isCStoreRequired"
},
{
"fvalue"
:
"1"
,
"key"
:
"isSearch"
},
{
"fvalue"
:
"236916"
,
"key"
:
"newErpId"
},
{
"fvalue"
:
"0"
,
"key"
:
"isShow"
},
{
"fvalue"
:
"0"
,
"key"
:
"attrLevel"
}
],
"catId"
:
33593
,
"attributeType"
:
3
,
"name"
:
"封装规格"
,
"attrValueList"
:
[],
"inputType"
:
3
,
"id"
:
236916
,
"graphic"
:
""
},
{
"orderSort"
:
72
,
"isRequired"
:
true
,
"features"
:
[
{
"fvalue"
:
"1"
,
"key"
:
"isRequired"
},
{
"fvalue"
:
"0"
,
"key"
:
"attributeLock"
},
{
"fvalue"
:
"25"
,
"key"
:
"xzstr"
},
{
"fvalue"
:
"GGCS"
,
"key"
:
"erpAttType"
},
{
"fvalue"
:
"100"
,
"key"
:
"options"
},
{
"fvalue"
:
"236922"
,
"key"
:
"newErpId"
},
{
"fvalue"
:
"0"
,
"key"
:
"isCStoreRequired"
},
{
"fvalue"
:
"1"
,
"key"
:
"isSearch"
},
{
"fvalue"
:
"0"
,
"key"
:
"isShow"
},
{
"fvalue"
:
"0"
,
"key"
:
"attrLevel"
}
],
"catId"
:
33593
,
"attributeType"
:
3
,
"name"
:
"开关电路"
,
"attrValueList"
:
[],
"inputType"
:
3
,
"id"
:
236922
,
"graphic"
:
""
},
{
"orderSort"
:
73
,
"isRequired"
:
true
,
"features"
:
[
{
"fvalue"
:
"1"
,
"key"
:
"isRequired"
},
{
"fvalue"
:
"0"
,
"key"
:
"attributeLock"
},
{
"fvalue"
:
"25"
,
"key"
:
"xzstr"
},
{
"fvalue"
:
"GGCS"
,
"key"
:
"erpAttType"
},
{
"fvalue"
:
"100"
,
"key"
:
"options"
},
{
"fvalue"
:
"236936"
,
"key"
:
"newErpId"
},
{
"fvalue"
:
"0"
,
"key"
:
"isCStoreRequired"
},
{
"fvalue"
:
"1"
,
"key"
:
"isSearch"
},
{
"fvalue"
:
"0"
,
"key"
:
"isShow"
},
{
"fvalue"
:
"0"
,
"key"
:
"attrLevel"
}
],
"catId"
:
33593
,
"attributeType"
:
3
,
"name"
:
"通道数"
,
"attrValueList"
:
[],
"inputType"
:
3
,
"id"
:
236936
,
"graphic"
:
""
},
{
"orderSort"
:
74
,
"isRequired"
:
true
,
"features"
:
[
{
"fvalue"
:
"1"
,
"key"
:
"isRequired"
},
{
"fvalue"
:
"0"
,
"key"
:
"attributeLock"
},
{
"fvalue"
:
"25"
,
"key"
:
"xzstr"
},
{
"fvalue"
:
"GGCS"
,
"key"
:
"erpAttType"
},
{
"fvalue"
:
"100"
,
"key"
:
"options"
},
{
"fvalue"
:
"0"
,
"key"
:
"isCStoreRequired"
},
{
"fvalue"
:
"1"
,
"key"
:
"isSearch"
},
{
"fvalue"
:
"0"
,
"key"
:
"isShow"
},
{
"fvalue"
:
"237498"
,
"key"
:
"newErpId"
},
{
"fvalue"
:
"0"
,
"key"
:
"attrLevel"
}
],
"catId"
:
33593
,
"attributeType"
:
3
,
"name"
:
"规格型号(MPN)"
,
"attrValueList"
:
[],
"inputType"
:
3
,
"id"
:
237498
,
"graphic"
:
""
},
{
"orderSort"
:
75
,
"isRequired"
:
false
,
"features"
:
[
{
"fvalue"
:
"25"
,
"key"
:
"xzstr"
},
{
"fvalue"
:
"0"
,
"key"
:
"isRequired"
},
{
"fvalue"
:
"236977"
,
"key"
:
"newErpId"
},
{
"fvalue"
:
"000"
,
"key"
:
"options"
},
{
"fvalue"
:
"GGCS"
,
"key"
:
"erpAttType"
},
{
"fvalue"
:
"0"
,
"key"
:
"isShow"
}
],
"catId"
:
33593
,
"attributeType"
:
3
,
"name"
:
"ECCN"
,
"attrValueList"
:
[],
"inputType"
:
3
,
"id"
:
236977
,
"graphic"
:
""
},
{
"orderSort"
:
76
,
"isRequired"
:
false
,
"features"
:
[
{
"fvalue"
:
"25"
,
"key"
:
"xzstr"
},
{
"fvalue"
:
"0"
,
"key"
:
"isRequired"
},
{
"fvalue"
:
"000"
,
"key"
:
"options"
},
{
"fvalue"
:
"GGCS"
,
"key"
:
"erpAttType"
},
{
"fvalue"
:
"237006"
,
"key"
:
"newErpId"
},
{
"fvalue"
:
"0"
,
"key"
:
"isShow"
}
],
"catId"
:
33593
,
"attributeType"
:
3
,
"name"
:
"RoHS"
,
"attrValueList"
:
[],
"inputType"
:
3
,
"id"
:
237006
,
"graphic"
:
""
},
{
"orderSort"
:
77
,
"isRequired"
:
false
,
"features"
:
[
{
"fvalue"
:
"25"
,
"key"
:
"xzstr"
},
{
"fvalue"
:
"0"
,
"key"
:
"isRequired"
},
{
"fvalue"
:
"237027"
,
"key"
:
"newErpId"
},
{
"fvalue"
:
"000"
,
"key"
:
"options"
},
{
"fvalue"
:
"GGCS"
,
"key"
:
"erpAttType"
},
{
"fvalue"
:
"0"
,
"key"
:
"isShow"
}
],
"catId"
:
33593
,
"attributeType"
:
3
,
"name"
:
"海关编码"
,
"attrValueList"
:
[],
"inputType"
:
3
,
"id"
:
237027
,
"graphic"
:
""
},
{
"orderSort"
:
78
,
"isRequired"
:
false
,
"features"
:
[
{
"fvalue"
:
"25"
,
"key"
:
"xzstr"
},
{
"fvalue"
:
"0"
,
"key"
:
"isRequired"
},
{
"fvalue"
:
"000"
,
"key"
:
"options"
},
{
"fvalue"
:
"GGCS"
,
"key"
:
"erpAttType"
},
{
"fvalue"
:
"0"
,
"key"
:
"isShow"
},
{
"fvalue"
:
"237056"
,
"key"
:
"newErpId"
}
],
"catId"
:
33593
,
"attributeType"
:
3
,
"name"
:
"生命周期"
,
"attrValueList"
:
[],
"inputType"
:
3
,
"id"
:
237056
,
"graphic"
:
""
},
{
"orderSort"
:
79
,
"isRequired"
:
false
,
"features"
:
[
{
"fvalue"
:
"25"
,
"key"
:
"xzstr"
},
{
"fvalue"
:
"0"
,
"key"
:
"isRequired"
},
{
"fvalue"
:
"000"
,
"key"
:
"options"
},
{
"fvalue"
:
"GGCS"
,
"key"
:
"erpAttType"
},
{
"fvalue"
:
"0"
,
"key"
:
"isShow"
},
{
"fvalue"
:
"237081"
,
"key"
:
"newErpId"
}
],
"catId"
:
33593
,
"attributeType"
:
3
,
"name"
:
"应用级别"
,
"attrValueList"
:
[],
"inputType"
:
3
,
"id"
:
237081
,
"graphic"
:
""
},
{
"orderSort"
:
265
,
"isRequired"
:
true
,
"features"
:
[
{
"fvalue"
:
"1"
,
"key"
:
"isRequired"
},
{
"fvalue"
:
"25"
,
"key"
:
"xzstr"
},
{
"fvalue"
:
"GGCS"
,
"key"
:
"erpAttType"
},
{
"fvalue"
:
"0"
,
"key"
:
"isShow"
},
{
"fvalue"
:
"100"
,
"key"
:
"options"
},
{
"fvalue"
:
"274466"
,
"key"
:
"newErpId"
}
],
"catId"
:
33593
,
"attributeType"
:
3
,
"name"
:
"包装方式"
,
"attrValueList"
:
[],
"inputType"
:
3
,
"id"
:
274466
,
"graphic"
:
""
}
]
}
}
\ No newline at end of file
test5.py
View file @
806bac94
...
...
@@ -97,7 +97,6 @@ def get_pop_attr(class_id: int):
"field"
:
"attrValueList"
}
ans
=
request_to_jd_pop
(
method_name
,
token
,
app_key
,
app_secret
,
param
)
print
(
json
.
dumps
(
ans
,
ensure_ascii
=
False
))
return
ans
def
insert_pop_class_to_db
():
...
...
@@ -137,9 +136,58 @@ def insert_pop_attr_to_db():
result
=
cursor
.
fetchall
()
for
i
in
range
(
len
(
result
)):
class_id
=
result
[
i
][
0
]
ans
=
get_pop_attr
(
class_id
)
result
=
ans
[
"jingdong_category_read_findAttrsByCategoryIdUnlimitCate_responce"
][
"findattrsbycategoryidunlimitcate_result"
]
for
j
in
range
(
len
(
result
)):
input_type
=
result
[
j
][
"inputType"
]
attr_id
=
result
[
j
][
"id"
]
attr_name
=
result
[
j
][
"name"
]
enum_value
=
""
flag
=
result
[
j
][
"isRequired"
]
status
=
1
platform
=
3
create_time
=
int
(
time
.
time
())
unit
=
""
if
flag
:
is_required
=
1
else
:
is_required
=
0
if
input_type
==
1
or
input_type
==
2
:
value_list
=
result
[
j
][
"attrValueList"
]
tmp_list
=
[]
for
k
in
range
(
len
(
value_list
)):
attr_value_id
=
value_list
[
k
][
"id"
]
attr_value_name
=
value_list
[
k
][
"name"
]
item
=
{
"attr_value_id"
:
attr_value_id
,
"attr_value_name"
:
attr_value_name
}
tmp_list
.
append
(
item
)
enum_value
=
json
.
dumps
(
tmp_list
,
ensure_ascii
=
False
)
else
:
enum_value
=
"[]"
if
input_type
==
10
:
# 单独处理单位
features
=
result
[
j
][
"features"
]
for
k
in
range
(
len
(
features
)):
item
=
features
[
k
]
if
item
[
"key"
]
==
"combinationValue"
:
unit_str
=
item
[
"fvalue"
]
unit_arr
=
json
.
loads
(
unit_str
)
unit_item
=
unit_arr
[
0
]
unit_list
=
unit_item
[
"unit"
]
unit
=
json
.
dumps
(
unit_list
,
ensure_ascii
=
False
)
insert_sql
=
"insert into lie_shop_attr (class_id, attr_id, attr_name, unit, enum_value, input_type, is_required, status, platform, create_time) values (
%
s,
%
s,
%
s,
%
s,
%
s,
%
s,
%
s,
%
s,
%
s,
%
s)"
cursor
.
execute
(
query
=
insert_sql
,
args
=
(
class_id
,
attr_id
,
attr_name
,
unit
,
enum_value
,
input_type
,
is_required
,
status
,
platform
,
create_time
,))
db
.
commit
()
print
(
insert_sql
%
(
class_id
,
attr_id
,
attr_name
,
unit
,
enum_value
,
input_type
,
is_required
,
status
,
platform
,
create_time
))
if
__name__
==
'__main__'
:
insert_pop_class_to_db
()
\ No newline at end of file
ans
=
get_pop_attr
(
33593
)
print
(
json
.
dumps
(
ans
,
ensure_ascii
=
False
))
\ 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