This commit is contained in:
GYJ
2025-01-02 20:56:19 +08:00
parent d56a5df40e
commit e8a986e476
9 changed files with 39 additions and 42 deletions

View File

@@ -102,8 +102,8 @@ public class CourseCollectServiceImpl extends ServiceImpl<CourseCollectDao, Cour
@CachePut(value = "app:courseCollect", key = "#userId")
public Result selectByUserId(Integer page, Integer limit, Long userId,Integer classify) {
PageHelper.startPage(page,limit);
List<Course> courseIPage = baseMapper.selectCourseByCollect( userId,classify);
PageInfo<Course> pageInfo = new PageInfo<>(courseIPage);
List<Course> courseList = baseMapper.selectCourseByCollect( userId,classify);
PageInfo<Course> pageInfo = new PageInfo<>(courseList);
List<Course> courses = pageInfo.getList();
if (courses != null && courses.size() > 0) {
for (Course course : courses) {

View File

@@ -194,9 +194,9 @@ public class CourseServiceImpl extends ServiceImpl<CourseDao, Course> implements
setCache(cacheKey, JSONUtil.toJsonStr(pageUtils));
return Result.success().put("data", pageUtils);
}
List<Map<String, Object>> mapIPage = baseMapper.selectCourseAdmin(classifyId, title, isRecommend, status, bannerId,
List<Map<String, Object>> list = baseMapper.selectCourseAdmin(classifyId, title, isRecommend, status, bannerId,
sort, startTime, endTime, userId, isPrice, over, wxCourse, dyCourse, wxShow, dyShow);
PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(mapIPage);
PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(list);
List<Map<String, Object>> records = pageInfo.getList();
for (Map<String, Object> map : records) {
map.put("courseDetailsId", null);