123
This commit is contained in:
@@ -58,6 +58,9 @@ public class UserFollowServiceImpl extends ServiceImpl<UserFollowMapper, UserFol
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean star(StarOrVisitorReq starOrVisitorReq) {
|
||||
Long fromUserId = LoginHelper.getUserId();
|
||||
if(starOrVisitorReq.getToUserId().equals(fromUserId)){
|
||||
throw new ServiceException("不能关注自己哦");
|
||||
}
|
||||
this.remove(Wrappers.lambdaQuery(UserFollow.class)
|
||||
.eq(UserFollow::getUserId,fromUserId)
|
||||
.eq(UserFollow::getFollowUser, starOrVisitorReq.getToUserId()));
|
||||
|
||||
Reference in New Issue
Block a user