更新登录接口返回的用户信息

This commit is contained in:
liuchengqian 2023-03-09 15:55:45 +08:00
parent 85f50f4aad
commit 081d5cd66c

View File

@ -3,6 +3,7 @@ package com.xkrs.common.account;
import com.xkrs.common.encapsulation.OutputEncapsulation; import com.xkrs.common.encapsulation.OutputEncapsulation;
import com.xkrs.common.encapsulation.PromptMessageEnum; import com.xkrs.common.encapsulation.PromptMessageEnum;
import com.xkrs.model.entity.SysUserEntity; import com.xkrs.model.entity.SysUserEntity;
import com.xkrs.utilsnew.SysUserConvertUtils;
import io.jsonwebtoken.Claims; import io.jsonwebtoken.Claims;
import io.jsonwebtoken.Jwts; import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.security.Keys; import io.jsonwebtoken.security.Keys;
@ -80,7 +81,7 @@ public class TokenAuthenticationService {
// 签名设置 // 签名设置
.signWith(key).compact(); .signWith(key).compact();
map.put("token", jwt); map.put("token", jwt);
map.put("user", sysUserEntity); map.put("user", SysUserConvertUtils.convert(sysUserEntity));
// JWT 写入 body // JWT 写入 body
PrintWriter out = null; PrintWriter out = null;
try { try {