多余参数移除
This commit is contained in:
@@ -192,17 +192,19 @@ public class CourseServiceImpl extends ServiceImpl<CourseDao, Course> implements
|
||||
|
||||
PageHelper.startPage(page, limit);
|
||||
if (admin == null) {
|
||||
List<Map<String, Object>> map = baseMapper.selectCourse(classifyId, title, isRecommend, status, bannerId,
|
||||
List<Map<String, Object>> map = baseMapper.selectCourse(classifyId, title, isRecommend, 1, bannerId,
|
||||
sort, startTime, endTime, userId, isPrice, over, wxCourse, dyCourse, wxShow, dyShow);
|
||||
PageInfo<Map<String, Object>> pageInfo = new PageInfo<>(map);
|
||||
List<Map<String, Object>> records = pageInfo.getList();
|
||||
for (Map<String, Object> m : records) {
|
||||
Integer i = courseDetailsDao.selectCount(new QueryWrapper<CourseDetails>().eq("course_id", m.get("courseId")));
|
||||
if (i != null && i.equals(0)) {
|
||||
baseMapper.update(null, new LambdaUpdateWrapper<Course>()
|
||||
.eq(Course::getCourseId, m.get("courseId"))
|
||||
.set(Course::getUpdateTime, DateUtil.now())
|
||||
.set(Course::getStatus, 2));
|
||||
}
|
||||
m.put("courseDetailsCount", i == null ? 0 : i);
|
||||
m.put("courseDetailsId", null);
|
||||
m.put("courseDetailsName", "");
|
||||
m.put("dyEpisodeId", "");
|
||||
m.put("wxCourseDetailsId", "");
|
||||
m.put("courseId", m.get("courseId").toString());
|
||||
}
|
||||
PageUtils pageUtils = PageUtils.page(pageInfo);
|
||||
@@ -222,10 +224,10 @@ public class CourseServiceImpl extends ServiceImpl<CourseDao, Course> implements
|
||||
Map<String, Object> countMap = courseDetailsDao.countCourse(courseId);
|
||||
BigDecimal payMoney = ordersDao.sumPayByCourseId(courseId);
|
||||
map.put("payMoney", payMoney == null ? BigDecimal.ZERO : payMoney);
|
||||
map.put("courseDetailsId", null);
|
||||
map.put("courseDetailsName", "");
|
||||
map.put("dyEpisodeId", "");
|
||||
map.put("wxCourseDetailsId", "");
|
||||
// map.put("courseDetailsId", null);
|
||||
// map.put("courseDetailsName", "");
|
||||
// map.put("dyEpisodeId", "");
|
||||
// map.put("wxCourseDetailsId", "");
|
||||
map.putAll(countMap);
|
||||
map.put("courseId", map.get("courseId").toString());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user