派生自 projectDept/qhighschool

yn147
2023-05-10 96286178ee1c257c130cb2ad964a781f36c4eee5
src/main/java/com/qxueyou/scc/stucontroller/HomePageController.java
@@ -5,6 +5,7 @@
import com.qxueyou.scc.base.util.ClientUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@@ -25,12 +26,13 @@
import javax.servlet.http.HttpServletRequest;
/**
 * 首页前端控制器
 * 首页前端控制器
 * 
 * @author chenjunliang
 *
 */
@RestController
@CrossOrigin
@RequestMapping(value = "/stu/homepage")
public class HomePageController {
@@ -53,9 +55,9 @@
   IExerciseInfoService exerciseInfoService;
   /**
    * 首页获取我的上次学习
    * 首页获取我的上次学习
    */
   @ApiOperation(value = "首页获取我的上次学习")
   @ApiOperation(value = "首页获取我的上次学习")
   @GetMapping(value = "getLastStudied")
   public Result getLastSubject(String subjectId, HttpServletRequest request) {
      Object userId = request.getSession().getAttribute("userId");
@@ -64,18 +66,18 @@
   }
   /**
    * 首页获取班级列表
    * 首页获取班级列表
    * 
    * @param limit
    *            每页显示几条
    *            每页显示几条
    * @param pageNum
    *            页码
    *            页码
    * 
    */
   @GetMapping(value = "getClassLst")
   public Result getClassLst(Integer limit, Integer pageNum) {
      if (userService.isAdmin()) {// 如果为管理员则获取所有班级列表
      if (userService.isAdmin()) {// 如果为管理员则获取所有班级列表
         return classService.getAllClassLst();
      }
      if (userService.isTeacher()) {
@@ -101,7 +103,7 @@
   }
   /**
    * 首页获取课程列表
    * 首页获取课程列表
    */
   @GetMapping(value = "lstSubjectDetail")
   public Result subjectDetailLst(HttpServletRequest request){
@@ -109,7 +111,7 @@
   }
   /**
    * 获取首页数据排行
    * 获取首页数据排行
    * 
    * 
    * @param subjectId
@@ -120,7 +122,7 @@
   }
   /**
    * 获取当前学员的课程列表
    * 获取当前学员的课程列表
    */
   @GetMapping(value = "getMySubjectLst")
   public Result getMySubjectLst() {