|
@@ -20,8 +20,6 @@ import com.ruoyi.common.exception.ServiceException;
|
|
|
import com.ruoyi.common.utils.wrapper.IWrapper;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
-import org.springframework.transaction.annotation.Propagation;
|
|
|
-import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -166,12 +164,13 @@ public class FileInfoServiceImpl extends ServiceImpl<FileInfoMapper, FileInfo> i
|
|
|
@Override
|
|
|
public void editFile(List<ObsFile> obsFileList, Long businessId, Integer businessType) {
|
|
|
if (obsFileList == null || obsFileList.size() == 0) {
|
|
|
+ this.remove(q -> q.eq(FileInfo::getBusinessId, businessId));
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
// 删除不包含在此列表的业务id文件
|
|
|
List<Long> obsFileId = obsFileList.stream().map(ObsFile::getId).collect(Collectors.toList());
|
|
|
- this.remove(q -> q.notIn(BaseIdPo::getId, obsFileId).eq(FileInfo::getBusinessId, businessId));
|
|
|
+ this.remove(q -> q.notIn(ObjectUtil.isNotEmpty(obsFileId), BaseIdPo::getId, obsFileId).eq(FileInfo::getBusinessId, businessId));
|
|
|
|
|
|
// 更新在此列表的文件
|
|
|
saveFile(obsFileList, businessId, businessType);
|