mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-06-23 04:22:43 +08:00
线上课-学员api返回线上课信息
This commit is contained in:
parent
d498799a73
commit
cedc363f09
@ -15,6 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
package xyz.playedu.api.controller.backend;
|
package xyz.playedu.api.controller.backend;
|
||||||
|
|
||||||
|
import lombok.SneakyThrows;
|
||||||
|
|
||||||
import org.apache.commons.collections4.MapUtils;
|
import org.apache.commons.collections4.MapUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
@ -62,6 +64,7 @@ public class CourseUserController {
|
|||||||
|
|
||||||
@BackendPermissionMiddleware(slug = BPermissionConstant.COURSE_USER)
|
@BackendPermissionMiddleware(slug = BPermissionConstant.COURSE_USER)
|
||||||
@GetMapping("/index")
|
@GetMapping("/index")
|
||||||
|
@SneakyThrows
|
||||||
public JsonResponse index(
|
public JsonResponse index(
|
||||||
@PathVariable(name = "courseId") Integer courseId,
|
@PathVariable(name = "courseId") Integer courseId,
|
||||||
@RequestParam HashMap<String, Object> params) {
|
@RequestParam HashMap<String, Object> params) {
|
||||||
@ -115,6 +118,7 @@ public class CourseUserController {
|
|||||||
Collectors.toMap(
|
Collectors.toMap(
|
||||||
UserCourseHourRecordUserCountMapper::getUserId,
|
UserCourseHourRecordUserCountMapper::getUserId,
|
||||||
UserCourseHourRecordUserCountMapper::getTotal)));
|
UserCourseHourRecordUserCountMapper::getTotal)));
|
||||||
|
data.put("courses", courseService.findOrFail(courseId));
|
||||||
|
|
||||||
return JsonResponse.data(data);
|
return JsonResponse.data(data);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user