文档库--编辑和删除时,关联删除文件
This commit is contained in:
+3
@@ -30,4 +30,7 @@ public interface IOSSFileService extends IService<OSSFile> {
|
||||
*/
|
||||
void updateFileInfo(List<OSSFile> ossFileList);
|
||||
|
||||
|
||||
void deleteByConnectIdList(List<String> connectIdList);
|
||||
|
||||
}
|
||||
|
||||
+7
@@ -145,4 +145,11 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
|
||||
this.updateBatchById(ossFileList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByConnectIdList(List<String> connectIdList) {
|
||||
LambdaQueryWrapper<OSSFile> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.in(OSSFile::getConnectId,connectIdList);
|
||||
this.remove(lambdaQueryWrapper);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user