Commit a45a1606 by 杨卫

feat:登录账号添加accountId返回

1 parent 324ef453
package com.glsx.usedcar.module.vrsystem.dto;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.io.Serial;
......@@ -15,6 +16,7 @@ public class LoginUserDTO implements Serializable {
private static final long serialVersionUID = 1L;
private Long userId;
private String accountId;
private String phone;
private String userName;
......
......@@ -121,6 +121,7 @@ public class VrLoginService {
userDTO.setUserId(user.getId());
userDTO.setPhone(user.getPhone());
userDTO.setUserName(user.getUserName());
userDTO.setAccountId(user.getAccountId());
// 获取角色信息
VrRole role = vrUserService.getUserRole(user.getId());
......@@ -172,6 +173,7 @@ public class VrLoginService {
return VrLoginRespVO.builder()
.token(token)
.userId(user.getId())
.accountId(user.getAccountId())
.phone(user.getPhone())
.userName(user.getUserName())
.roleId(role != null ? role.getId() : null)
......@@ -247,6 +249,7 @@ public class VrLoginService {
VrLoginUserVO rtn = VrLoginUserVO.builder()
.userId(userDTO.getUserId())
.accountId(userDTO.getAccountId())
.phone(userDTO.getPhone())
.userName(userDTO.getUserName())
.roleId(userDTO.getRoleId())
......
package com.glsx.usedcar.module.vrsystem.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.persistence.Column;
import lombok.Builder;
import lombok.Data;
......@@ -24,6 +25,9 @@ public class VrLoginRespVO implements Serializable {
@Schema(description = "用户ID", example = "1")
private Long userId;
@Schema(description = "账号ID", example = "1")
private String accountId;
@Schema(description = "手机号", example = "13800138000")
private String phone;
......
......@@ -21,6 +21,9 @@ public class VrLoginUserVO implements Serializable {
@Schema(description = "用户ID", example = "1")
private Long userId;
@Schema(description = "账号ID", example = "1")
private String accountId;
@Schema(description = "手机号", example = "13800138000")
private String phone;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!