Commit 074fe5bf authored by 吴春's avatar 吴春

提交代码

parent e9d15d14
......@@ -669,28 +669,37 @@ namespace Mall.WebApi.Controllers.MallBase
var userInfo = AppletUserInfo;
int userId = parm.GetInt("UserId");
int isFollow = -1;//-1 自己, 0-未关注,1-已关注,2-别人关注了你,3-互相关注
int MyFollowId = 0;
int OtherFollowId = 0;
if (userId == 0)
{
userId = userInfo.UserId;
var oldList = miaiModule.GetFollowMemberList(new RB_MiAi_FollowMember_Extend { Status = 0, UserId = userId, CreateBy = userInfo.UserId, MallBaseId = userInfo.MallBaseId, TenantId = userInfo.TenantId });
var oldOtherList = miaiModule.GetFollowMemberList(new RB_MiAi_FollowMember_Extend { Status = 0, UserId = userInfo.UserId, CreateBy = userId, MallBaseId = userInfo.MallBaseId, TenantId = userInfo.TenantId });
if (oldList != null && oldList.Any() && oldOtherList != null && oldOtherList.Any())
{
isFollow = 3;
}
else if (oldList != null && oldList.Any())
{
isFollow = 1;
}
else if (oldOtherList != null && oldOtherList.Any())
{
isFollow = 2;
}
else
{
isFollow = 0;
}
}
var oldList = miaiModule.GetFollowMemberList(new RB_MiAi_FollowMember_Extend { Status = 0, UserId = userId, CreateBy = userInfo.UserId, MallBaseId = userInfo.MallBaseId, TenantId = userInfo.TenantId });
var oldOtherList = miaiModule.GetFollowMemberList(new RB_MiAi_FollowMember_Extend { Status = 0, UserId = userInfo.UserId, CreateBy = userId, MallBaseId = userInfo.MallBaseId, TenantId = userInfo.TenantId });
if (oldList != null && oldList.Any() && oldOtherList != null && oldOtherList.Any())
{
isFollow = 3;
MyFollowId = oldList.FirstOrDefault()?.ID ?? 0;
OtherFollowId = oldOtherList.FirstOrDefault()?.ID ?? 0;
}
else if (oldList != null && oldList.Any())
{
isFollow = 1;
MyFollowId = oldList.FirstOrDefault()?.ID ?? 0;
}
else if (oldOtherList != null && oldOtherList.Any())
{
isFollow = 2;
OtherFollowId = oldOtherList.FirstOrDefault()?.ID ?? 0;
}
else
{
isFollow = 0;
}
var oldUserInfo = miaiModule.GetMemberUserInfo(userId);
var oldBaseInfo = miaiModule.GetBaseInfoList(new RB_MiAi_BaseInfo_Extend { UserId = userId, TenantId = userInfo.TenantId, MallBaseId = userInfo.MallBaseId }).FirstOrDefault();
......@@ -706,7 +715,8 @@ namespace Mall.WebApi.Controllers.MallBase
{
oldBaseInfo.AlbumList = JsonConvert.DeserializeObject<List<string>>(oldBaseInfo.Album);
}
else {
else
{
oldBaseInfo.AlbumList = new List<string>();
}
IsAttestation = 1;//已认证
......@@ -718,6 +728,8 @@ namespace Mall.WebApi.Controllers.MallBase
var result = new
{
MyFollowId,
OtherFollowId,
oldUserInfo.Id,
oldUserInfo.Name,
oldUserInfo.Photo,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment