Authored by gemingdan

+log

... ... @@ -92,6 +92,7 @@ public class PromotionProductMqListener extends AbstractMqListener implements Ch
private void updateProductIndex(Integer productSkn, long currentTimeMillis,String key){
String promotionIds=promotionProductService.getPromotionIds(productSkn);
Integer productId=productService.selectProductIdBySkn(productSkn);
logger.info("[func=updateProductIndex][step=saveToES][key={}][productId={}][promotionIds={}]", key,productId, promotionIds);
Map<String, Object> indexData = new HashMap<String, Object>();
indexData.put("productId", productId);
indexData.put("promotionIds", promotionIds);
... ...
... ... @@ -21,13 +21,12 @@ public class PromotionProductService {
public String getPromotionIds(Integer skn){
List<PromotionProduct> list = promotionProductMapper.selectListBySkn(skn);
StringBuffer result=new StringBuffer();
StringBuffer result=new StringBuffer("");
for(PromotionProduct pp:list){
result.append(pp.getPromotionId()).append(",");
}
System.out.println(result.toString());
if(result.length()<2){
return null;
if(result.length()<1){
return "";
}
return result.substring(0,result.length()-1);
}
... ...