...
|
...
|
@@ -18,6 +18,7 @@ import com.yohobuy.ufo.model.enums.InboxBusinessTypeEnum; |
|
|
import com.yohobuy.ufo.model.request.product.ProductRequestBatchBo;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.elasticsearch.common.collect.Lists;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.BeanUtils;
|
...
|
...
|
@@ -287,6 +288,17 @@ public class ProductServiceImpl implements IProductService, ApplicationContextAw |
|
|
if (CollectionUtils.isNotEmpty(storages)) {
|
|
|
bo.setStorageIdList(CollectionUtil.map(storages, Storage::getId));
|
|
|
bo.setSizeIdList(CollectionUtil.map(storages, Storage::getSizeId));
|
|
|
List<BigDecimal> suggestLowPriceList = CollectionUtil.map(storages, Storage::getSuggestLowPrice);
|
|
|
List<BigDecimal> suggestHighPriceList = CollectionUtil.map(storages, Storage::getSuggestHighPrice);
|
|
|
List<String> suggestPriceList = Lists.newArrayList();
|
|
|
for(int i=0; i<bo.getStorageIdList().size(); i++) {
|
|
|
String suggestPrice = "-";
|
|
|
if(null != suggestLowPriceList.get(i) && null != suggestHighPriceList.get(i)) {
|
|
|
suggestPrice = String.format("%d", suggestLowPriceList.get(i).intValue()) + " ~ " + String.format("%d", suggestHighPriceList.get(i).intValue());
|
|
|
}
|
|
|
suggestPriceList.add(suggestPrice);
|
|
|
}
|
|
|
bo.setSuggestPriceList(suggestPriceList);
|
|
|
}
|
|
|
return new ApiResponse<ProductEditResponceBo>(bo);
|
|
|
}
|
...
|
...
|
|