修复sessionbug
This commit is contained in:
parent
6ed9ce354a
commit
87ea5dfd55
|
@ -309,7 +309,7 @@ public class ClothesController {
|
|||
*/
|
||||
@GetMapping("/facelift")
|
||||
@Operation(summary = "小程序端用户调用换装api", description = "参数:服装id,权限:管理员(admin, boss),方法名:updateClothesShelvesStatus")
|
||||
@AuthCheck(mustRole = UserConstant.ADMIN_ROLE)
|
||||
@AuthCheck(mustRole = UserConstant.DEFAULT_ROLE)
|
||||
public BaseResponse<String> invokeChangeClothesApi(@RequestParam String modelURL, @RequestParam String clothesURL) {
|
||||
if (StringUtils.isBlank(modelURL) || StringUtils.isBlank(clothesURL)) {
|
||||
throw new BusinessException(ErrorCode.PARAMS_ERROR, "参数不能为空");
|
||||
|
|
|
@ -65,6 +65,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|||
HttpSession session = request.getSession();
|
||||
System.out.println(session);
|
||||
session.setAttribute(USER_LOGIN_STATE, user);
|
||||
session.setMaxInactiveInterval(10);
|
||||
return this.getUserVO(user);
|
||||
}
|
||||
|
||||
|
@ -192,7 +193,9 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
|||
this.save(user);
|
||||
// 记住用户的登录态
|
||||
}
|
||||
request.getSession().setAttribute(USER_LOGIN_STATE, user);
|
||||
HttpSession session = request.getSession();
|
||||
session.setAttribute(USER_LOGIN_STATE, user);
|
||||
session.setMaxInactiveInterval(10);
|
||||
return this.getUserVO(user);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,7 @@ server:
|
|||
session:
|
||||
cookie:
|
||||
max-age: 2592000
|
||||
timeout: 2592000
|
||||
# timeout: 2592000
|
||||
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath:mapper/*.xml
|
||||
|
|
|
@ -52,7 +52,7 @@ server:
|
|||
session:
|
||||
cookie:
|
||||
max-age: 2592000
|
||||
timeout: 2592000
|
||||
# timeout: 2592000
|
||||
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath:mapper/*.xml
|
||||
|
|
|
@ -55,7 +55,7 @@ server:
|
|||
session:
|
||||
cookie:
|
||||
max-age: 2592000
|
||||
timeout: 720h
|
||||
# timeout: 720h
|
||||
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath:mapper/*.xml
|
||||
|
|
Loading…
Reference in New Issue
Block a user