|
|
package com.yoho.search.service.base;
|
|
|
package com.yoho.search.consumer.service.base;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONException;
|
|
|
import com.yoho.search.dal.model.ProductIndex;
|
|
|
import com.yoho.search.service.logic.SpecialDealLogicService;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.Map;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONException;
|
|
|
import com.yoho.search.consumer.service.logic.SpecialDealLogicService;
|
|
|
import com.yoho.search.dal.model.ProductIndex;
|
|
|
|
|
|
@Component
|
|
|
//@Transactional
|
|
|
public class ProductIndexService {
|
|
|
|
|
|
private final Logger logger = LoggerFactory.getLogger(ProductIndexService.class);
|
|
|
|
|
|
|
|
|
@SuppressWarnings({ "rawtypes", "unchecked" })
|
|
|
public Map<String, Object> beanToMap(ProductIndex productIndex) {
|
|
|
Map map = new HashMap();
|
...
|
...
|
@@ -109,7 +109,7 @@ public class ProductIndexService { |
|
|
map.put("productSkn", productIndex.getProductSkn());
|
|
|
temp = productIndex.getStorageNum();
|
|
|
if (temp != null) {
|
|
|
map.put("storageNum", productIndex.getStorageNum().longValue());
|
|
|
map.put("storageNum", productIndex.getStorageNum().longValue());
|
|
|
}
|
|
|
map.put("islimited", productIndex.getIslimited());
|
|
|
map.put("isnew", productIndex.getIsnew());
|
...
|
...
|
@@ -138,20 +138,19 @@ public class ProductIndexService { |
|
|
map.put("middleSort", productIndex.getMiddleSort());
|
|
|
map.put("smallSort", productIndex.getSmallSort());
|
|
|
map.put("basePinRatio", productIndex.getBasePinRatio());
|
|
|
|
|
|
|
|
|
map.put("breakingRate", productIndex.getBreakingRate());
|
|
|
map.put("discountScore", productIndex.getDiscountScore());
|
|
|
map.put("poolId", productIndex.getPoolId());
|
|
|
map.put("productKeyword", productIndex.getProductKeyword());
|
|
|
|
|
|
|
|
|
SpecialDealLogicService.specialDealProductIndex(productIndex);
|
|
|
SpecialDealLogicService.specialDealProductIndex(productIndex);
|
|
|
String ageLevel = productIndex.getAgeLevel();
|
|
|
map.put("ageLevel", ageLevel);
|
|
|
|
|
|
map.put("isGlobal", productIndex.getIsGlobal());
|
|
|
map.put("isGlobal", productIndex.getIsGlobal());
|
|
|
map.put("appType", productIndex.getAppType());
|
|
|
|
|
|
|
|
|
map.put("studentPrice", productIndex.getStudentPrice());
|
|
|
map.put("isStudentPrice", productIndex.getIsStudentPrice());
|
|
|
map.put("isInstalment", productIndex.getIsInstalment());
|
...
|
...
|
@@ -184,5 +183,5 @@ public class ProductIndexService { |
|
|
map.put("searchPageProdBoost", productIndex.getSearchPageProdBoost());
|
|
|
return map;
|
|
|
}
|
|
|
|
|
|
|
|
|
} |
...
|
...
|
|