分页33
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user