...
|
...
|
@@ -119,16 +119,21 @@ public class ProductServiceImpl implements IProductService, ApplicationContextAw |
|
|
storageMapper.insert(s);
|
|
|
}
|
|
|
if (bo.getEditImage() != null && bo.getEditImage() == 1) {
|
|
|
for (GoodsImages gi : goodsImagesList) {
|
|
|
gi.setProductId(productId);
|
|
|
gi.setGoodsId(goodsId);
|
|
|
goodsImagesMapper.insert(gi);
|
|
|
if (CollectionUtils.isNotEmpty(goodsImagesList)) {
|
|
|
for (GoodsImages gi : goodsImagesList) {
|
|
|
gi.setProductId(productId);
|
|
|
gi.setGoodsId(goodsId);
|
|
|
goodsImagesMapper.insert(gi);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
return new ApiResponse<Void>(null);
|
|
|
}
|
|
|
|
|
|
private List<GoodsImages> getGoodsImagesFromBo(ProductRequestBo bo) {
|
|
|
if (CollectionUtils.isEmpty(bo.getImageUrlList())) {
|
|
|
return null;
|
|
|
}
|
|
|
List<GoodsImages> goodsImagesList = new ArrayList<>();
|
|
|
for (int i = 0; i < bo.getImageUrlList().size(); i++) {
|
|
|
String image = bo.getImageUrlList().get(i);
|
...
|
...
|
|