| | |
| | | |
| | | 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; |
| | |
| | | * |
| | | */ |
| | | @RestController |
| | | @CrossOrigin |
| | | @RequestMapping(value = "/stu/homepage") |
| | | public class HomePageController { |
| | | |
| | |
| | | @ApiOperation(value = "首页获取我的上次学习") |
| | | @GetMapping(value = "getLastStudied") |
| | | public Result getLastSubject(String subjectId, HttpServletRequest request) { |
| | | Object userId = request.getSession().getAttribute("userId"); |
| | | // Object userId = request.getSession().getAttribute("userId"); |
| | | String userId = (String) request.getSession().getAttribute("userId"); |
| | | System.out.println(userId); |
| | | return subjectService.lastStudied(String.valueOf(userId)); |
| | | return subjectService.lastStudied(userId); |
| | | } |
| | | |
| | | /** |