|  |  | 
 |  |  | import com.doumee.core.annotation.pr.PreventRepeat; | 
 |  |  | import com.doumee.core.constants.ResponseStatus; | 
 |  |  | import com.doumee.core.exception.BusinessException; | 
 |  |  | import com.doumee.dao.system.dto.LoginCabinetDTO; | 
 |  |  | import com.doumee.dao.system.dto.LoginH5DTO; | 
 |  |  | import com.doumee.service.business.third.model.ApiResponse; | 
 |  |  | import com.doumee.service.business.third.model.LoginUserInfo; | 
 |  |  | 
 |  |  |         return ApiResponse.failed( "登录已失效"); | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |     @PreventRepeat(limit = 10, lockTime = 10000) | 
 |  |  |     @ApiOperation("登录 - 钥匙柜") | 
 |  |  |     @PostMapping("/loginCabinet") | 
 |  |  |     @LoginNoRequired | 
 |  |  |     public ApiResponse<String> loginCabinet (@Validated @RequestBody LoginCabinetDTO dto, ServerWebExchange serverWebExchange) { | 
 |  |  |         try { | 
 |  |  |             ServerHttpRequest request = serverWebExchange.getRequest(); | 
 |  |  |             LoginUserInfo user = systemLoginService.loginByPasswordForCabinet(dto,request); | 
 |  |  |             String token = jwtTokenUtil.generateToken(user); | 
 |  |  |             return ApiResponse.success(token); | 
 |  |  |         }catch (BusinessException e){ | 
 |  |  |             return ApiResponse.failed(e.getCode(),e.getMessage()); | 
 |  |  |         }catch (Exception e){ | 
 |  |  |             e.printStackTrace(); | 
 |  |  |             return ApiResponse.failed(ResponseStatus.SERVER_ERROR); | 
 |  |  |         } | 
 |  |  |     } | 
 |  |  |  | 
 |  |  |  | 
 |  |  | } |