主页-我的课程
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package com.peanut.modules.sociology.controller;
|
||||
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.common.entity.CourseEntity;
|
||||
import com.peanut.modules.sociology.service.CourseService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@RestController("sociologyHome")
|
||||
@RequestMapping("sociology/home")
|
||||
public class HomeController {
|
||||
|
||||
@Autowired
|
||||
private CourseService courseService;
|
||||
|
||||
//首页-我的课程
|
||||
@RequestMapping("/getMyCourse")
|
||||
public R getMyCourse(String userId){
|
||||
List<CourseEntity> courseList = courseService.getMyCourse(userId);
|
||||
return R.ok().put("myCourse",courseList);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user