|
|
|
@ -1,5 +1,6 @@ |
|
|
|
package com.bx.implatform.service.impl; |
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
@ -20,6 +21,7 @@ import com.bx.implatform.entity.User; |
|
|
|
import com.bx.implatform.enums.ResultCode; |
|
|
|
import com.bx.implatform.exception.GlobalException; |
|
|
|
import com.bx.implatform.mapper.UserMapper; |
|
|
|
import com.bx.implatform.result.ResultUtils; |
|
|
|
import com.bx.implatform.service.FriendService; |
|
|
|
import com.bx.implatform.service.GroupMemberService; |
|
|
|
import com.bx.implatform.service.PrivateMessageService; |
|
|
|
@ -41,6 +43,8 @@ import org.springframework.transaction.annotation.Transactional; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
import static com.bx.implatform.enums.ResultCode.XSS_PARAM_ERROR; |
|
|
|
|
|
|
|
@Slf4j |
|
|
|
@Service |
|
|
|
@RequiredArgsConstructor |
|
|
|
@ -363,6 +367,11 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us |
|
|
|
|
|
|
|
@Override |
|
|
|
public boolean chenckRelation(Long customerId, Long targetId, Long userId) { |
|
|
|
// 检查参数
|
|
|
|
if(ObjectUtil.isNull(customerId) || ObjectUtil.isNull(targetId) || ObjectUtil.isNull(userId)){ |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
// 检查本身之间的关系
|
|
|
|
if(customerId.equals(targetId) || customerId.equals(userId) || targetId.equals(userId)){ |
|
|
|
return false; |
|
|
|
|