更新
This commit is contained in:
parent
a59ec6f8e2
commit
ed35bab54d
@ -1,70 +0,0 @@
|
|||||||
package cn.iocoder.yudao.module.course.controller.app;
|
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
|
||||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
|
||||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
|
||||||
import cn.iocoder.yudao.module.base.constant.SchoolBaseConstants;
|
|
||||||
import cn.iocoder.yudao.module.course.entity.Process;
|
|
||||||
import cn.iocoder.yudao.module.course.service.ProcessService;
|
|
||||||
import cn.iocoder.yudao.module.course.vo.ProcessAddVO;
|
|
||||||
import cn.iocoder.yudao.module.course.vo.ProcessVO;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.validation.Valid;
|
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|
||||||
|
|
||||||
@Tag(name = "小程序 - 学员课程进度")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/process")
|
|
||||||
@Validated
|
|
||||||
public class AppProcessController {
|
|
||||||
|
|
||||||
@Resource
|
|
||||||
private ProcessService processService;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 学员课程进度分页查询
|
|
||||||
*
|
|
||||||
* @param pageReqVO {@link ProcessVO}
|
|
||||||
* @param pageNo 分页参数
|
|
||||||
* @param pageSize 分页参数
|
|
||||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<com.baomidou.mybatisplus.core.metadata.IPage < ?>>
|
|
||||||
* @author PQZ
|
|
||||||
* @date 15:33 2025/2/17
|
|
||||||
**/
|
|
||||||
@GetMapping("/page")
|
|
||||||
@Operation(summary = "学员课程进度分页")
|
|
||||||
public CommonResult<IPage<?>> getDlDriveSchoolCoachPage(ProcessVO pageReqVO,
|
|
||||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
||||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
||||||
Page<ProcessVO> page = new Page<>(pageNo, pageSize);
|
|
||||||
return success(processService.pageProcess(page, pageReqVO));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过学员id和课程id查询学员课程进度
|
|
||||||
*
|
|
||||||
* @param courseId 课程id
|
|
||||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<java.util.List < cn.iocoder.yudao.module.course.vo.ProcessVO>>
|
|
||||||
*/
|
|
||||||
@TenantIgnore
|
|
||||||
@GetMapping("/getAllByCourseId")
|
|
||||||
public CommonResult<?> getAllByCourseId(String courseId) {
|
|
||||||
Long loginUserId = SecurityFrameworkUtils.getLoginUserId();
|
|
||||||
return success(processService.list(Wrappers.lambdaQuery(Process.class)
|
|
||||||
.eq(Process::getUserId, loginUserId)
|
|
||||||
.eq(Process::getCourseId, courseId)));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,11 +1,13 @@
|
|||||||
package cn.iocoder.yudao.module.course.controller.app;
|
package cn.iocoder.yudao.module.course.controller.app;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||||
|
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
|
||||||
import cn.iocoder.yudao.module.course.entity.Process;
|
import cn.iocoder.yudao.module.course.entity.Process;
|
||||||
import cn.iocoder.yudao.module.course.service.ProcessService;
|
import cn.iocoder.yudao.module.course.service.ProcessService;
|
||||||
import cn.iocoder.yudao.module.course.vo.ProcessVO;
|
import cn.iocoder.yudao.module.course.vo.ProcessVO;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
@ -84,4 +86,19 @@ public class ProcessSmallProgramController {
|
|||||||
public CommonResult<?> getExamListByUserId(Long userId) {
|
public CommonResult<?> getExamListByUserId(Long userId) {
|
||||||
return success(processService.getExamListByUserId(userId));
|
return success(processService.getExamListByUserId(userId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过学员id和课程id查询学员课程进度
|
||||||
|
*
|
||||||
|
* @param courseId 课程id
|
||||||
|
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<java.util.List < cn.iocoder.yudao.module.course.vo.ProcessVO>>
|
||||||
|
*/
|
||||||
|
@TenantIgnore
|
||||||
|
@GetMapping("/getAllByCourseId")
|
||||||
|
public CommonResult<?> getAllByCourseId(String courseId) {
|
||||||
|
Long loginUserId = SecurityFrameworkUtils.getLoginUserId();
|
||||||
|
return success(processService.list(Wrappers.lambdaQuery(Process.class)
|
||||||
|
.eq(Process::getUserId, loginUserId)
|
||||||
|
.eq(Process::getCourseId, courseId)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -282,6 +282,10 @@ public class DriveSchoolReservationCourseServiceImpl extends ServiceImpl<DriveSc
|
|||||||
records.setReservDay(driveSchoolReservationCourse.getReservDay()); // 预约日期
|
records.setReservDay(driveSchoolReservationCourse.getReservDay()); // 预约日期
|
||||||
records.setReservTime(driveSchoolReservationCourse.getReservTime()); // 预约时间段
|
records.setReservTime(driveSchoolReservationCourse.getReservTime()); // 预约时间段
|
||||||
records.setSubject(driveSchoolReservationCourse.getSubject()); // 科目类型
|
records.setSubject(driveSchoolReservationCourse.getSubject()); // 科目类型
|
||||||
|
records.setCreateTime(LocalDateTime.now());
|
||||||
|
records.setUpdateTime(LocalDateTime.now());
|
||||||
|
records.setCreator(SecurityFrameworkUtils.getLoginUserId().toString());
|
||||||
|
records.setUpdater(SecurityFrameworkUtils.getLoginUserId().toString());
|
||||||
records.setType("1");
|
records.setType("1");
|
||||||
boolean save = save(records);
|
boolean save = save(records);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -275,6 +275,7 @@ order by create_time desc
|
|||||||
<if test="entity.coachId != null ">and dsrc.coach_id = #{entity.coachId}</if>
|
<if test="entity.coachId != null ">and dsrc.coach_id = #{entity.coachId}</if>
|
||||||
<if test="entity.ifCancel != null ">and dsrc.if_cancel = #{entity.ifCancel}</if>
|
<if test="entity.ifCancel != null ">and dsrc.if_cancel = #{entity.ifCancel}</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by dsrc.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user