Commit dbf9b906 authored by liudong1993's avatar liudong1993
parents c078d1e6 b45e5874
......@@ -108,7 +108,7 @@ namespace Mall.CacheManager.User
var extModel = tenantRepository.GetEntity<RB_Tenant_Extend>(NewTenantId);
if (extModel != null)
{
UserInfo obj = new UserInfo
userInfo = new UserInfo
{
TenantId = extModel.TenantId,
Account = extModel.Account,
......@@ -123,7 +123,7 @@ namespace Mall.CacheManager.User
Token = token,
SecretKey = "",
};
UserInfoSet(UserModuleCacheKeyConfig.Mall_Login_Info + TenantId, obj, Config.JwtExpirTime);
UserInfoSet(UserModuleCacheKeyConfig.Mall_Login_Info + TenantId, userInfo, Config.JwtExpirTime);
}
}
}
......@@ -132,7 +132,7 @@ namespace Mall.CacheManager.User
{
userInfo = new UserInfo();
}
return userInfo;
}
......@@ -185,7 +185,7 @@ namespace Mall.CacheManager.User
var umodel = member_UserRepository.GetEntity<RB_Member_User_Extend>(NewUserId);
if (umodel != null)
{
AppletUserInfo obj = new AppletUserInfo
userInfo = new AppletUserInfo
{
MallBaseId = umodel.MallBaseId,
MallName = "",
......@@ -200,7 +200,7 @@ namespace Mall.CacheManager.User
SuperiorId = umodel.SuperiorId ?? 0,
Token = token
};
AppletUserInfoSet(UserModuleCacheKeyConfig.Applet_Login_Info + UserId, obj, Config.JwtExpirTime);
AppletUserInfoSet(UserModuleCacheKeyConfig.Applet_Login_Info + UserId, userInfo, Config.JwtExpirTime);
}
}
}
......
......@@ -329,7 +329,8 @@ namespace Mall.Module.User
SetMiniProgramMallTagModule(extModel, isUpdateBasic: false);
}
flag = NewId > 0;
if (flag) {
if (flag)
{
userCommonModule.InitializeCategoryStyleInfo(extModel.TenantId ?? 0, NewId);//分类样式
userCommonModule.InitializeDistributorBasicsInfo(extModel.TenantId ?? 0, NewId);//分销基础
userCommonModule.InitializeDistributorCustomInfo(extModel.TenantId ?? 0, NewId);//分销自定义
......@@ -577,7 +578,7 @@ namespace Mall.Module.User
{ nameof(RB_MiniProgram_Extend.WeChatApiSecret),extModel.WeChatApiSecret},
{ nameof(RB_MiniProgram_Extend.WeChatPayCertificate),extModel.WeChatPayCertificate},
{ nameof(RB_MiniProgram_Extend.WeChatPayPrivateKey),extModel.WeChatPayPrivateKey},
{ nameof(RB_MiniProgram_Extend.WeChatPayCertificateUrl),extModel.WeChatPayCertificateUrl},
{ nameof(RB_MiniProgram_Extend.WeChatPayCertificateUrl),extModel.WeChatPayCertificateUrl},
};
flag = programRepository.Update(fileds, new WhereHelper(nameof(RB_MiniProgram_Extend.MallBaseId), extModel.MallBaseId));
}
......
......@@ -1658,6 +1658,13 @@ namespace Mall.WebApi.Controllers.MallBase
}
//获取小程序信息
var miniProgram = programModule.GetMiniProgramModule(new Model.Extend.User.RB_MiniProgram_Extend() { MiniAppId = MiniAppId }, isGetUserCenterMenu: true);
var user_info = new object();
if (RequestParm.OpenId != null && !string.IsNullOrWhiteSpace(RequestParm.OpenId))
{
var memberModel = userModule.GetAppletUserCenterStatistics(RequestParm.OpenId);
user_info = memberModel;
}
var data = new object();
if (miniProgram != null && miniProgram.MallBaseId > 0)
{
......@@ -1739,12 +1746,7 @@ namespace Mall.WebApi.Controllers.MallBase
}
}
};
var user_info = new object();
if (RequestParm.OpenId != null && !string.IsNullOrWhiteSpace(RequestParm.OpenId))
{
var memberModel = userModule.GetAppletUserCenterStatistics(RequestParm.OpenId);
user_info = memberModel;
}
data = new
{
mall = new
......
......@@ -189,8 +189,17 @@ namespace Mall.WebApi.Controllers.User
/// <returns></returns>
public ApiResult GetTenant()
{
var model = TenantModule.GetTenantModule(base.UserInfo.TenantId);
return ApiResult.Success("", model);
if (RequestParm.TenantId > 0)
{
var model = TenantModule.GetTenantModule(RequestParm.TenantId);
return ApiResult.Success("", model);
}
if (base.UserInfo != null && base.UserInfo.TenantId > 0)
{
var model = TenantModule.GetTenantModule(base.UserInfo.TenantId);
return ApiResult.Success("", model);
}
return ApiResult.Failed(message: "参数错误!");
}
/// <summary>
......
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