Authored by 胡古飞

revert

... ... @@ -2,9 +2,11 @@ package com.yoho.search.consumer.service.logic;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yoho.search.base.utils.DateUtil;
import com.yoho.search.consumer.service.base.*;
import com.yoho.search.consumer.service.bo.ProductIndexBO;
import com.yoho.search.dal.model.*;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
... ... @@ -436,11 +438,11 @@ public class TblLogicService {
if (null != tblProduct.getShelfTime()) {
productIndexBO.setShelveTime(Integer.valueOf(tblProduct.getShelfTime()));
productIndexBO.setFirstShelveTime(productIndexBO.getShelveTime());
productIndexBO.setShelveDay(new Date(productIndexBO.getShelveTime()).toString());
productIndexBO.setShelveDay(DateUtil.TimeStamp2DateWithFormat(Long.valueOf(productIndexBO.getShelveTime()),"yyyy-MM-dd"));
}
productIndexBO.setEditTime(null == tblProduct.getUpdateTime() ? null : Integer.valueOf(tblProduct.getUpdateTime()));
productIndexBO.setMarketPrice(null == tblProduct.getOrignPrice() ? null : tblProduct.getOrignPrice());
productIndexBO.setSalesPrice(null == tblProduct.getGoodsPrice() ? null : tblProduct.getGoodsPrice());
productIndexBO.setMarketPrice(null == tblProduct.getOrignPrice() ? new BigDecimal(0) : tblProduct.getOrignPrice());
productIndexBO.setSalesPrice(null == tblProduct.getGoodsPrice() ? new BigDecimal(0) : tblProduct.getGoodsPrice());
if (productIndexBO.getSalesPrice() != null) {
if (productIndexBO.getMarketPrice() != null && productIndexBO.getMarketPrice().doubleValue() != 0d) {
BigDecimal promotionDiscount = productIndexBO.getSalesPrice().divide(productIndexBO.getMarketPrice(), 4, BigDecimal.ROUND_HALF_UP);
... ...