Commit 5ca6786d authored by liudong1993's avatar liudong1993

修改查询微信号

parent f07e3761
...@@ -72,12 +72,12 @@ namespace Mall.Module.User ...@@ -72,12 +72,12 @@ namespace Mall.Module.User
/// <param name="userId"></param> /// <param name="userId"></param>
/// <param name="userInfo"></param> /// <param name="userInfo"></param>
/// <returns></returns> /// <returns></returns>
public object GetWeChatLookUser(int userId, AppletUserInfo userInfo) public object GetWeChatLookUser(int userId, AppletUserInfo userInfo, out bool IsLook)
{ {
string STime = DateTime.Now.ToString("yyyy-MM") + "-01"; string STime = DateTime.Now.ToString("yyyy-MM") + "-01";
string ETime = Convert.ToDateTime(STime).AddMonths(1).AddDays(-1).ToString("yyyy-MM-dd"); string ETime = Convert.ToDateTime(STime).AddMonths(1).AddDays(-1).ToString("yyyy-MM-dd");
//首先查询是否已查看 //首先查询是否已查看
bool IsLook = false; IsLook = false;
var list = member_LookRepository.GetMemberLookListRepository(new RB_Member_Look_Extend() { MallBaseId = userInfo.MallBaseId, UserId = userId, CreateBy = userInfo.UserId, StartTime = STime, EndTime = ETime }); var list = member_LookRepository.GetMemberLookListRepository(new RB_Member_Look_Extend() { MallBaseId = userInfo.MallBaseId, UserId = userId, CreateBy = userInfo.UserId, StartTime = STime, EndTime = ETime });
if (list.Any()) if (list.Any())
{ {
......
...@@ -1303,6 +1303,8 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1303,6 +1303,8 @@ namespace Mall.WebApi.Controllers.MallBase
}; };
} }
object LookInfo = null;
if (userId > 0) if (userId > 0)
{ {
var oldUserInfo = miaiModule.GetMemberUserInfo(userId); var oldUserInfo = miaiModule.GetMemberUserInfo(userId);
...@@ -1317,7 +1319,10 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1317,7 +1319,10 @@ namespace Mall.WebApi.Controllers.MallBase
{ {
if (oldBaseInfo != null && oldBaseInfo.Id > 0) if (oldBaseInfo != null && oldBaseInfo.Id > 0)
{ {
oldBaseInfo.WechatNo = ""; LookInfo = memberLookModule.GetWeChatLookUser(userId, userInfo, out bool IsLook);
if (!IsLook) {
oldBaseInfo.WechatNo = "";
}
} }
oldUserInfo.Moblie = ""; oldUserInfo.Moblie = "";
if (oldList != null && oldList.Any() && oldOtherList != null && oldOtherList.Any()) if (oldList != null && oldList.Any() && oldOtherList != null && oldOtherList.Any())
...@@ -1356,7 +1361,6 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1356,7 +1361,6 @@ namespace Mall.WebApi.Controllers.MallBase
CreateDate = DateTime.Now, CreateDate = DateTime.Now,
UpdateDate = DateTime.Now UpdateDate = DateTime.Now
}); });
} }
} }
...@@ -1403,6 +1407,7 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -1403,6 +1407,7 @@ namespace Mall.WebApi.Controllers.MallBase
oldUserInfo.Id, oldUserInfo.Id,
oldUserInfo.Name, oldUserInfo.Name,
oldUserInfo.Photo, oldUserInfo.Photo,
LookInfo,
WechatNo = oldBaseInfo.WechatNo ?? "", WechatNo = oldBaseInfo.WechatNo ?? "",
Moblie = oldUserInfo.Moblie ?? "", Moblie = oldUserInfo.Moblie ?? "",
IsAttestation, IsAttestation,
...@@ -2260,7 +2265,7 @@ namespace Mall.WebApi.Controllers.MallBase ...@@ -2260,7 +2265,7 @@ namespace Mall.WebApi.Controllers.MallBase
return ApiResult.ParamIsNull(); return ApiResult.ParamIsNull();
} }
var RObj = memberLookModule.GetWeChatLookUser(UserId, userInfo); var RObj = memberLookModule.GetWeChatLookUser(UserId, userInfo, out _);
return ApiResult.Success("", RObj); return ApiResult.Success("", RObj);
} }
......
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