mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-12-25 20:35:35 +08:00
线上课-学员api返回学员的线上课已学课时数量
This commit is contained in:
@@ -18,7 +18,8 @@ package xyz.playedu.api.service;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
import xyz.playedu.api.domain.UserCourseHourRecord;
|
||||
import xyz.playedu.api.types.mapper.UserCourseHourRecordCountMapper;
|
||||
import xyz.playedu.api.types.mapper.UserCourseHourRecordCourseCountMapper;
|
||||
import xyz.playedu.api.types.mapper.UserCourseHourRecordUserCountMapper;
|
||||
import xyz.playedu.api.types.paginate.PaginationResult;
|
||||
import xyz.playedu.api.types.paginate.UserCourseHourRecordPaginateFilter;
|
||||
|
||||
@@ -51,9 +52,12 @@ public interface UserCourseHourRecordService extends IService<UserCourseHourReco
|
||||
|
||||
void remove(Integer userId, Integer courseId, Integer hourId);
|
||||
|
||||
List<UserCourseHourRecordCountMapper> getUserCourseHourCount(
|
||||
List<UserCourseHourRecordCourseCountMapper> getUserCourseHourCount(
|
||||
Integer userId, List<Integer> courseIds, Integer isFinished);
|
||||
|
||||
List<UserCourseHourRecordUserCountMapper> getUserCourseHourUserCount(
|
||||
Integer courseId, List<Integer> userIds, Integer isFinished);
|
||||
|
||||
PaginationResult<UserCourseHourRecord> paginate(
|
||||
int page, int size, UserCourseHourRecordPaginateFilter filter);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,8 @@ import xyz.playedu.api.domain.UserCourseHourRecord;
|
||||
import xyz.playedu.api.event.UserCourseHourFinishedEvent;
|
||||
import xyz.playedu.api.mapper.UserCourseHourRecordMapper;
|
||||
import xyz.playedu.api.service.UserCourseHourRecordService;
|
||||
import xyz.playedu.api.types.mapper.UserCourseHourRecordCountMapper;
|
||||
import xyz.playedu.api.types.mapper.UserCourseHourRecordCourseCountMapper;
|
||||
import xyz.playedu.api.types.mapper.UserCourseHourRecordUserCountMapper;
|
||||
import xyz.playedu.api.types.paginate.PaginationResult;
|
||||
import xyz.playedu.api.types.paginate.UserCourseHourRecordPaginateFilter;
|
||||
|
||||
@@ -127,7 +128,7 @@ public class UserCourseHourRecordServiceImpl
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserCourseHourRecordCountMapper> getUserCourseHourCount(
|
||||
public List<UserCourseHourRecordCourseCountMapper> getUserCourseHourCount(
|
||||
Integer userId, List<Integer> courseIds, Integer isFinished) {
|
||||
if (courseIds == null || courseIds.size() == 0) {
|
||||
return new ArrayList<>();
|
||||
@@ -135,6 +136,15 @@ public class UserCourseHourRecordServiceImpl
|
||||
return getBaseMapper().getUserCourseHourCount(userId, courseIds, isFinished);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserCourseHourRecordUserCountMapper> getUserCourseHourUserCount(
|
||||
Integer courseId, List<Integer> userIds, Integer isFinished) {
|
||||
if (userIds == null || userIds.size() == 0) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return getBaseMapper().getUserCourseHourUserCount(courseId, userIds, isFinished);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(Integer userId, Integer courseId) {
|
||||
remove(query().getWrapper().eq("user_id", userId).eq("course_id", courseId));
|
||||
|
||||
Reference in New Issue
Block a user