...
|
...
|
@@ -7,7 +7,6 @@ import com.yoho.search.consumer.service.base.ProductActivitiesLinkService; |
|
|
import com.yoho.search.consumer.service.bo.*;
|
|
|
import com.yoho.search.dal.*;
|
|
|
import com.yoho.search.dal.model.*;
|
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
...
|
...
|
@@ -34,9 +33,9 @@ public class ProductIndexLogicService { |
|
|
@Autowired
|
|
|
private ProductStyleRelationMapper productStyleRelationMapper;
|
|
|
@Autowired
|
|
|
private FreeSizeProductMapper freeSizeProductMapper;
|
|
|
private BasePinRatioMapper basePinRatioMapper;
|
|
|
@Autowired
|
|
|
private NonfreeSizeProductMapper nonfreeSizeProductMapper;
|
|
|
private BrokenCodeProductMapper brokenCodeProductMapper;
|
|
|
@Autowired
|
|
|
private ProductILogicService productILogicService;
|
|
|
@Autowired
|
...
|
...
|
@@ -56,7 +55,7 @@ public class ProductIndexLogicService { |
|
|
@Autowired
|
|
|
private ProductActivitiesLinkService productActivitiesLinkService;
|
|
|
@Autowired
|
|
|
private DiscountProductMapper discountProductMapper;
|
|
|
private DiscountProductSknMapper discountProductSknMapper;
|
|
|
@Autowired
|
|
|
private GoodsImagesMapper goodsImagesMapper;
|
|
|
@Autowired
|
...
|
...
|
@@ -77,6 +76,12 @@ public class ProductIndexLogicService { |
|
|
private Product15DaySalesNumService product15DaySalesNumService;
|
|
|
@Autowired
|
|
|
private ProductPoolLogicService productPoolLogicService;
|
|
|
@Autowired
|
|
|
private ProductColorsMapper productColorsMapper;
|
|
|
@Autowired
|
|
|
private ProductDefaultImageMapper productDefaultImageMapper;
|
|
|
@Autowired
|
|
|
private ProductStyleMapper productStyleMapper;
|
|
|
|
|
|
/**
|
|
|
* 获取ProductIndex列表,用于取代视图。
|
...
|
...
|
@@ -788,7 +793,7 @@ public class ProductIndexLogicService { |
|
|
* @return
|
|
|
*/
|
|
|
public Map<Integer, ProductColors> getProductColorsesMap(List<Integer> ids) {
|
|
|
List<ProductColors> productColorses = goodsMapper.getProductColors(ids);
|
|
|
List<ProductColors> productColorses = productColorsMapper.getProductColors(ids);
|
|
|
return productColorses.stream().parallel().collect(Collectors.toMap(ProductColors::getProductId, (p) -> p));
|
|
|
}
|
|
|
|
...
|
...
|
@@ -821,7 +826,7 @@ public class ProductIndexLogicService { |
|
|
* @return
|
|
|
*/
|
|
|
private Map<Integer, ProductStyles> getProductStylesMap(List<Integer> ids) {
|
|
|
List<ProductStyles> productStyles = productStyleRelationMapper.selectProductStyles();
|
|
|
List<ProductStyles> productStyles = productStyleMapper.selectProductStyles();
|
|
|
return productStyles.stream().parallel().collect(Collectors.toMap(ProductStyles::getProductId, (p) -> p));
|
|
|
}
|
|
|
|
...
|
...
|
@@ -843,7 +848,7 @@ public class ProductIndexLogicService { |
|
|
* @return
|
|
|
*/
|
|
|
private Map<Integer, ProductDefaultImage> getProductDefaultImagesMap(List<Integer> ids) {
|
|
|
List<ProductDefaultImage> productDefaultImages = goodsImagesMapper.selectProductDefaultImage(ids);
|
|
|
List<ProductDefaultImage> productDefaultImages = productDefaultImageMapper.selectProductDefaultImage(ids);
|
|
|
return productDefaultImages.stream().parallel().collect(Collectors.toMap(ProductDefaultImage::getProductId, (p) -> p));
|
|
|
}
|
|
|
|
...
|
...
|
@@ -899,7 +904,7 @@ public class ProductIndexLogicService { |
|
|
*/
|
|
|
private Map<Integer, BasePinRatio> getBasePinRatiosMap(List<Integer> skns) {
|
|
|
|
|
|
List<BasePinRatio> basePinRatios = freeSizeProductMapper.getBasePinRatio(skns);
|
|
|
List<BasePinRatio> basePinRatios = basePinRatioMapper.getBasePinRatio(skns);
|
|
|
return basePinRatios.stream().parallel().collect(Collectors.toMap(BasePinRatio::getProductSkn, (p) -> p));
|
|
|
}
|
|
|
|
...
|
...
|
@@ -911,7 +916,7 @@ public class ProductIndexLogicService { |
|
|
*/
|
|
|
private Map<Integer, BrokenCode> getBrokenCodesMap(List<Integer> skns) {
|
|
|
|
|
|
List<BrokenCode> brokenCodes = nonfreeSizeProductMapper.getBrokenCode(skns);
|
|
|
List<BrokenCode> brokenCodes = brokenCodeProductMapper.getBrokenCode(skns);
|
|
|
return brokenCodes.stream().parallel().collect(Collectors.toMap(BrokenCode::getProductSkn, (p) -> p));
|
|
|
}
|
|
|
|
...
|
...
|
@@ -922,7 +927,7 @@ public class ProductIndexLogicService { |
|
|
* @return
|
|
|
*/
|
|
|
private Map<Integer, DiscountProductSkn> getDiscountProductSknsMap(List<Integer> skns) {
|
|
|
List<DiscountProductSkn> discountProductSkns = discountProductMapper.getDiscountProductSkn(skns);
|
|
|
List<DiscountProductSkn> discountProductSkns = discountProductSknMapper.getDiscountProductSkn(skns);
|
|
|
return discountProductSkns.stream().parallel().collect(Collectors.toMap(DiscountProductSkn::getProductSkn, (p) -> p));
|
|
|
}
|
|
|
|
...
|
...
|
|