|  | @@ -12,6 +12,7 @@ import com.tzld.piaoquan.recommend.feature.domain.ad.base.AdRankItem;
 | 
											
												
													
														|  |  import com.tzld.piaoquan.recommend.feature.domain.ad.base.AdRequestContext;
 |  |  import com.tzld.piaoquan.recommend.feature.domain.ad.base.AdRequestContext;
 | 
											
												
													
														|  |  import lombok.extern.slf4j.Slf4j;
 |  |  import lombok.extern.slf4j.Slf4j;
 | 
											
												
													
														|  |  import org.apache.commons.collections4.CollectionUtils;
 |  |  import org.apache.commons.collections4.CollectionUtils;
 | 
											
												
													
														|  | 
 |  | +import org.apache.commons.collections4.MapUtils;
 | 
											
												
													
														|  |  import org.springframework.beans.factory.annotation.Autowired;
 |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
											
												
													
														|  |  import org.springframework.beans.factory.annotation.Value;
 |  |  import org.springframework.beans.factory.annotation.Value;
 | 
											
												
													
														|  |  import org.springframework.stereotype.Service;
 |  |  import org.springframework.stereotype.Service;
 | 
											
										
											
												
													
														|  | @@ -71,6 +72,7 @@ public class LogHubServiceImpl implements LogHubService {
 | 
											
												
													
														|  |                      JSONObject json = new JSONObject();
 |  |                      JSONObject json = new JSONObject();
 | 
											
												
													
														|  |                      json.put("cid", rankItem.getAdId());
 |  |                      json.put("cid", rankItem.getAdId());
 | 
											
												
													
														|  |                      json.put("score", rankItem.getScore());
 |  |                      json.put("score", rankItem.getScore());
 | 
											
												
													
														|  | 
 |  | +                    json.put("scoremap", rankItem.getScoreMap());
 | 
											
												
													
														|  |                      JSONObject featureJson = new JSONObject();
 |  |                      JSONObject featureJson = new JSONObject();
 | 
											
												
													
														|  |                      for (Map.Entry<String, String> entry : rankItem.getFeatureMap().entrySet()) {
 |  |                      for (Map.Entry<String, String> entry : rankItem.getFeatureMap().entrySet()) {
 | 
											
												
													
														|  |                          if (FEATURE_FIELD_SET.contains(entry.getKey())) {
 |  |                          if (FEATURE_FIELD_SET.contains(entry.getKey())) {
 | 
											
										
											
												
													
														|  | @@ -82,7 +84,9 @@ public class LogHubServiceImpl implements LogHubService {
 | 
											
												
													
														|  |                              featureJson.put(entry.getKey(), entry.getValue());
 |  |                              featureJson.put(entry.getKey(), entry.getValue());
 | 
											
												
													
														|  |                          }
 |  |                          }
 | 
											
												
													
														|  |                      }
 |  |                      }
 | 
											
												
													
														|  | -                    json.put("feature", featureJson);
 |  | 
 | 
											
												
													
														|  | 
 |  | +                    if (MapUtils.isNotEmpty(featureJson)) {
 | 
											
												
													
														|  | 
 |  | +                        json.put("feature", featureJson);
 | 
											
												
													
														|  | 
 |  | +                    }
 | 
											
												
													
														|  |                      scoreResult.add(json);
 |  |                      scoreResult.add(json);
 | 
											
												
													
														|  |                  }
 |  |                  }
 | 
											
												
													
														|  |  
 |  |  
 |