|
|
@@ -33,7 +33,7 @@ public class UserRelationController {
|
|
|
@ApiOperation(value = "关注用户", notes = "N")
|
|
|
@PostMapping("/follow/{followingId}")
|
|
|
public String followUser(@PathVariable("followingId") String followingId) {
|
|
|
- long followingId1 = accountQuery.getUserId(followingId);
|
|
|
+ long followingId1 = accountQuery.getUserIdLong(followingId);
|
|
|
long loginUser = UserContext.getUser();
|
|
|
userRelationService.followUser(loginUser, followingId1);
|
|
|
return WebResult.success();
|
|
|
@@ -43,7 +43,7 @@ public class UserRelationController {
|
|
|
@ApiOperation(value = "取消关注用户", notes = "N")
|
|
|
@PostMapping("/unfollow/{followingId}")
|
|
|
public String unfollowUser(@PathVariable("followingId") String followingId) {
|
|
|
- long followingId1 = accountQuery.getUserId(followingId);
|
|
|
+ long followingId1 = accountQuery.getUserIdLong(followingId);
|
|
|
long loginUser = UserContext.getUser();
|
|
|
userRelationService.unfollowUser(loginUser, followingId1);
|
|
|
return WebResult.success();
|
|
|
@@ -52,7 +52,7 @@ public class UserRelationController {
|
|
|
@ApiOperation(value = "检查是否关注了用户", notes = "N")
|
|
|
@GetMapping("/check/{userId}")
|
|
|
public String check(@PathVariable("userId") String userId) {
|
|
|
- long userId1 = accountQuery.getUserId(userId);
|
|
|
+ long userId1 = accountQuery.getUserIdLong(userId);
|
|
|
long loginUser = UserContext.getUser();
|
|
|
boolean followed;
|
|
|
if (loginUser == -1) {
|
|
|
@@ -66,7 +66,7 @@ public class UserRelationController {
|
|
|
@ApiOperation(value = "获取用户的关注列表", notes = "N")
|
|
|
@GetMapping("/following/{userId}")
|
|
|
public String getFollowing(@PathVariable("userId") String userId) {
|
|
|
- long userId1 = accountQuery.getUserId(userId);
|
|
|
+ long userId1 = accountQuery.getUserIdLong(userId);
|
|
|
List<UserCard> list = userRelationService.getFollowingCards(userId1);
|
|
|
return WebResult.success(list);
|
|
|
}
|
|
|
@@ -74,7 +74,7 @@ public class UserRelationController {
|
|
|
@ApiOperation(value = "获取用户的粉丝列表", notes = "N")
|
|
|
@GetMapping("/follower/{userId}")
|
|
|
public String getFollower(@PathVariable("userId") String userId) {
|
|
|
- long userId1 = accountQuery.getUserId(userId);
|
|
|
+ long userId1 = accountQuery.getUserIdLong(userId);
|
|
|
List<UserCard> list = userRelationService.getFollowerCards(userId1);
|
|
|
return WebResult.success(list);
|
|
|
}
|