This commit is contained in:
Lx 2025-07-28 11:21:50 +08:00
parent 3a45120903
commit ab23a15a0a
3 changed files with 35 additions and 6 deletions

View File

@ -122,5 +122,6 @@ public interface ProcessMapper extends BaseMapper<Process> {
*/
IPage<StudentPassInfoVO> getPassedStudentsByCoachAndExamNum(@Param("coachId")Long coachId, @Param("subject")Integer subject, @Param("examNum")Integer examNum, @Param("name")String name, @Param("courseType") String courseType, @Param("startTime") String startTime, @Param("endTime")String endTime, Page<StudentPassInfoVO> page);
IPage<Process> getMyCourseStudentPage(@Param("entity") Process entity, Page<Process> page);
}

View File

@ -143,11 +143,13 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
public IPage<Process> getMyCourseStudentPage(Process process, Page<Process> page) {
//当前教练ID
Long userId = SecurityFrameworkUtils.getLoginUserId();
LambdaQueryWrapper<Process> queryWrapper = new LambdaQueryWrapper<Process>()
process.setCoachId(userId);
// processMapper.getMyCourseStudentPage(process, page);
/*LambdaQueryWrapper<Process> queryWrapper = new LambdaQueryWrapper<Process>()
.eq(Process::getCoachId, userId)
.notIn(Process::getSubject, Arrays.asList(1, 4));
/*.eq(Process::getCourseId, process.getCourseId())
.eq(Process::getSubject, process.getSubject());*/
*//*.eq(Process::getCourseId, process.getCourseId())
.eq(Process::getSubject, process.getSubject());*//*
if (process != null && process.getCourseId() != null) {
queryWrapper.eq(Process::getCourseId, process.getCourseId());
}
@ -156,7 +158,8 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
}
if (process != null && StringUtils.isNotEmpty(process.getUserName())) {
queryWrapper.like(Process::getUserName, process.getUserName());
}
}*/
//状态等于1-训练中的
/*if(dictDataService.getValueByTypeAndLabel("check_in_switch", "科二科三同时打卡开关").equals("0")){
// 开关为0时只查询状态为1的记录
@ -169,11 +172,13 @@ public class ProcessServiceImpl extends ServiceImpl<ProcessMapper, Process> impl
// 其他查询条件
queryWrapper.and(wrapper -> wrapper.isNull(Process::getExamStatus).or().eq(Process::getExamStatus, "0"))
.orderByDesc(BaseDO::getCreateTime);*/
queryWrapper.in(Process::getStatus, Arrays.asList("0", "1"))
/*queryWrapper.in(Process::getStatus, Arrays.asList("0", "1"))
.and(wrapper -> wrapper.isNull(Process::getExamStatus).or().eq(Process::getExamStatus, "0"))
// .groupBy(Process::getUserId)
.orderByDesc(BaseDO::getCreateTime);
return this.page(page, queryWrapper);
// 需要查询订单表中是否终止
return this.page(page, queryWrapper);*/
return processMapper.getMyCourseStudentPage(process, page);
}
/**

View File

@ -756,4 +756,27 @@
AND p.course_type = #{courseType}
</if>
</select>
<select id="getMyCourseStudentPage" resultType="cn.iocoder.yudao.module.course.entity.Process">
SELECT dsp.*
FROM drive_school_process dsp
INNER JOIN drive_school_course_order dsco ON dsp.user_id = dsco.user_id AND dsp.course_id = dsco.course_id AND dsco.deleted = 0 AND dsco.if_end = 0 AND dsco.is_sign = 1
WHERE
dsp.coach_id = #{entity.coachId}
<if test="entity.courseId != null and entity.courseId != '' ">
AND dsp.course_id = #{entity.courseId}
</if>
<if test="entity.subject != null ">
AND dsp.subject = #{entity.subject}
</if>
<if test="entity.userName != null and entity.userName != '' ">
AND dsp.user_name like CONCAT('%', #{entity.userName}, '%')
</if>
AND dsp.subject NOT IN (1,4)
AND dsp.status IN (0,1)
AND (dsp.exam_status IS NULL or dsp.exam_status = 0)
AND dsp.deleted = 0
ORDER BY dsp.create_time DESC
</select>
</mapper>