提交 73c61e5b 作者: zhenjie

登录缓存添加openid

上级 a376427b
...@@ -20,6 +20,7 @@ import java.io.Serializable; ...@@ -20,6 +20,7 @@ import java.io.Serializable;
public class LoginSuccessDTO implements Serializable { public class LoginSuccessDTO implements Serializable {
private static final long serialVersionUID = -1200834589953161925L; private static final long serialVersionUID = -1200834589953161925L;
private String token; private String token;
private String openId;
private Integer userAccountId; private Integer userAccountId;
private String accountNo; private String accountNo;
private Integer portType; private Integer portType;
......
...@@ -32,6 +32,8 @@ public class UserAccountVO implements Serializable { ...@@ -32,6 +32,8 @@ public class UserAccountVO implements Serializable {
private String uid; private String uid;
@ApiModelProperty(value = "手机号") @ApiModelProperty(value = "手机号")
private String phoneNum; private String phoneNum;
@ApiModelProperty(value = "openId")
private String openId;
@ApiModelProperty(value = "用户名称") @ApiModelProperty(value = "用户名称")
private String userName; private String userName;
@ApiModelProperty(value = "用户昵称") @ApiModelProperty(value = "用户昵称")
......
...@@ -42,7 +42,7 @@ public class AuthHandler { ...@@ -42,7 +42,7 @@ public class AuthHandler {
map.put(JwtConstant.USER_ACCOUNT_ID, userAccountVO.getId()); map.put(JwtConstant.USER_ACCOUNT_ID, userAccountVO.getId());
map.put(JwtConstant.TOKEN_TYPE, JwtConstant.IUAV_TOKEN); map.put(JwtConstant.TOKEN_TYPE, JwtConstant.IUAV_TOKEN);
String token = JwtUtil.createJwt(map); String token = JwtUtil.createJwt(map);
LoginSuccessDTO loginSuccessDTO = LoginSuccessDTO.builder().token(token).userAccountId(userAccountVO.getId()).uid(userAccountVO.getId() + "") LoginSuccessDTO loginSuccessDTO = LoginSuccessDTO.builder().token(token).openId(userAccountVO.getOpenId()).userAccountId(userAccountVO.getId()).uid(userAccountVO.getId() + "")
.userName(userAccountVO.getUserName()).nickName(userAccountVO.getNickName()).phoneNum(userAccountVO.getPhoneNum()).portType(UserTypeEnums.APP.getType()).build(); .userName(userAccountVO.getUserName()).nickName(userAccountVO.getNickName()).phoneNum(userAccountVO.getPhoneNum()).portType(UserTypeEnums.APP.getType()).build();
stringRedisTemplate.opsForValue().set( stringRedisTemplate.opsForValue().set(
token, JSONObject.toJSONString(loginSuccessDTO), token, JSONObject.toJSONString(loginSuccessDTO),
......
...@@ -105,7 +105,7 @@ public class UserAccountDO implements Serializable { ...@@ -105,7 +105,7 @@ public class UserAccountDO implements Serializable {
} }
public UserAccountVO buildUserAccountVO() { public UserAccountVO buildUserAccountVO() {
return UserAccountVO.builder().id(this.id).uid(this.id + "").phoneNum(this.phoneNum).userName(this.userName).nickName(this.nickName).userImg(this.userImg) return UserAccountVO.builder().id(this.id).uid(this.id + "").phoneNum(this.phoneNum).userName(this.userName).nickName(this.nickName).userImg(this.userImg).openId(this.openId)
.userSex(this.userSex).email(this.email).source(this.source).accountStatus(this.accountStatus).remark(this.remark).portType(this.portType).createTime(this.createTime) .userSex(this.userSex).email(this.email).source(this.source).accountStatus(this.accountStatus).remark(this.remark).portType(this.portType).createTime(this.createTime)
.companyAuthStatus(this.companyName == null ? 0 : 1).companyName(this.companyName) .companyAuthStatus(this.companyName == null ? 0 : 1).companyName(this.companyName)
.inviteCount(this.inviteCount) .inviteCount(this.inviteCount)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论