...
|
...
|
@@ -46,11 +46,11 @@ public class UserInfoController { |
|
|
String salt= SecurityTool.genSalt();
|
|
|
String pass=SecurityTool.getPassword(username,password,salt);
|
|
|
user = new User();
|
|
|
user.setMember_id("aaa");
|
|
|
user.setMember_id(123);
|
|
|
user.setUsername(username);
|
|
|
user.setPassword(pass);
|
|
|
user.setSalt(salt);
|
|
|
user.setState(true);
|
|
|
user.setStatus(true);
|
|
|
userRepository.save(user);
|
|
|
}
|
|
|
return new ResponseEntity<>(ResultModel.ok(), HttpStatus.OK);
|
...
|
...
|
@@ -76,13 +76,13 @@ public class UserInfoController { |
|
|
|
|
|
@RequestMapping(method = RequestMethod.GET)
|
|
|
@Authorization
|
|
|
@ApiOperation(value = "获取用户昵称")
|
|
|
@ApiOperation(value = "获取用户id")
|
|
|
@ApiImplicitParams({
|
|
|
@ApiImplicitParam(name = "authorization", value = "请输入登录返回信息:userId_tokens", required = true, dataType = "string", paramType = "header"),
|
|
|
})
|
|
|
public ResponseEntity<ResultModel> getUserNickName(@CurrentUser User user) {
|
|
|
String dickName=user.getMember_id();
|
|
|
return new ResponseEntity<>(ResultModel.ok(dickName), HttpStatus.OK);
|
|
|
long member_id=user.getMember_id();
|
|
|
return new ResponseEntity<>(ResultModel.ok(member_id), HttpStatus.OK);
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|