Commit 0bbf13bb authored by 黄奎's avatar 黄奎

页面修改

parent c0522cc3
......@@ -166,45 +166,49 @@ namespace Mall.CacheManager.User
/// <returns></returns>
public static AppletUserInfo GetAppletUserLoginInfo(object UserId)
{
string cacheKey = UserModuleCacheKeyConfig.Applet_Login_Info + UserId.ToString();
AppletUserInfo userInfo = null;
try
if (UserId != null)
{
userInfo = redis.StringGet<AppletUserInfo>(cacheKey);
}
catch (Exception ex)
{
LogHelper.Write(ex, "GetAppletUserLoginInfo");
}
if (userInfo == null)
{
Int32.TryParse(UserId.ToString(), out int NewUserId);
if (NewUserId > 0)
string cacheKey = UserModuleCacheKeyConfig.Applet_Login_Info + UserId.ToString();
AppletUserInfo userInfo = null;
try
{
userInfo = redis.StringGet<AppletUserInfo>(cacheKey);
}
catch (Exception ex)
{
string token = "";
var umodel = member_UserRepository.GetEntity<RB_Member_User_Extend>(NewUserId);
if (umodel != null)
LogHelper.Write(ex, "GetAppletUserLoginInfo");
}
if (userInfo == null)
{
Int32.TryParse(UserId.ToString(), out int NewUserId);
if (NewUserId > 0)
{
userInfo = new AppletUserInfo
string token = "";
var umodel = member_UserRepository.GetEntity<RB_Member_User_Extend>(NewUserId);
if (umodel != null)
{
MallBaseId = umodel.MallBaseId,
MallName = "",
Mobile = umodel.Moblie,
UserId = NewUserId,
TenantId = umodel.TenantId,
Name = umodel.Name,
OpenId = umodel.OpenId,
Photo = umodel.Photo,
Source = umodel.Source,
SecretKey = umodel.SecretKey,
SuperiorId = umodel.SuperiorId ?? 0,
Token = token
};
AppletUserInfoSet(UserModuleCacheKeyConfig.Applet_Login_Info + UserId, userInfo, Config.JwtExpirTime);
userInfo = new AppletUserInfo
{
MallBaseId = umodel.MallBaseId,
MallName = "",
Mobile = umodel.Moblie,
UserId = NewUserId,
TenantId = umodel.TenantId,
Name = umodel.Name,
OpenId = umodel.OpenId,
Photo = umodel.Photo,
Source = umodel.Source,
SecretKey = umodel.SecretKey,
SuperiorId = umodel.SuperiorId ?? 0,
Token = token
};
AppletUserInfoSet(UserModuleCacheKeyConfig.Applet_Login_Info + UserId, userInfo, Config.JwtExpirTime);
}
}
}
return userInfo;
}
return userInfo;
return null;
}
}
}
......@@ -151,17 +151,13 @@ namespace Mall.WebApi.Controllers.User
public ApiResult SetUserShippingAddress()
{
var req = RequestParm;
var userInfo = AppletUserInfo;
JObject prams = JObject.Parse(req.msg.ToString());
int NewUserId = prams.GetInt("NewUserId");
AppletUserInfo userInfo =null;
if (NewUserId > 0)
{
userInfo = UserReidsCache.GetAppletUserLoginInfo(NewUserId);
}
else
{
userInfo = AppletUserInfo;
}
RB_Member_ShippingAddress_Extend demodel = JsonConvert.DeserializeObject<RB_Member_ShippingAddress_Extend>(req.msg.ToString());
if (string.IsNullOrEmpty(demodel.Name))
{
......
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