| | |
| | | |
| | | 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; |
| | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | /** |
| | | * 首页前端控制器 |
| | | * 首页前端控制器 |
| | | * |
| | | * @author chenjunliang |
| | | * |
| | | */ |
| | | @RestController |
| | | @CrossOrigin |
| | | @RequestMapping(value = "/stu/homepage") |
| | | public class HomePageController { |
| | | |
| | |
| | | IExerciseInfoService exerciseInfoService; |
| | | |
| | | /** |
| | | * 首页获取我的上次学习 |
| | | * 首页获取我的上次学习 |
| | | */ |
| | | @ApiOperation(value = "首页获取我的上次学习") |
| | | @ApiOperation(value = "首页获取我的上次学习") |
| | | @GetMapping(value = "getLastStudied") |
| | | public Result getLastSubject(String subjectId, HttpServletRequest request) { |
| | | Object userId = request.getSession().getAttribute("userId"); |
| | |
| | | } |
| | | |
| | | /** |
| | | * 首页获取班级列表 |
| | | * 首页获取班级列表 |
| | | * |
| | | * @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()) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 首页获取课程列表 |
| | | * 首页获取课程列表 |
| | | */ |
| | | @GetMapping(value = "lstSubjectDetail") |
| | | public Result subjectDetailLst(HttpServletRequest request){ |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取首页数据排行 |
| | | * 获取首页数据排行 |
| | | * |
| | | * |
| | | * @param subjectId |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取当前学员的课程列表 |
| | | * 获取当前学员的课程列表 |
| | | */ |
| | | @GetMapping(value = "getMySubjectLst") |
| | | public Result getMySubjectLst() { |