| | |
| | | package com.tcm.training.admin.app.course.controller; |
| | | |
| | | import com.tcm.training.admin.app.course.service.AppHealthCourseService; |
| | | import com.tcm.training.admin.app.course.vo.AppHealthCourseCategoryOptionVO; |
| | | import com.tcm.training.admin.app.course.vo.AppHealthCourseDetailVO; |
| | | import com.tcm.training.admin.app.course.vo.AppHealthCourseListItemVO; |
| | | import com.tcm.training.admin.common.ApiResponse; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * APP 养生课程详情接口。 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取 APP 养生课程列表。 |
| | | */ |
| | | @GetMapping("/health-courses") |
| | | public ApiResponse<List<AppHealthCourseListItemVO>> list(@RequestParam(value = "levelCategoryId", required = false) Long levelCategoryId, |
| | | @RequestParam(value = "difficultyCategoryId", required = false) Long difficultyCategoryId) { |
| | | return ApiResponse.ok(appHealthCourseService.list(levelCategoryId, difficultyCategoryId)); |
| | | } |
| | | |
| | | /** |
| | | * 获取 APP 养生课程详情。 |
| | | */ |
| | | @GetMapping("/health-courses/{courseId}") |
| | | public ApiResponse<AppHealthCourseDetailVO> detail(@PathVariable("courseId") Long courseId) { |
| | | return ApiResponse.ok(appHealthCourseService.detail(courseId)); |
| | | } |
| | | |
| | | /** |
| | | * 获取 APP 养生课程主题筛选项。 |
| | | */ |
| | | @GetMapping("/health-course-themes") |
| | | public ApiResponse<List<AppHealthCourseCategoryOptionVO>> themes() { |
| | | return ApiResponse.ok(appHealthCourseService.listThemes()); |
| | | } |
| | | |
| | | /** |
| | | * 获取 APP 养生课程难度筛选项。 |
| | | */ |
| | | @GetMapping("/health-course-difficulties") |
| | | public ApiResponse<List<AppHealthCourseCategoryOptionVO>> difficulties() { |
| | | return ApiResponse.ok(appHealthCourseService.listDifficulties()); |
| | | } |
| | | } |