package com.dsh.course.controller;
|
|
import com.dsh.course.entity.TCoursePackage;
|
import com.dsh.course.service.TCoursePackageService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
/**
|
* @author zhibing.pu
|
* @date 2023/7/5 9:58
|
*/
|
@RestController
|
@RequestMapping("")
|
public class CoursePackageController {
|
|
@Autowired
|
private TCoursePackageService coursePackageService;
|
|
|
/**
|
* 根据id获取课包
|
* @param id
|
* @return
|
*/
|
@ResponseBody
|
@PostMapping("/coursePackage/queryCoursePackageById")
|
public TCoursePackage queryCoursePackageById(@RequestBody Integer id){
|
try {
|
TCoursePackage coursePackage = coursePackageService.getById(id);
|
return coursePackage;
|
}catch (Exception e){
|
e.printStackTrace();
|
return null;
|
}
|
}
|
}
|