权限优化 && 学员的线上课学习记录重置的进度更新

This commit is contained in:
xxx
2023-11-13 15:24:54 +08:00
parent 23ff7068f7
commit 8f27bb9fda
5 changed files with 20 additions and 15 deletions

View File

@@ -42,7 +42,7 @@ public class ExceptionController {
@ExceptionHandler(Exception.class)
public JsonResponse exceptionHandler(Exception e) {
log.error("{}-{}", e, e.getMessage());
log.error("出现异常", e);
return JsonResponse.error("系统错误", 500);
}
@@ -101,6 +101,6 @@ public class ExceptionController {
@ExceptionHandler(AmazonS3Exception.class)
public JsonResponse serviceExceptionHandler(AmazonS3Exception e) {
log.error("s3错误={}", e.getMessage());
return JsonResponse.error(e.getMessage(), 500);
return JsonResponse.error("存储配置有问题或存储无法无法正常访问", 500);
}
}

View File

@@ -37,6 +37,6 @@ public class UserCourseHourRecordDestroyListener {
@EventListener
public void updateUserCourseRecord(UserCourseHourRecordDestroyEvent e) {
userCourseRecordService.decrease(e.getUserId(), e.getCourseId(), 1);
userCourseRecordService.updateUserCourseLearnProgress(e.getUserId(), e.getCourseId(), 1);
}
}