|
|
@@ -182,13 +182,17 @@ public class SysUserCharacteristicServiceImpl extends ServiceImpl<SysUserCharact
|
|
|
List<SysUserCharacteristic> sysUserCharacteristics = listByIds(list);
|
|
|
for (SysUserCharacteristic sysUserCharacteristic : sysUserCharacteristics) {
|
|
|
if (StringUtils.isNotBlank(sysUserCharacteristic.getContent())) {
|
|
|
- File file = new File(sysUserCharacteristic.getContent());
|
|
|
- if (!file.delete()) {
|
|
|
- log.error("DAT文件删除失败: " + sysUserCharacteristic.getContent());
|
|
|
- }
|
|
|
- File file1 = new File(sysUserCharacteristic.getImagePath());
|
|
|
- if (!file1.delete()) {
|
|
|
- log.error("img文件删除失败: " + sysUserCharacteristic.getImagePath());
|
|
|
+ try {
|
|
|
+ File file = new File(sysUserCharacteristic.getContent());
|
|
|
+ if (!file.delete()) {
|
|
|
+ log.error("DAT文件删除失败: " + sysUserCharacteristic.getContent());
|
|
|
+ }
|
|
|
+ File file1 = new File(sysUserCharacteristic.getImagePath());
|
|
|
+ if (!file1.delete()) {
|
|
|
+ log.error("img文件删除失败: " + sysUserCharacteristic.getImagePath());
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("存在异常文件:{}", e);
|
|
|
}
|
|
|
}
|
|
|
}
|