Commit 0fa03e0e authored by 杨林's avatar 杨林

保存数据到ES的方法

parent e4038ff6
...@@ -16,7 +16,7 @@ object SaveData { ...@@ -16,7 +16,7 @@ object SaveData {
def saveToES(x: Item): String = { def saveToES(x: Item): String = {
// 判断ES是否重复 // 判断ES是否重复
val item_id = x.item_id val item_id = x.item_id
val id = Base64Tools.encode("tb" + item_id) val id = Base64Tools.encode("jd" + item_id)
val exists = ESUtils.getById(id).isExists val exists = ESUtils.getById(id).isExists
if (exists) { if (exists) {
"商品已存在" "商品已存在"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment