1.Friend GetFriend(int selfId, int otherId);
int selfId是自己 int otherId是别人的
2. 查询用户信息
IUserService userService = new UserService();
当前用户户的信息
TBUsers self = userService.FindByUserId(selfId);
TBUsers other = userService.FindByUserId(otherId);
3.Guid是表示全局唯一标识符
4.bool selfResult = RedisHelper.HashSet(selfKey, otherId.ToString(), selfFriend);
Hash因为数据加了两个,是互相加号友
5.把时间转换成秒用Unix : long score = TimeHelper.ConvertDateTimeByUnix(DateTime.Now);
6. long timeStamp = (long)(DateTime.Now - startTime).TotalSeconds; // 相差秒数,计算时间差