This commit is contained in:
wangjinlei
2024-04-11 11:14:52 +08:00
parent b705aec11d
commit e9064b617d
15 changed files with 63 additions and 8 deletions

View File

@@ -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);
}
}