1
This commit is contained in:
@@ -2,9 +2,13 @@ package com.peanut.modules.sociology.controller;
|
||||
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.common.entity.CourseEntity;
|
||||
import com.peanut.modules.common.entity.CourseSociologyEntity;
|
||||
import com.peanut.modules.common.to.ParamTo;
|
||||
import com.peanut.modules.sociology.service.CourseService;
|
||||
import com.peanut.modules.sociology.service.CourseSociologyService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import java.util.List;
|
||||
@@ -16,6 +20,10 @@ public class HomeController {
|
||||
|
||||
@Autowired
|
||||
private CourseService courseService;
|
||||
@Autowired
|
||||
private CourseSociologyService courseSociologyService;
|
||||
|
||||
|
||||
|
||||
//首页-我的课程
|
||||
@RequestMapping("/getMyCourse")
|
||||
@@ -24,4 +32,13 @@ public class HomeController {
|
||||
return R.ok().put("myCourse",courseList);
|
||||
}
|
||||
|
||||
@RequestMapping("/getSociologyLabels")
|
||||
public R getSociologyLabels(@RequestBody ParamTo param){
|
||||
List<CourseSociologyEntity> sociologyLabels = courseSociologyService.getSociologyLabels(param.getId());
|
||||
return R.ok().put("labels",sociologyLabels);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user