| | |
| | | import org.springblade.modules.loginrecord.entity.LoginRecord; |
| | | import org.springblade.modules.loginrecord.service.LoginRecordService; |
| | | import org.springblade.modules.system.entity.UserInfo; |
| | | import org.springblade.modules.system.service.IUserService; |
| | | import org.springblade.modules.zc.service.IZcService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.context.request.RequestContextHolder; |
| | |
| | | private final LoginRecordService loginRecordService; |
| | | |
| | | private final ServerConfig serverConfig; |
| | | private final IUserService userService; |
| | | |
| | | /** |
| | | * 登录 |
| | |
| | | } |
| | | } |
| | | } |
| | | //如果是app模拟考试登录 |
| | | if (loginType.equals(2)) { |
| | | //判断是否已报名 |
| | | boolean flag = userService.getUserIsApply(userInfo.getUser().getId()); |
| | | if (!flag){ |
| | | return authInfo.set("error_description", "没有报名不能进行刷题"); |
| | | } |
| | | } |
| | | //刷新 token 不新增登录记录 |
| | | if (!grantType.equals("refresh_token")){ |
| | | //新增登录记录 |