|
@@ -9,11 +9,9 @@ import com.yonge.cooleshow.biz.dal.dto.BasicUserInfo;
|
|
|
import com.yonge.cooleshow.biz.dal.entity.ImUserFriend;
|
|
|
import com.yonge.cooleshow.biz.dal.service.ImUserFriendService;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
@@ -61,7 +59,7 @@ public class ImUserFriendServiceImpl extends ServiceImpl<ImUserFriendDao, ImUser
|
|
|
teacherFriend.setFriendAvatar(info.getAvatar());
|
|
|
teacherFriend.setFriendNickname(info.getUsername());
|
|
|
studentFriend.setFriendAvatar(info.getAvatar());
|
|
|
- studentFriend.setFriendNickname(info.getRealName());
|
|
|
+ studentFriend.setFriendNickname(info.getUsername());
|
|
|
}
|
|
|
teacherFriend.setFriendId(studentId);
|
|
|
teacherFriend.setUserId(teacherId);
|
|
@@ -88,7 +86,7 @@ public class ImUserFriendServiceImpl extends ServiceImpl<ImUserFriendDao, ImUser
|
|
|
if(Objects.nonNull(imUserFriend)){
|
|
|
|
|
|
imUserFriend.setFriendAvatar(basicUserInfo.getAvatar());
|
|
|
- imUserFriend.setFriendNickname(StringUtils.isEmpty(basicUserInfo.getRealName())?basicUserInfo.getUsername():basicUserInfo.getRealName());
|
|
|
+ imUserFriend.setFriendNickname(basicUserInfo.getUsername());
|
|
|
imUserFriend.setUpdateTime(new Date());
|
|
|
baseMapper.updateById(imUserFriend);
|
|
|
return imUserFriend;
|
|
@@ -96,7 +94,7 @@ public class ImUserFriendServiceImpl extends ServiceImpl<ImUserFriendDao, ImUser
|
|
|
}
|
|
|
ImUserFriend imUserFriend = new ImUserFriend();
|
|
|
imUserFriend.setFriendAvatar(basicUserInfo.getAvatar());
|
|
|
- imUserFriend.setFriendNickname(StringUtils.isEmpty(basicUserInfo.getRealName())?basicUserInfo.getUsername():basicUserInfo.getRealName());
|
|
|
+ imUserFriend.setFriendNickname(basicUserInfo.getUsername());
|
|
|
imUserFriend.setFriendId(userId);
|
|
|
return imUserFriend;
|
|
|
}
|