Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
commit
cdb007c4b5
|
|
@ -22,8 +22,8 @@ public interface CourseDetailsDao extends BaseMapper<CourseDetails> {
|
|||
* @param price 全剧价格
|
||||
* @param wholesalePrice 10集价格
|
||||
*/
|
||||
@Cacheable(cacheNames = "courseSets" ,key = "#courseId")
|
||||
List<CourseDetailsSetVo> courseSets(@Param("courseId") Long courseId, @Param("collect") Long collect, Integer isPrice, BigDecimal price, BigDecimal wholesalePrice);
|
||||
@Cacheable(cacheNames = "courseSets", key = "#courseId")
|
||||
List<CourseDetailsSetVo> courseSets(@Param("courseId") Long courseId, Integer isPrice, BigDecimal price, BigDecimal wholesalePrice);
|
||||
|
||||
List<CourseDetails> findByCourseId(@Param("id") Long id, @Param("userId") Long userId);
|
||||
|
||||
|
|
@ -41,7 +41,7 @@ public interface CourseDetailsDao extends BaseMapper<CourseDetails> {
|
|||
*/
|
||||
Map<String, Object> countCourse(Long courseId);
|
||||
|
||||
@Cacheable(cacheNames = "courseCount" ,key = "#courseId")
|
||||
@Cacheable(cacheNames = "courseCount", key = "#courseId")
|
||||
Integer countCourseByCourseId(Long courseId);
|
||||
|
||||
List<CourseDetails> countByCourseId();
|
||||
|
|
|
|||
|
|
@ -178,9 +178,9 @@ public class CourseDetailsServiceImpl extends ServiceImpl<CourseDetailsDao, Cour
|
|||
}
|
||||
List<CourseDetailsSetVo> courseDetailsSetVos;
|
||||
if (freeWatch || courseUser != null) {
|
||||
courseDetailsSetVos = baseMapper.courseSets(courseId, collect == null ? 0L : 1L, 2, null, null);
|
||||
courseDetailsSetVos = baseMapper.courseSets(courseId,2, null, null);
|
||||
} else {
|
||||
courseDetailsSetVos = baseMapper.courseSets(courseId, collect == null ? 0L : 1L, 1, bean.getPrice(), bean.getWholesalePrice());
|
||||
courseDetailsSetVos = baseMapper.courseSets(courseId,1, bean.getPrice(), bean.getWholesalePrice());
|
||||
}
|
||||
if (sort != null && sort > 2) {
|
||||
startSort = sort - 3;
|
||||
|
|
@ -225,6 +225,7 @@ public class CourseDetailsServiceImpl extends ServiceImpl<CourseDetailsDao, Cour
|
|||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("current", current.get());
|
||||
map.put("title", bean.getTitle());
|
||||
map.put("collect", collect == null ? 0L : 1L);
|
||||
map.put("list", courseDetailsSetVos);
|
||||
return new Result().put("data", map);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
, c.title_img as titleImg
|
||||
, c.good_num as goodNum
|
||||
, c.sort as sort
|
||||
, IF(#{collect} = 1, 1, 0) AS isCollect
|
||||
from course_details c
|
||||
where c.course_id = #{courseId}
|
||||
order by c.sort asc
|
||||
|
|
|
|||
Loading…
Reference in New Issue