|
@@ -4,6 +4,7 @@ import cn.reghao.tnb.account.api.iface.AccountQuery;
|
|
|
import cn.reghao.tnb.user.api.dto.UserCard;
|
|
import cn.reghao.tnb.user.api.dto.UserCard;
|
|
|
import cn.reghao.tnb.user.api.dto.UserMessageDto;
|
|
import cn.reghao.tnb.user.api.dto.UserMessageDto;
|
|
|
import cn.reghao.tnb.user.api.iface.UserService;
|
|
import cn.reghao.tnb.user.api.iface.UserService;
|
|
|
|
|
+import cn.reghao.tnb.user.app.db.mapper.UserContactMapper;
|
|
|
import cn.reghao.tnb.user.app.db.mapper.UserRecommendMapper;
|
|
import cn.reghao.tnb.user.app.db.mapper.UserRecommendMapper;
|
|
|
import cn.reghao.tnb.user.app.model.po.UserRecommend;
|
|
import cn.reghao.tnb.user.app.model.po.UserRecommend;
|
|
|
import cn.reghao.tnb.user.app.service.UserMessageService;
|
|
import cn.reghao.tnb.user.app.service.UserMessageService;
|
|
@@ -32,15 +33,17 @@ public class UserServiceImpl implements UserService {
|
|
|
private final UserProfileService userProfileService;
|
|
private final UserProfileService userProfileService;
|
|
|
private final UserMessageService userMessageService;
|
|
private final UserMessageService userMessageService;
|
|
|
private final UserRecommendMapper userRecommendMapper;
|
|
private final UserRecommendMapper userRecommendMapper;
|
|
|
|
|
+ private UserContactMapper userContactMapper;
|
|
|
|
|
|
|
|
public UserServiceImpl(UserRelationService userRelationService, UserVipService userVipService,
|
|
public UserServiceImpl(UserRelationService userRelationService, UserVipService userVipService,
|
|
|
UserProfileService userProfileService, UserMessageService userMessageService,
|
|
UserProfileService userProfileService, UserMessageService userMessageService,
|
|
|
- UserRecommendMapper userRecommendMapper) {
|
|
|
|
|
|
|
+ UserRecommendMapper userRecommendMapper, UserContactMapper userContactMapper) {
|
|
|
this.userRelationService = userRelationService;
|
|
this.userRelationService = userRelationService;
|
|
|
this.userVipService = userVipService;
|
|
this.userVipService = userVipService;
|
|
|
this.userProfileService = userProfileService;
|
|
this.userProfileService = userProfileService;
|
|
|
this.userMessageService = userMessageService;
|
|
this.userMessageService = userMessageService;
|
|
|
this.userRecommendMapper = userRecommendMapper;
|
|
this.userRecommendMapper = userRecommendMapper;
|
|
|
|
|
+ this.userContactMapper = userContactMapper;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -93,4 +96,9 @@ public class UserServiceImpl implements UserService {
|
|
|
|
|
|
|
|
return changed;
|
|
return changed;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public boolean contactContain(long userId, long friendId) {
|
|
|
|
|
+ return userContactMapper.findByOwnerAndFriendId(userId, friendId) != null;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|