添加--登录时返回userId

This commit is contained in:
haotian 2025-04-14 11:15:07 +08:00
parent 01dae4bb95
commit 81f1655f5a
3 changed files with 10 additions and 3 deletions

View File

@ -134,7 +134,10 @@ public class AppSystemController extends BaseController {
AjaxResult ajax = success();
// 生成令牌
String token = loginService.appLoginPassword(loginBody.getUsername(), loginBody.getPassword());
Long userId = sysUserService.selectUserByUserName(loginBody.getUsername()).getUserId();
ajax.put(Constants.TOKEN, token);
ajax.put("userId",userId);
return ajax;
}
@ -149,7 +152,9 @@ public class AppSystemController extends BaseController {
AjaxResult ajax = success();
// 生成令牌
String token = loginService.appLoginMessage(loginBody.getUsername(), loginBody.getCode(),loginBody.getPhone());
Long userId = sysUserService.selectUserByUserName(loginBody.getUsername()).getUserId();
ajax.put(Constants.TOKEN, token);
ajax.put("userId",userId);
return ajax;
}
/*

View File

@ -18,12 +18,12 @@ ruoyi:
# # 腾讯云
# domain: http://82.156.153.112:8081
# # 火山云
# 火山云
# domain: http://14.103.162.172:8081
#
# idCardPath: /home/IdCard
# profile: /home/uploadPath
# 获取ip地址开关
# 获取ip地址开关
addressEnabled: false
# 验证码类型 math 数组计算 char 字符验证
captchaType: math
@ -87,7 +87,7 @@ spring:
redis:
# 地址
host: localhost
# host: 172.17.0.3 # 腾讯云
## host: 172.17.0.3 # 腾讯云
# host: 172.17.0.2 #火山云
# 端口默认为6379

View File

@ -9,6 +9,8 @@ public class OrderListDto {
private Long userId;
// private String orderInfoId;
private String nickName;
private String phonenumber;