puzhibing
2023-07-07 c148720d31eb2f8d68352e64eaddf17fd5b66a5a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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;
        }
    }
}