修改用户注册接口
This commit is contained in:
parent
a3f06f2f95
commit
764a788671
|
@ -46,6 +46,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User>
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R<String> register(UserRegisterDTO userRegisterDTO) {
|
public R<String> register(UserRegisterDTO userRegisterDTO) {
|
||||||
|
try {
|
||||||
if (checkUser(userRegisterDTO)) {
|
if (checkUser(userRegisterDTO)) {
|
||||||
return R.fail("用户已被注册");
|
return R.fail("用户已被注册");
|
||||||
}
|
}
|
||||||
|
@ -64,7 +65,10 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User>
|
||||||
redisService.hSet(CommonConstant.LOGIN_USER, user.getId().toString(), user, CommonConstant.EXPIRE_TIME);
|
redisService.hSet(CommonConstant.LOGIN_USER, user.getId().toString(), user, CommonConstant.EXPIRE_TIME);
|
||||||
return R.ok(token);
|
return R.ok(token);
|
||||||
}
|
}
|
||||||
return R.ok("注册失败");
|
} catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue