diff --git a/src/main/java/com/ycwl/basic/controller/mobile/notify/UserNotificationAuthController.java b/src/main/java/com/ycwl/basic/controller/mobile/notify/UserNotificationAuthController.java index f855c288..01796844 100644 --- a/src/main/java/com/ycwl/basic/controller/mobile/notify/UserNotificationAuthController.java +++ b/src/main/java/com/ycwl/basic/controller/mobile/notify/UserNotificationAuthController.java @@ -41,7 +41,7 @@ public class UserNotificationAuthController { @PostMapping("/record") public ApiResponse recordAuthorization( @RequestBody NotificationAuthRecordReq req) { - log.info("记录用户通知授权: templateIds={}, scenicId={}", req.getTemplateIds(), req.getScenicId()); + log.debug("记录用户通知授权: templateIds={}, scenicId={}", req.getTemplateIds(), req.getScenicId()); try { // 获取当前用户ID @@ -98,7 +98,7 @@ public class UserNotificationAuthController { */ @GetMapping("/{scenicId}/templates") public ApiResponse getScenicTemplatesWithAuth(@PathVariable("scenicId") Long scenicId) { - log.info("获取景区通知模板ID及用户授权余额: scenicId={}", scenicId); + log.debug("获取景区通知模板ID及用户授权余额: scenicId={}", scenicId); try { // 获取当前用户ID @@ -130,6 +130,20 @@ public class UserNotificationAuthController { ScenicTemplateAuthResp.TemplateAuthInfo templateAuthInfo = new ScenicTemplateAuthResp.TemplateAuthInfo(); templateAuthInfo.setTemplateId(templateId); + + if (templateId.equals(scenicRepository.getVideoGeneratedTemplateId(scenicId))) { + templateAuthInfo.setTitle("视频生成通知"); + templateAuthInfo.setDescription("当视频生成完成时,我们将通过此方式提醒您"); + } else if (templateId.equals(scenicRepository.getVideoDownloadTemplateId(scenicId))) { + templateAuthInfo.setTitle("视频下载通知"); + templateAuthInfo.setDescription("当您的视频未购买时,我们将通过此方式提醒您"); + } else if (templateId.equals(scenicRepository.getVideoPreExpireTemplateId(scenicId))) { + templateAuthInfo.setTitle("视频即将过期通知"); + templateAuthInfo.setDescription("当您的视频即将过期时,我们将通过此方式提醒您,请及时下载"); + } else { + templateAuthInfo.setTitle("未知模板类型"); + templateAuthInfo.setDescription("未知的模板类型"); + } // 获取授权详情 try { diff --git a/src/main/java/com/ycwl/basic/model/mobile/notify/resp/ScenicTemplateAuthResp.java b/src/main/java/com/ycwl/basic/model/mobile/notify/resp/ScenicTemplateAuthResp.java index 1dd8fcb4..5c287cf6 100644 --- a/src/main/java/com/ycwl/basic/model/mobile/notify/resp/ScenicTemplateAuthResp.java +++ b/src/main/java/com/ycwl/basic/model/mobile/notify/resp/ScenicTemplateAuthResp.java @@ -33,6 +33,16 @@ public class ScenicTemplateAuthResp { */ private String templateId; + /** + * 模板标题 + */ + private String title; + + /** + * 模板描述 + */ + private String description; + /** * 剩余授权次数 */