|
@@ -34,25 +34,6 @@ public class NoLoginController {
|
|
|
|
|
|
@GetMapping("/getLoginAuthCode")
|
|
|
public void getLoginCode(HttpServletRequest request, HttpServletResponse response) throws IOException {
|
|
|
-
|
|
|
- String sessionId = request.getSession().getId();
|
|
|
-
|
|
|
- log.info("request--sessionId:{}",sessionId);
|
|
|
- if(redisUtil.hasKey(sessionId)){
|
|
|
- String value = redisUtil.get(sessionId);
|
|
|
- String newValue = value +"1";
|
|
|
- if(newValue.equals("11111")){
|
|
|
- response.setHeader(HttpHeaders.CONTENT_TYPE, ContentType.JSON.getValue());
|
|
|
- response.setCharacterEncoding(StandardCharsets.UTF_8.name());
|
|
|
- String result = JSONObject.toJSONString(ResultData.error(ResultCode.LOGIN_AUTH_ERROR));
|
|
|
- response.getWriter().append(result);
|
|
|
- return;
|
|
|
- }
|
|
|
- redisUtil.set(sessionId,value +"1",60);
|
|
|
- }else {
|
|
|
- redisUtil.set(sessionId, "1",60);
|
|
|
- }
|
|
|
-
|
|
|
response.setHeader("Cache-Control", "no-store, no-cache");
|
|
|
response.setContentType("image/jpeg");
|
|
|
try {
|