Commit 7fc0aaab authored by unset's avatar unset

影像图库新增批量上下架以及删除接口

parent d0d254d3
......@@ -89,7 +89,12 @@ public class ImageImgStorageBiz extends BaseBiz<ImageImgStorageMapper,ImageImgSt
} else {
BeanUtil.copyProperties(imageImgStorage, old, CopyOptions.create().setIgnoreNullValue(true).setIgnoreError(true));
updateSelectiveByIdRe(old);
shoppingCartInfoBiz.updateObj(old.getId(), old.getStatus(), null);
List<ImageInfoRelation> imageInfoRelationList = imageInfoRelationBiz.getAllById(imageImgStorage.getId(), 1);
if (imageInfoRelationList != null && imageInfoRelationList.size() > 0) {
imageInfoRelationList.parallelStream().forEach(imageInfoRelation -> {
shoppingCartInfoBiz.updateObj(imageInfoRelation.getId(), old.getStatus(), null);
});
}
}
return ObjectRestResponse.succ();
}
......@@ -238,11 +243,21 @@ public class ImageImgStorageBiz extends BaseBiz<ImageImgStorageMapper,ImageImgSt
imageImgStorageList.parallelStream().forEach(imageImgStorage -> {
if (imageStorageImgDto.getStatus() != null) {
imageImgStorage.setStatus(imageStorageImgDto.getStatus());
shoppingCartInfoBiz.updateObj(imageImgStorage.getId(), imageImgStorage.getStatus(), null);
List<ImageInfoRelation> imageInfoRelationList = imageInfoRelationBiz.getAllById(imageImgStorage.getId(), 1);
if (imageInfoRelationList != null && imageInfoRelationList.size() > 0) {
imageInfoRelationList.parallelStream().forEach(imageInfoRelation -> {
shoppingCartInfoBiz.updateObj(imageInfoRelation.getId(), imageImgStorage.getStatus(), null);
});
}
}
if (imageStorageImgDto.getIsDel() != null) {
imageImgStorage.setIsDel(imageStorageImgDto.getIsDel());
shoppingCartInfoBiz.updateObj(imageImgStorage.getId(), null, imageImgStorage.getIsDel());
List<ImageInfoRelation> imageInfoRelationList = imageInfoRelationBiz.getAllById(imageImgStorage.getId(), 1);
if (imageInfoRelationList != null && imageInfoRelationList.size() > 0) {
imageInfoRelationList.parallelStream().forEach(imageInfoRelation -> {
shoppingCartInfoBiz.updateObj(imageInfoRelation.getId(), null, imageImgStorage.getIsDel());
});
}
}
});
mapper.batchSave(imageImgStorageList);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment