| | |
| | | package com.ots.project.exam.restcontroller; |
| | | |
| | | |
| | | import com.ots.project.common.BaseApiController; |
| | | import com.ots.project.exam.domain.ExamUser; |
| | | import com.ots.project.exam.dto.ExamLogin; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | |
| | | /** |
| | | * @author ots |
| | | */ |
| | | @RestController("StudentUserController") |
| | | @RequestMapping(value = "/api/exam/examUser") |
| | | @AllArgsConstructor |
| | | public class ExamUserController extends BaseApiController { |
| | | |
| | | @RequestMapping(value = "/message/unreadCount", method = RequestMethod.POST) |
| | | public RestResponse unReadCount() { |
| | | return RestResponse.ok(0); |
| | | } |
| | | |
| | | @RequestMapping(value = "/current", method = RequestMethod.POST) |
| | | public RestResponse<UserResponseVM> current() { |
| | | ExamUser user = getCurrentUser(); |
| | | UserResponseVM userVm = UserResponseVM.from(user); |
| | | return RestResponse.ok(userVm); |
| | | } |
| | | |
| | | |
| | | //临时登陆 |
| | | @RequestMapping(value = "/login", method = RequestMethod.POST) |
| | | public RestResponse answerSubmit(@RequestBody @Valid ExamLogin examLogin) { |
| | | ExamUser user = getCurrentUser(); |