|
|
@@ -1889,9 +1889,7 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
boolean isFreeMode = period != null && period.getFreeMode() != null && period.getFreeMode() == 1;
|
|
|
|
|
|
// 项目看课数限制(自由模式下跳过此限制)
|
|
|
- if(!isFreeMode && !"福本源".equals(signProjectName) && !"宽益堂".equals(signProjectName) && !CloudHostUtils.hasCloudHostName("弘德堂")) {
|
|
|
- // 项目看课数限制
|
|
|
- if(!EXCLUDE_PROJECTS.contains(signProjectName) && !CloudHostUtils.hasCloudHostName("弘德堂")) {
|
|
|
+ if(!isFreeMode && !EXCLUDE_PROJECTS.contains(signProjectName) && !CloudHostUtils.hasCloudHostName("弘德堂")) {
|
|
|
Integer logCount = fsUserCourseMapper.selectTodayCourseWatchLogCountByUserIdAndProjectId(param.getUserId(), courseProject);
|
|
|
if (Objects.isNull(watchCourseVideo) && logCount > 0) {
|
|
|
log.info("【自由模式检查】固定模式下超过项目看课数量限制,periodId={}, userId={}, logCount={}",
|
|
|
@@ -1970,21 +1968,12 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
|
|
|
|
|
|
// 检查是否开启自由模式
|
|
|
FsUserCoursePeriod period = fsUserCoursePeriodMapper.selectFsUserCoursePeriodById(param.getPeriodId());
|
|
|
- log.info("【自由模式检查】营期信息:periodId={}, periodName={}, freeMode={}, period对象={}",
|
|
|
- param.getPeriodId(),
|
|
|
- period != null ? period.getPeriodName() : "NULL",
|
|
|
- period != null ? period.getFreeMode() : "NULL",
|
|
|
- period != null ? "存在" : "不存在");
|
|
|
-
|
|
|
if (period != null && period.getFreeMode() != null && period.getFreeMode() == 1) {
|
|
|
// 自由模式:不检查时间和状态,直接返回有效
|
|
|
- log.info("【自由模式检查】✅ 检测到自由模式,跳过时间和状态检查,periodId={}, periodName={}",
|
|
|
- param.getPeriodId(), period.getPeriodName());
|
|
|
+ log.info("自由模式营期,跳过时间和状态检查,periodId={}", param.getPeriodId());
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
- log.info("【自由模式检查】固定模式,继续进行时间和状态检查...");
|
|
|
-
|
|
|
// 固定模式:检查时间范围和状态
|
|
|
// 获取公司用户时间段信息
|
|
|
LocalDateTime[] companyUserTimeRange = getCompanyUserTimeRange(param);
|