|
|
package com.yoho.search.consumer.index.increment;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.rabbitmq.client.Channel;
|
|
|
import com.yoho.error.event.SearchEvent;
|
...
|
...
|
@@ -155,10 +156,15 @@ public class ProductPoolDetailMqListener extends AbstractMqListener implements C |
|
|
}
|
|
|
}
|
|
|
StringBuffer poolId = new StringBuffer();
|
|
|
JSONArray pools = new JSONArray();
|
|
|
for (ProductPoolDetail p : productPoolDetailsTemp) {
|
|
|
if (p.getProductType().equals("1")) {
|
|
|
poolId.append(p.getPoolId());
|
|
|
poolId.append(",");
|
|
|
JSONObject pool = new JSONObject();
|
|
|
pool.put("id",p.getId());
|
|
|
pool.put("pool_id",p.getPoolId());
|
|
|
pools.add(pool);
|
|
|
}
|
|
|
}
|
|
|
Integer productId = productService.selectProductIdBySkn(productPoolDetail.getProductSkn());
|
...
|
...
|
@@ -166,6 +172,7 @@ public class ProductPoolDetailMqListener extends AbstractMqListener implements C |
|
|
Map<String, Object> indexData = new HashMap<String, Object>();
|
|
|
indexData.put("productId", productId);
|
|
|
indexData.put("poolId", poolId.toString());
|
|
|
indexData.put("pools", pools);
|
|
|
this.updateProductIndexWithDataMap(indexData, productId, key, begin);
|
|
|
}
|
|
|
}
|
...
|
...
|
|