修复小程序获取COOKIE BUG

This commit is contained in:
shenjian
2024-12-16 13:53:24 +08:00
parent f1709e6c77
commit 737d50683f
@@ -87,6 +87,7 @@ public class DistrictController {
if("b".equals(login_user_type) || "gb".equals(login_user_type)){ if("b".equals(login_user_type) || "gb".equals(login_user_type)){
CacheUtils.putValue(CachePolicyEnum.LONG, UsersInfoService.class, weiXinId + "_city_"+ login_user_type , model.getCityName()); CacheUtils.putValue(CachePolicyEnum.LONG, UsersInfoService.class, weiXinId + "_city_"+ login_user_type , model.getCityName());
} }
try {
Long userId = Long.parseLong(CookieUtils.getCookieValue(request, "login_user_id")); Long userId = Long.parseLong(CookieUtils.getCookieValue(request, "login_user_id"));
if (userId != null) { if (userId != null) {
FjtUsers users = fjtUsersService.findById(userId); FjtUsers users = fjtUsersService.findById(userId);
@@ -94,6 +95,9 @@ public class DistrictController {
model.setRole(users.getRole()); model.setRole(users.getRole());
} }
} }
} catch (Exception ex) {
}
model.setType(login_user_type); model.setType(login_user_type);
return model; return model;
} }