liujie
2023-09-16 265cbe3cc187758cd024e91e39dfd488d8486a33
cloud-server-course/src/main/java/com/dsh/course/controller/CourseController.java
@@ -134,7 +134,6 @@
    @ResponseBody
    @PostMapping("/api/course/queryCourseList")
    @ApiOperation(value = "获取课程列表", tags = {"APP-课程列表"})
@@ -148,6 +147,23 @@
                return ResultUtil.tokenErr();
            }
            List<CoursePackageListVo> coursePackageListVos = coursePackageService.queryCourseList(uid, coursePackageList);
            return ResultUtil.success(coursePackageListVos);
        }catch (Exception e){
            e.printStackTrace();
            return ResultUtil.runErr();
        }
    }
    @ResponseBody
    @PostMapping("/base/course/queryCourseListOne")
    @ApiOperation(value = "获取课程列表", tags = {"APP-课程列表"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil<List<CoursePackageListVo>> queryCourseListOne(CoursePackageList coursePackageList){
        try {
            List<CoursePackageListVo> coursePackageListVos = coursePackageService.queryCourseListOne( coursePackageList);
            return ResultUtil.success(coursePackageListVos);
        }catch (Exception e){
            e.printStackTrace();
@@ -203,6 +219,26 @@
        }
    }
    // 2.0
    @ResponseBody
    @PostMapping("/api/course/paymentCourseCouponList")
    @ApiOperation(value = "支付课程--完成后优惠券列表", tags = {"APP-课程列表"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil paymentCourseCouponList(Integer coursePackagePaymentConfigId){
        try {
            Integer uid = tokenUtil.getUserIdFormRedis();
            if(null == uid){
                return ResultUtil.tokenErr();
            }
            return coursePackageService.paymentCourseCouponList(uid, coursePackagePaymentConfigId);
        }catch (Exception e){
            e.printStackTrace();
            return ResultUtil.runErr();
        }
    }
    /**
     * 购买课程微信支付回调