|
|
@@ -2457,9 +2457,18 @@ public class FsUserCourseVideoServiceImpl extends ServiceImpl<FsUserCourseVideoM
|
|
|
if(!isFreeMode && !EXCLUDE_PROJECTS.contains(signProjectName) && !CloudHostUtils.hasCloudHostName("弘德堂")) {
|
|
|
Integer logCount = fsUserCourseMapper.selectTodayCourseWatchLogCountByUserIdAndProjectId(param.getUserId(), courseProject);
|
|
|
if (logCount > 0) {
|
|
|
+ // 根据项目ID查询项目名称
|
|
|
+ String projectName = "";
|
|
|
+ List<SysDictData> courseProjects = dictDataMapper.selectDictDataByType("sys_course_project");
|
|
|
+ for (SysDictData dictData : courseProjects) {
|
|
|
+ if (dictData.getDictValue().equals(String.valueOf(courseProject))) {
|
|
|
+ projectName = dictData.getDictLabel();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
log.info("【手动发课限制】用户今日已观看{}门手动发课课程,超过限制,periodId={}, userId={}, videoId={}",
|
|
|
logCount, param.getPeriodId(), param.getUserId(), param.getVideoId());
|
|
|
- return ResponseResult.fail(504, "超过项目看课数量限制");
|
|
|
+ return ResponseResult.fail(504, String.format("您今日已观看%s项目的%d门课程", projectName, logCount));
|
|
|
}
|
|
|
} else if(isFreeMode) {
|
|
|
log.info("【自由模式检查】✅ 自由模式,跳过项目看课数量限制检查,periodId={}", param.getPeriodId());
|