|
|
@@ -549,7 +549,10 @@ public class MaterialManagementImpl implements MaterialManagementInterface {
|
|
|
private Mono<RStatus<Boolean>> addAlbum(AlbumReq albumReq, String userName, String userId, List<AlbumItemReq> list) {
|
|
|
Mono<Boolean> then = Flux.fromIterable(list).flatMap(item -> albumItemRepository
|
|
|
.save(new AlbumItem(null, item.getUrl(), item.getStatus()))
|
|
|
- .flatMap(albumItemInterface::saveMysqlAndRedisCache))
|
|
|
+ .flatMap(f->{
|
|
|
+ return albumItemInterface.saveMysqlAndRedisCache(f)
|
|
|
+ .onErrorResume(throwable -> Mono.error(new BaseException("cache-"+throwable.getMessage()+"--"+JSONUtil.toJsonStr(f))));
|
|
|
+ }))
|
|
|
.collectList()
|
|
|
.switchIfEmpty(Mono.just(List.of()))
|
|
|
.flatMap(items -> {
|