Commit 5ca6786d authored by liudong1993's avatar liudong1993

修改查询微信号

parent f07e3761
......@@ -72,12 +72,12 @@ namespace Mall.Module.User
/// <param name="userId"></param>
/// <param name="userInfo"></param>
/// <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 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 });
if (list.Any())
{
......
......@@ -1303,6 +1303,8 @@ namespace Mall.WebApi.Controllers.MallBase
};
}
object LookInfo = null;
if (userId > 0)
{
var oldUserInfo = miaiModule.GetMemberUserInfo(userId);
......@@ -1317,7 +1319,10 @@ namespace Mall.WebApi.Controllers.MallBase
{
if (oldBaseInfo != null && oldBaseInfo.Id > 0)
{
oldBaseInfo.WechatNo = "";
LookInfo = memberLookModule.GetWeChatLookUser(userId, userInfo, out bool IsLook);
if (!IsLook) {
oldBaseInfo.WechatNo = "";
}
}
oldUserInfo.Moblie = "";
if (oldList != null && oldList.Any() && oldOtherList != null && oldOtherList.Any())
......@@ -1356,7 +1361,6 @@ namespace Mall.WebApi.Controllers.MallBase
CreateDate = DateTime.Now,
UpdateDate = DateTime.Now
});
}
}
......@@ -1403,6 +1407,7 @@ namespace Mall.WebApi.Controllers.MallBase
oldUserInfo.Id,
oldUserInfo.Name,
oldUserInfo.Photo,
LookInfo,
WechatNo = oldBaseInfo.WechatNo ?? "",
Moblie = oldUserInfo.Moblie ?? "",
IsAttestation,
......@@ -2260,7 +2265,7 @@ namespace Mall.WebApi.Controllers.MallBase
return ApiResult.ParamIsNull();
}
var RObj = memberLookModule.GetWeChatLookUser(UserId, userInfo);
var RObj = memberLookModule.GetWeChatLookUser(UserId, userInfo, out _);
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