Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
Z
zion
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
zion
Commits
b1ee38af
提交
b1ee38af
authored
11月 29, 2019
作者:
梁业锦
💬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复PullAndBear和Zara的爬虫导致的尺码混乱的问题
上级
a81d48e5
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
6 行增加
和
8 行删除
+6
-8
PullandbearSpider.java
...m/diaoyun/zion/chinafrica/bis/impl/PullandbearSpider.java
+3
-3
ZaraSpider.java
...java/com/diaoyun/zion/chinafrica/bis/impl/ZaraSpider.java
+3
-5
没有找到文件。
src/main/java/com/diaoyun/zion/chinafrica/bis/impl/PullandbearSpider.java
浏览文件 @
b1ee38af
...
@@ -121,12 +121,12 @@ public class PullandbearSpider implements IItemSpider {
...
@@ -121,12 +121,12 @@ public class PullandbearSpider implements IItemSpider {
JSONObject
sizesObj
=
sizesArr
.
getJSONObject
(
j
);
JSONObject
sizesObj
=
sizesArr
.
getJSONObject
(
j
);
///////////////////////// 获取商品尺码属性 ////////////////////
///////////////////////// 获取商品尺码属性 ////////////////////
String
sizeNo
=
sizesObj
.
getString
(
"sku"
);
//
String sizeNo = sizesObj.getString("sku");
String
size
=
sizesObj
.
getString
(
"name"
);
String
size
=
sizesObj
.
getString
(
"name"
);
ProductProp
productPropSize
=
new
ProductProp
();
ProductProp
productPropSize
=
new
ProductProp
();
productPropSize
.
setPropName
(
size
);
productPropSize
.
setPropName
(
size
);
productPropSize
.
setPropId
(
size
No
);
productPropSize
.
setPropId
(
size
);
sizePropSetSize
.
add
(
productPropSize
);
sizePropSetSize
.
add
(
productPropSize
);
if
(
productPropSet
.
get
(
"尺码"
)
==
null
)
{
if
(
productPropSet
.
get
(
"尺码"
)
==
null
)
{
productPropSet
.
put
(
"尺码"
,
sizePropSetSize
);
productPropSet
.
put
(
"尺码"
,
sizePropSetSize
);
...
@@ -138,7 +138,7 @@ public class PullandbearSpider implements IItemSpider {
...
@@ -138,7 +138,7 @@ public class PullandbearSpider implements IItemSpider {
///////////////////////// 获取商品尺码属性 END////////////////////
///////////////////////// 获取商品尺码属性 END////////////////////
// 商品的库存id
// 商品的库存id
String
skuStr
=
";"
+
colorNo
+
";"
+
size
No
+
";"
;
String
skuStr
=
";"
+
colorNo
+
";"
+
size
+
";"
;
//////////////////////////////////// 获取库存 ////////////////////////////////////////////
//////////////////////////////////// 获取库存 ////////////////////////////////////////////
...
...
src/main/java/com/diaoyun/zion/chinafrica/bis/impl/ZaraSpider.java
浏览文件 @
b1ee38af
...
@@ -121,14 +121,12 @@ public class ZaraSpider implements IItemSpider {
...
@@ -121,14 +121,12 @@ public class ZaraSpider implements IItemSpider {
for
(
int
j
=
0
;
j
<
sizesArr
.
size
();
j
++)
{
for
(
int
j
=
0
;
j
<
sizesArr
.
size
();
j
++)
{
JSONObject
sizesObj
=
sizesArr
.
getJSONObject
(
j
);
JSONObject
sizesObj
=
sizesArr
.
getJSONObject
(
j
);
///////////////////////// 获取商品尺码属性 ////////////////////
///////////////////////// 获取商品尺码属性 ////////////////////
// String sizeNo = sizesObj.getString("sku");
String
sizeNo
=
sizesObj
.
getString
(
"sku"
);
String
size
=
sizesObj
.
getString
(
"name"
);
String
size
=
sizesObj
.
getString
(
"name"
);
ProductProp
productPropSize
=
new
ProductProp
();
ProductProp
productPropSize
=
new
ProductProp
();
productPropSize
.
setPropId
(
size
No
);
productPropSize
.
setPropId
(
size
);
productPropSize
.
setPropName
(
size
);
productPropSize
.
setPropName
(
size
);
sizePropSet
.
add
(
productPropSize
);
sizePropSet
.
add
(
productPropSize
);
if
(
productPropSet
.
get
(
"尺码"
)
==
null
)
{
if
(
productPropSet
.
get
(
"尺码"
)
==
null
)
{
...
@@ -141,7 +139,7 @@ public class ZaraSpider implements IItemSpider {
...
@@ -141,7 +139,7 @@ public class ZaraSpider implements IItemSpider {
///////////////////////// 获取商品尺码属性 END////////////////////
///////////////////////// 获取商品尺码属性 END////////////////////
// 库存对应的id(Zara 中以颜色id + 尺码id)
// 库存对应的id(Zara 中以颜色id + 尺码id)
String
skuStr
=
";"
+
colorNo
+
";"
+
size
No
+
";"
;
String
skuStr
=
";"
+
colorNo
+
";"
+
size
+
";"
;
//////////////////////////////////// 获取库存 ////////////////////////////////////////////
//////////////////////////////////// 获取库存 ////////////////////////////////////////////
if
(
productSkuStockList
==
null
)
{
if
(
productSkuStockList
==
null
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论