TASK:视频生成完成站内信语言给中英双语

This commit is contained in:
2025-11-26 10:09:59 +08:00
parent 9ae1626309
commit 1464689657
2 changed files with 11 additions and 5 deletions

View File

@@ -60,7 +60,7 @@ import java.util.stream.Collectors;
@RequiredArgsConstructor
public class CollectionElementServiceImpl extends ServiceImpl<CollectionElementMapper, CollectionElement> implements CollectionElementService {
private final CollectionElementMapper collectionElementMapper;
private final EmailService emailService;
// private final EmailService emailService;
private final FileProperties fileProperties;
private final GenerateMapper generateMapper;
private final GenerateDetailMapper generateDetailMapper;

View File

@@ -402,21 +402,27 @@ public class MessageCenterServiceImpl extends ServiceImpl<NotificationMapper, No
notification.setType("system");
notification.setReceiverId(userId);
if (isSuccess) {
if (language.equals(Language.ENGLISH.name())) {
sysNotificationDTO.setTitle("System Notification 系统通知");
sysNotificationDTO.setContent("Your video generation task in Project " + projectName + " is ready!\n"
+ "您在项目 " + projectName + " 中创建的视频生成任务已完成!");
/*if (language.equals(Language.ENGLISH.name())) {
sysNotificationDTO.setTitle("System Notification");
sysNotificationDTO.setContent("Your video generation task in Project " + projectName + " is ready!");
} else {
sysNotificationDTO.setTitle("系统通知");
sysNotificationDTO.setContent("您在项目 " + projectName + " 中创建的视频生成任务已完成!");
}
}*/
} else {
if (language.equals(Language.ENGLISH.name())) {
sysNotificationDTO.setTitle("System Notification 系统通知");
sysNotificationDTO.setContent("Your video generation task in Project " + projectName + " has failed.\n"
+ "您在项目 " + projectName + " 中创建的视频生成任务失败。");
/*if (language.equals(Language.ENGLISH.name())) {
sysNotificationDTO.setTitle("System Notification");
sysNotificationDTO.setContent("Your video generation task in Project " + projectName + " has failed.");
} else {
sysNotificationDTO.setTitle("系统通知");
sysNotificationDTO.setContent("视频生成任务失败。");
}
}*/
}
notification.setContent(JSON.toJSONString(sysNotificationDTO));
notification.setIsRead(0);