fix(异常处理):批量任务异常处理
This commit is contained in:
parent
4116acf0dc
commit
fe33854685
@ -50,9 +50,15 @@ public class TaskController {
|
|||||||
public void updateFilePath() {
|
public void updateFilePath() {
|
||||||
List<UserFile> list = userFileService.list();
|
List<UserFile> list = userFileService.list();
|
||||||
for (UserFile userFile : list) {
|
for (UserFile userFile : list) {
|
||||||
String path = QiwenFile.formatPath(userFile.getFilePath());
|
try {
|
||||||
userFile.setFilePath(path);
|
String path = QiwenFile.formatPath(userFile.getFilePath());
|
||||||
userFileService.updateById(userFile);
|
if (!userFile.getFilePath().equals(path)) {
|
||||||
|
userFile.setFilePath(path);
|
||||||
|
userFileService.updateById(userFile);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -60,9 +66,13 @@ public class TaskController {
|
|||||||
public void updateShareFilePath() {
|
public void updateShareFilePath() {
|
||||||
List<ShareFile> list = shareFileService.list();
|
List<ShareFile> list = shareFileService.list();
|
||||||
for (ShareFile shareFile : list) {
|
for (ShareFile shareFile : list) {
|
||||||
String path = QiwenFile.formatPath(shareFile.getShareFilePath());
|
try {
|
||||||
shareFile.setShareFilePath(path);
|
String path = QiwenFile.formatPath(shareFile.getShareFilePath());
|
||||||
shareFileService.updateById(shareFile);
|
shareFile.setShareFilePath(path);
|
||||||
|
shareFileService.updateById(shareFile);
|
||||||
|
} catch (Exception e) {
|
||||||
|
//ignore
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user