lisy
2023-07-14 cdd29e40b2cd26c5a4b405adc25cfe3711794bf6
cloud-server-course/src/main/java/com/dsh/course/controller/CoursePackagePaymentController.java
@@ -53,14 +53,6 @@
    @Autowired
    private TCoursePackageDiscountService tcpdService;
    @Autowired
    private PostCourseVideoService pcvService;
    @Autowired
    private CoursePackageStudentService cpsService;
    @Autowired
    private CancelledClassesService cacService;
    @Autowired
    private ICoursePackagePaymentConfigService icppcService;
@@ -338,6 +330,15 @@
                .eq("state",1));
    }
    @PostMapping("/base/coursePack/allAmountPayRecordOfUser")
    public List<TCoursePackagePayment> getAmountPayRecord(@RequestBody Integer appUserId){
        return packagePaymentService.list(new QueryWrapper<TCoursePackagePayment>()
                .eq("appUserId",appUserId)
                .notIn("payType",3)
                .eq("payStatus",2)
                .eq("state",1));
    }
    @ResponseBody
    @PostMapping("/api/course/queryArrangeCourseList")
@@ -495,14 +496,15 @@
    @ApiOperation(value = "已报名课程详情", tags = {"APP-开始上课"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
            @ApiImplicitParam(name = "coursePayId" ,value = "课包记录id",dataType = "long"),
    })
    public ResultUtil<CourseDetailsResponse> getRegisteredData( Integer coursePackageId){
    public ResultUtil<CourseDetailsResponse> getRegisteredData( Integer coursePayId){
        try {
            Integer appUserId = tokenUtil.getUserIdFormRedis();
            if(null == appUserId){
                return ResultUtil.tokenErr();
            }
            return ResultUtil.success(packagePaymentService.queryRegisteredCourseDetails(coursePackageId,appUserId));
            return ResultUtil.success(packagePaymentService.queryRegisteredCourseDetails(coursePayId,appUserId));
        }catch (Exception e){
            return ResultUtil.runErr();
        }
@@ -679,4 +681,31 @@
        return packagePaymentService.save(packagePayment);
    }
    @PostMapping("/base/coursePack/obtainStudentClassDetails")
    public List<RecordAppoint> obtainStudentClassDetailsData(@RequestBody Integer stuId){
        try {
            Integer appUserId = tokenUtil.getUserIdFormRedis();
            return packagePaymentService.obtainStuClassDetails(stuId,appUserId);
        }catch (Exception e){
            e.printStackTrace();
            throw new RuntimeException();
        }
    }
    @PostMapping("/base/coursePack/getCoursePackageConfig")
    public List<CoursePackagePaymentConfig> getCourseConfigList(@RequestBody Integer coursePackageId){
        return icppcService.list(new QueryWrapper<CoursePackagePaymentConfig>()
                .eq("coursePackageId",coursePackageId));
    }
    @PostMapping("/base/coursePack/getCoursePackagePaymentOfCode")
    public List<TCoursePackagePayment> getCoursePackagePaymentOfCode(@RequestBody String code){
        return packagePaymentService.list(new QueryWrapper<TCoursePackagePayment>()
                .eq("code",code));
    }
}