|
|
package com.yoho.search.consumer.index.increment.productIndex;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.rabbitmq.client.Channel;
|
|
|
import com.yoho.error.event.SearchEvent;
|
|
|
import com.yoho.search.base.utils.ConvertUtils;
|
...
|
...
|
@@ -92,7 +93,8 @@ public class ActivityProductMqListener extends AbstractMqListener implements Cha |
|
|
Map<String, Object> indexData = new HashMap<>();
|
|
|
indexData.put("productId", productId);
|
|
|
if (CollectionUtils.isEmpty(activityProducts)) {
|
|
|
indexData.put("activities", "");
|
|
|
jsonArray.add(new JSONObject());
|
|
|
indexData.put("activities", jsonArray);
|
|
|
}else{
|
|
|
for (ActivityProduct activityProduct : activityProducts) {
|
|
|
jsonArray.add(activityProductService.getActivities(activityProduct));
|
...
|
...
|
|