mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-06-25 14:22:47 +08:00
优化接口返回
This commit is contained in:
parent
f0378c832d
commit
d498799a73
@ -96,13 +96,16 @@ public class CourseUserController {
|
|||||||
data.put("total", result.getTotal());
|
data.put("total", result.getTotal());
|
||||||
data.put(
|
data.put(
|
||||||
"user_course_records",
|
"user_course_records",
|
||||||
userCourseRecordService.chunk(
|
userCourseRecordService
|
||||||
userIds,
|
.chunk(
|
||||||
new ArrayList<>() {
|
userIds,
|
||||||
{
|
new ArrayList<>() {
|
||||||
add(courseId);
|
{
|
||||||
}
|
add(courseId);
|
||||||
}));
|
}
|
||||||
|
})
|
||||||
|
.stream()
|
||||||
|
.collect(Collectors.toMap(UserCourseRecord::getUserId, e -> e)));
|
||||||
data.put(
|
data.put(
|
||||||
"user_course_hour_user_count",
|
"user_course_hour_user_count",
|
||||||
userCourseHourRecordService
|
userCourseHourRecordService
|
||||||
|
Loading…
x
Reference in New Issue
Block a user