过期课程过滤复读课程

This commit is contained in:
wuchunlei
2025-04-18 16:45:16 +08:00
parent b7ac6327bc
commit 625f4752d7

View File

@@ -359,7 +359,10 @@ public class CourseServiceImpl extends ServiceImpl<CourseDao, CourseEntity> impl
wrapper.orderByAsc(CourseCatalogueEntity::getSort);
List<Map<String,Object>> courseList = this.getBaseMapper().selectMaps(wrapper);
for (Map<String,Object> map:courseList){
if (!userVipService.isSociologyVip((int)param.get("userId"))){
int count = userCourseBuyDao.selectCount(new LambdaQueryWrapper<UserCourseBuyEntity>()
.eq(UserCourseBuyEntity::getUserId,param.get("userId"))
.eq(UserCourseBuyEntity::getCatalogueId,map.get("catalogueId")));
if (!userVipService.isSociologyVip((int)param.get("userId"))&&count==0){
courseEntities.add(map);
}
}