|
@@ -30,7 +30,7 @@ import org.springframework.data.redis.core.StringRedisTemplate;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.DigestUtils;
|
|
|
import org.springframework.util.StringUtils;
|
|
|
-import org.springframework.web.multipart.MultipartFile;
|
|
|
+
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import java.nio.charset.StandardCharsets;
|
|
@@ -115,6 +115,7 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginMapper, UserLogin
|
|
|
|
|
|
UserRelationships userRelationships=new UserRelationships();
|
|
|
userRelationships.setId(IdUtil.getSnowflake().nextId());
|
|
|
+ userRelationships.setUserId(user.getId());
|
|
|
userRelationships.setFriendId(1933707308387405824L);
|
|
|
userRelationships.setStatus(1);
|
|
|
userRelationships.setCreatedAt(new Date());
|
|
@@ -146,6 +147,7 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginMapper, UserLogin
|
|
|
|
|
|
UserRelationships userRelationships=new UserRelationships();
|
|
|
userRelationships.setId(IdUtil.getSnowflake().nextId());
|
|
|
+ userRelationships.setUserId(user.getId());
|
|
|
userRelationships.setFriendId(1933707308387405824L);
|
|
|
userRelationships.setStatus(1);
|
|
|
userRelationships.setCreatedAt(new Date());
|
|
@@ -239,7 +241,12 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginMapper, UserLogin
|
|
|
if (b){
|
|
|
// 查询用户信息,根据用户名
|
|
|
QueryWrapper<UserLogin> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.eq("user_username",userPassDto.getUsername());
|
|
|
+ queryWrapper.eq("user_username",userPassDto.getUsername())
|
|
|
+ .or()
|
|
|
+ .eq("user_mobile",userPassDto.getUsername())
|
|
|
+ .or()
|
|
|
+ .eq("email",userPassDto.getUsername());
|
|
|
+
|
|
|
UserLogin one = this.getOne(queryWrapper);
|
|
|
// 如果用户不存在,抛出异常
|
|
|
if (one==null){
|