...
|
...
|
@@ -1701,6 +1701,7 @@ public class ProductServiceImpl implements ProductService { |
|
|
|
|
|
//校验sizeId
|
|
|
String[] sizeIdArr = sizeIds.split(",");
|
|
|
List<Integer> sizeIdList = buildSizeIdList(sizeIdArr);
|
|
|
List<SelfSize> needAddRecordList = Lists.newArrayList();
|
|
|
List<SelfSizeUid> needRelateUidList = Lists.newArrayList();
|
|
|
|
...
|
...
|
@@ -1709,14 +1710,14 @@ public class ProductServiceImpl implements ProductService { |
|
|
List<Integer> existSizeIdList = storageList.stream().map(Storage::getSizeId).collect(Collectors.toList());
|
|
|
List<Size> sizeList = sizeMapper.selectByIds(existSizeIdList);
|
|
|
Map<Integer, String> sizeIdNameMap = sizeList.stream().collect(Collectors.toMap(Size::getId, Size::getSizeName));
|
|
|
List<SelfSize> existRecordList = selfSizeMapper.selectByProductIdAndSizeId(productId, sizeIds);
|
|
|
List<SelfSize> existRecordList = selfSizeMapper.selectByProductIdAndSizeId(productId, sizeIdList);
|
|
|
Map<Integer, SelfSize> selfSizeMap = existRecordList.stream().collect(Collectors.toMap(SelfSize::getSizeId, s->s));
|
|
|
if(MapUtils.isEmpty(selfSizeMap)) {
|
|
|
selfSizeMap = Maps.newHashMap();
|
|
|
}
|
|
|
|
|
|
//自助尺码uid关联表
|
|
|
List<SelfSizeUid> selfSizeUidList = selfSizeUidMapper.selectByProductIdAndSizeId(productId, sizeIds);
|
|
|
List<SelfSizeUid> selfSizeUidList = selfSizeUidMapper.selectByProductIdAndSizeId(productId, sizeIdList);
|
|
|
Map<Integer, List<SelfSizeUid>> sizeIdUidMap = selfSizeUidList.stream().collect(Collectors.groupingBy(SelfSizeUid::getSizeId));
|
|
|
|
|
|
List<String> warnSizeNameList = Lists.newArrayList();
|
...
|
...
|
@@ -1772,6 +1773,15 @@ public class ProductServiceImpl implements ProductService { |
|
|
|
|
|
}
|
|
|
|
|
|
private List<Integer> buildSizeIdList(String[] sizeIdArr){
|
|
|
List<Integer> sizeIdList = Lists.newArrayList();
|
|
|
for(int i=0; i<sizeIdArr.length; i++) {
|
|
|
sizeIdList.add(Integer.parseInt(sizeIdArr[i]));
|
|
|
}
|
|
|
return sizeIdList;
|
|
|
}
|
|
|
|
|
|
|
|
|
private String getGoodsDeafultImage(Integer goodsId) {
|
|
|
List<GoodsImages> goodsImages = goodsImagesMapper.selectByGoodsId(goodsId);
|
|
|
String defaultYImage = null;
|
...
|
...
|
|