Authored by wangnan9279

统一storage值为0或1 fix

... ... @@ -141,17 +141,17 @@ public class YohoToUfoIndexBuilder extends IIndexBuilder {
//库存 和 状态
ufoProductIndexBO.setShelveStatus(productIndexBO.getStatus().byteValue());
ufoProductIndexBO.setStorage(1);
if(productIndexBO.getStorageNum()==null || productIndexBO.getStorageNum()==0){
ufoProductIndexBO.setDelStatus((byte)1);
}else{
ufoProductIndexBO.setDelStatus((byte)0);
ufoProductIndexBO.setStorage(productIndexBO.getStorageNum() == null || productIndexBO.getStorageNum() == 0 ? 0 : 1);
if (productIndexBO.getStorageNum() == null || productIndexBO.getStorageNum() == 0) {
ufoProductIndexBO.setDelStatus((byte) 1);
} else {
ufoProductIndexBO.setDelStatus((byte) 0);
}
//销量
if (isYohoProductInUfoSaleNumOpen) {
ufoProductIndexBO.setSalesNum(productIndexBO.getSalesNum());
}else{
} else {
ufoProductIndexBO.setSalesNum(-1);
}
//品牌
... ... @@ -165,8 +165,8 @@ public class YohoToUfoIndexBuilder extends IIndexBuilder {
//图片
yoho2UfoImageService.buildDefaultImage(productIndexBO, ufoProductIndexBO, yoho2ufoProductMap);
ufoProductIndexBOList.add(ufoProductIndexBO);
}catch (Exception e){
logger.error(e.getMessage(),e);
} catch (Exception e) {
logger.error(e.getMessage(), e);
}
}
return ufoProductIndexBOList;
... ...