|
|
@@ -372,6 +372,7 @@ public class SysLoginController {
|
|
|
* 获取二维码生成的uuid
|
|
|
*/
|
|
|
@GetMapping("/getQrCode")
|
|
|
+ @ApiOperation(value = "获取登录二维码")
|
|
|
public HttpResult getQrCode(@RequestParam String uuid) throws JsonProcessingException {
|
|
|
// String uuid = UUID.randomUUID().toString();
|
|
|
int statusCode = QrCodeStatusEnum.WAITING.getStatusCode();
|
|
|
@@ -395,6 +396,7 @@ public class SysLoginController {
|
|
|
* 扫描二维码 改变redis中相关uuid状态并于对应用户关联
|
|
|
*/
|
|
|
@GetMapping("/scanQrCode")
|
|
|
+ @ApiOperation(value = "扫描登录二维码")
|
|
|
public HttpResult scanQrCode(@RequestParam String uuid) {
|
|
|
Map<String, Object> data = new HashMap<>();
|
|
|
try {
|
|
|
@@ -423,7 +425,7 @@ public class SysLoginController {
|
|
|
return HttpResult.ok(data);
|
|
|
} else {
|
|
|
data.put("statusCode", QrCodeStatusEnum.INVALID);
|
|
|
- return HttpResult.error("二维码已过期");
|
|
|
+ return HttpResult.error("二维码已过期或已被他人使用,请刷新二维码");
|
|
|
}
|
|
|
} catch (RuntimeException | JsonProcessingException e) {
|
|
|
throw new RuntimeException(e);
|
|
|
@@ -434,6 +436,7 @@ public class SysLoginController {
|
|
|
* 轮询接口 获取二维码状态
|
|
|
*/
|
|
|
@GetMapping("/getQrCodeStatus")
|
|
|
+ @ApiOperation(value = "获取登录二维码状态")
|
|
|
public HttpResult getQrCodeStatus(HttpServletRequest request, HttpServletResponse response,
|
|
|
@RequestParam String uuid) throws JsonProcessingException {
|
|
|
|