Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
Z
zion
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
zion
Commits
b568d79a
提交
b568d79a
authored
11月 29, 2019
作者:
梁业锦
💬
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复最后的BUG
上级
63f45184
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
1 行增加
和
6 行删除
+1
-6
AdidasSpider.java
...va/com/diaoyun/zion/chinafrica/bis/impl/AdidasSpider.java
+1
-1
HmSpider.java
...n/java/com/diaoyun/zion/chinafrica/bis/impl/HmSpider.java
+0
-5
没有找到文件。
src/main/java/com/diaoyun/zion/chinafrica/bis/impl/AdidasSpider.java
浏览文件 @
b568d79a
...
@@ -139,7 +139,7 @@ public class AdidasSpider implements IItemSpider {
...
@@ -139,7 +139,7 @@ public class AdidasSpider implements IItemSpider {
///////////////////////// 获取商品尺码属性 END////////////////////
///////////////////////// 获取商品尺码属性 END////////////////////
// 库存对应的id(颜色id + 尺码id)
// 库存对应的id(颜色id + 尺码id)
String
skuStr
=
";"
+
color
No
+
";"
+
size
+
";"
;
String
skuStr
=
";"
+
color
+
";"
+
size
+
";"
;
//////////////////////////////////// 获取库存 ////////////////////////////////////////////
//////////////////////////////////// 获取库存 ////////////////////////////////////////////
// 设置:商品包含库存信息
// 设置:商品包含库存信息
...
...
src/main/java/com/diaoyun/zion/chinafrica/bis/impl/HmSpider.java
浏览文件 @
b568d79a
...
@@ -4,7 +4,6 @@ import com.diaoyun.zion.chinafrica.bis.IItemSpider;
...
@@ -4,7 +4,6 @@ import com.diaoyun.zion.chinafrica.bis.IItemSpider;
import
com.diaoyun.zion.chinafrica.enums.PlatformEnum
;
import
com.diaoyun.zion.chinafrica.enums.PlatformEnum
;
import
com.diaoyun.zion.chinafrica.vo.*
;
import
com.diaoyun.zion.chinafrica.vo.*
;
import
com.diaoyun.zion.master.util.HttpClientUtil
;
import
com.diaoyun.zion.master.util.HttpClientUtil
;
import
com.diaoyun.zion.master.util.SpiderUtil
;
import
com.diaoyun.zion.master.util.TranslateHelper
;
import
com.diaoyun.zion.master.util.TranslateHelper
;
import
net.sf.json.JSONObject
;
import
net.sf.json.JSONObject
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
...
@@ -91,7 +90,6 @@ public class HmSpider implements IItemSpider {
...
@@ -91,7 +90,6 @@ public class HmSpider implements IItemSpider {
// 获取原始价
// 获取原始价
String
fullPrice
=
document
.
select
(
"meta[property=product:price:amount]"
).
attr
(
"content"
);
String
fullPrice
=
document
.
select
(
"meta[property=product:price:amount]"
).
attr
(
"content"
);
fullPrice
=
SpiderUtil
.
retainNumber
(
fullPrice
);
// TODO 转换汇率,目前商品单位是人民币
// TODO 转换汇率,目前商品单位是人民币
fullPrice
=
exchangeRate
(
fullPrice
);
fullPrice
=
exchangeRate
(
fullPrice
);
...
@@ -106,7 +104,6 @@ public class HmSpider implements IItemSpider {
...
@@ -106,7 +104,6 @@ public class HmSpider implements IItemSpider {
}
}
}
}
for
(
String
url
:
urlList
)
{
for
(
String
url
:
urlList
)
{
content
=
HttpClientUtil
.
getContentByUrl
(
url
,
PlatformEnum
.
HM
.
getValue
());
content
=
HttpClientUtil
.
getContentByUrl
(
url
,
PlatformEnum
.
HM
.
getValue
());
...
@@ -173,8 +170,6 @@ public class HmSpider implements IItemSpider {
...
@@ -173,8 +170,6 @@ public class HmSpider implements IItemSpider {
productResponse
.
setPrice
(
fullPrice
);
productResponse
.
setPrice
(
fullPrice
);
productResponse
.
setSalePrice
(
fullPrice
+
"-"
+
fullPrice
);
productResponse
.
setSalePrice
(
fullPrice
+
"-"
+
fullPrice
);
//////////////////////////////////// 获取原始价 END//////////////////////////////////
//////////////////////////////////// 获取原始价 END//////////////////////////////////
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论