修改用户注册接口
This commit is contained in:
parent
50e79dd0b9
commit
a3f06f2f95
|
@ -58,7 +58,11 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User>
|
||||||
.build();
|
.build();
|
||||||
int insert = baseMapper.insert(user);
|
int insert = baseMapper.insert(user);
|
||||||
if (insert == 1){
|
if (insert == 1){
|
||||||
return R.ok("注册成功");
|
Map<String, String> map = new HashMap<>();
|
||||||
|
map.put("id", user.getId().toString());
|
||||||
|
String token = JwtUtil.getToken(map, CommonConstant.TOKEN_EXPIRE_TIME);
|
||||||
|
redisService.hSet(CommonConstant.LOGIN_USER, user.getId().toString(), user, CommonConstant.EXPIRE_TIME);
|
||||||
|
return R.ok(token);
|
||||||
}
|
}
|
||||||
return R.ok("注册失败");
|
return R.ok("注册失败");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue