|
|
@@ -1,6 +1,7 @@
|
|
|
package org.springblade.business.service.impl;
|
|
|
|
|
|
import cn.hutool.core.util.ReflectUtil;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import org.springblade.business.entity.StandardFile;
|
|
|
@@ -200,12 +201,16 @@ public class PrivateStandardServiceImpl extends ServiceImpl<PrivateStandardMappe
|
|
|
//先删除文件
|
|
|
try {
|
|
|
List<StandardFile> standardFiles = standardFileService.listByIds(delFileIds);
|
|
|
- for (StandardFile standardFile : standardFiles) {
|
|
|
- this.deleteFile(standardFile.getId());
|
|
|
+ if(CollectionUtils.isNotEmpty(standardFiles)){
|
|
|
+ for (StandardFile standardFile : standardFiles) {
|
|
|
+ this.deleteFile(standardFile.getId());
|
|
|
+ }
|
|
|
}
|
|
|
//删除规范文件
|
|
|
- for (Long delId : delIds) {
|
|
|
- delete(delId);
|
|
|
+ if(CollectionUtils.isNotEmpty(delIds)){
|
|
|
+ for (Long delId : delIds) {
|
|
|
+ delete(delId);
|
|
|
+ }
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
throw new ServiceException("Oss删除文件失败");
|