nickchange
2023-10-26 565547a1d026a9bcff26f3e0edaf079bdb7a55d4
cloud-server-course/src/main/java/com/dsh/course/controller/PostCourseVideoController.java
@@ -11,6 +11,8 @@
import com.dsh.course.service.ICoursePackageSchedulingService;
import com.dsh.course.service.PostCourseVideoService;
import com.dsh.course.service.TCoursePackageDiscountService;
import com.dsh.course.util.ResultUtil;
import com.dsh.course.util.TokenUtil;
import com.dsh.course.util.ToolUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -42,15 +44,19 @@
    private ICoursePackageSchedulingService coursePackageSchedulingService;
    @Autowired
    private CoursePackageStudentService coursePackageStudentService;
    @Autowired
    private TokenUtil tokenUtil;
    @ResponseBody
    @PostMapping("/base/courseVideo/query")
    public List<ExerciseVideo> query(@RequestBody Integer coursePackIds){
    public List<ExerciseVideo> query(@RequestBody Integer id) throws Exception {
        List<ExerciseVideo> exerciseVideoList = new ArrayList<>();
//        Integer appUserId = tokenUtil.getUserIdFormRedis();
        QueryWrapper<CoursePackageStudent> queryWrapper1 = new QueryWrapper<CoursePackageStudent>().eq("appUserId", 19);
        QueryWrapper<CoursePackageStudent> queryWrapper1 = new QueryWrapper<CoursePackageStudent>().eq("appUserId", id);
        List<CoursePackageStudent> list = coursePackageStudentService.list(queryWrapper1);
        List<Long> longs = new ArrayList<>();
        for (CoursePackageStudent coursePackageStudent : list) {