puzhibing
2024-02-05 640ff18d2d7f4be02ddb7f8f75e899f05545eb98
cloud-server-course/src/main/java/com/dsh/course/controller/CoursePackagePaymentConfigController.java
@@ -22,20 +22,23 @@
    /**
     * 根据主键id获取价格配置
     *
     * @return
     */
    @ResponseBody
    @PostMapping("/coursePackagePaymentConfig/getById")
    public CoursePackagePaymentConfig getById(@RequestBody Integer id){
    public CoursePackagePaymentConfig getById(@RequestBody Integer id) {
        return coursePackagePaymentConfigService.getById(id);
    }
    /**
     * 添加数据
     *
     * @param coursePackagePaymentConfig
     */
    @ResponseBody
    @PostMapping("/coursePackagePaymentConfig/addCoursePackagePaymentConfig")
    public int addCoursePackagePaymentConfig(@RequestBody CoursePackagePaymentConfig coursePackagePaymentConfig){
    public int addCoursePackagePaymentConfig(@RequestBody CoursePackagePaymentConfig coursePackagePaymentConfig) {
        coursePackagePaymentConfigService.save(coursePackagePaymentConfig);
        return coursePackagePaymentConfig.getId();
    }
@@ -43,23 +46,38 @@
    /**
     * 根据课包id获取价格配置
     *
     * @param coursePackageId
     * @return
     */
    @ResponseBody
    @PostMapping("/coursePackagePaymentConfig/queryCoursePackagePaymentConfigList")
    public List<CoursePackagePaymentConfig> queryCoursePackagePaymentConfigList(@RequestBody Integer coursePackageId){
    public List<CoursePackagePaymentConfig> queryCoursePackagePaymentConfigList(@RequestBody Integer coursePackageId) {
        return coursePackagePaymentConfigService.list(new QueryWrapper<CoursePackagePaymentConfig>().eq("coursePackageId", coursePackageId));
    }
    /**
     * 根据课时规格id获取价格配置
     *
     * @param
     * @return
     */
    @ResponseBody
    @PostMapping("/coursePackagePaymentConfig/queryCoursePackagePaymentConfigList1")
    public List<CoursePackagePaymentConfig> queryCoursePackagePaymentConfigList1(@RequestBody Integer coursePackagePaymentConfigId) {
        return coursePackagePaymentConfigService.
                list(new QueryWrapper<CoursePackagePaymentConfig>()
                        .eq("id", coursePackagePaymentConfigId));
    }
    /**
     * 删除数据
     *
     * @param coursePackageId
     */
    @ResponseBody
    @PostMapping("/coursePackagePaymentConfig/delCoursePackagePaymentConfig")
    public void delCoursePackagePaymentConfig(@RequestBody Integer coursePackageId){
    public void delCoursePackagePaymentConfig(@RequestBody Integer coursePackageId) {
        coursePackagePaymentConfigService.remove(new QueryWrapper<CoursePackagePaymentConfig>().eq("coursePackageId", coursePackageId));
    }
}