Commit 78369f0f authored by 吴春's avatar 吴春

提交代码

parent 8e4d7793
...@@ -59,7 +59,7 @@ namespace Mall.WebApi.Controllers.User ...@@ -59,7 +59,7 @@ namespace Mall.WebApi.Controllers.User
Moblie = parms.GetStringValue("Moblie"), Moblie = parms.GetStringValue("Moblie"),
SuperiorId = parms.GetInt("SuperiorId"), SuperiorId = parms.GetInt("SuperiorId"),
SmallShopId = parms.GetInt("SmallShopId"), SmallShopId = parms.GetInt("SmallShopId"),
UserPageType =(Common.Enum.Goods.GoodsPageTypeEnum)parms.GetInt("UserPageType",0), UserPageType = (Common.Enum.Goods.GoodsPageTypeEnum)parms.GetInt("UserPageType", 0),
}; };
if (requestParm.TenantId <= 0) if (requestParm.TenantId <= 0)
{ {
...@@ -109,12 +109,16 @@ namespace Mall.WebApi.Controllers.User ...@@ -109,12 +109,16 @@ namespace Mall.WebApi.Controllers.User
demodel.TotalConsumption ??= 0; demodel.TotalConsumption ??= 0;
if (!demodel.UserPageType.HasValue) if (!demodel.UserPageType.HasValue)
{ {
demodel.UserPageType ??= Common.Enum.Goods.GoodsPageTypeEnum.Mall; demodel.UserPageType = Common.Enum.Goods.GoodsPageTypeEnum.Mall;
} }
else if(demodel.UserPageType == Common.Enum.Goods.GoodsPageTypeEnum.All) else
{ {
demodel.UserPageType ??= Common.Enum.Goods.GoodsPageTypeEnum.Mall; if (demodel.UserPageType == Common.Enum.Goods.GoodsPageTypeEnum.All)
{
demodel.UserPageType = Common.Enum.Goods.GoodsPageTypeEnum.Mall;
}
} }
#endregion #endregion
var basicsModel = userModule.GetDistributorBasicsInfo(requestParm.TenantId.ToString(), requestParm.MallBaseId); var basicsModel = userModule.GetDistributorBasicsInfo(requestParm.TenantId.ToString(), requestParm.MallBaseId);
if ((basicsModel?.ReferralsCondition ?? DistrbutorReferralsEnum.SCDJ) == DistrbutorReferralsEnum.SCDJ || (basicsModel?.ReferralsCondition ?? DistrbutorReferralsEnum.SCDJ) == DistrbutorReferralsEnum.SC7SF) if ((basicsModel?.ReferralsCondition ?? DistrbutorReferralsEnum.SCDJ) == DistrbutorReferralsEnum.SCDJ || (basicsModel?.ReferralsCondition ?? DistrbutorReferralsEnum.SCDJ) == DistrbutorReferralsEnum.SC7SF)
...@@ -198,22 +202,22 @@ namespace Mall.WebApi.Controllers.User ...@@ -198,22 +202,22 @@ namespace Mall.WebApi.Controllers.User
SmallShopId = 0, SmallShopId = 0,
UserSmallShopId = demodel.SmallShopId, UserSmallShopId = demodel.SmallShopId,
IsOpenSchool = mmodel.IsOpenSchool, IsOpenSchool = mmodel.IsOpenSchool,
UserPageType = mmodel.IsOpenSchool==1? demodel.UserPageType:Common.Enum.Goods.GoodsPageTypeEnum.All UserPageType = mmodel.IsOpenSchool == 1 ? demodel.UserPageType : Common.Enum.Goods.GoodsPageTypeEnum.All
}; };
UserReidsCache.AppletUserInfoSet(UserModuleCacheKeyConfig.Applet_Login_Info + UserId, appletUserInfo, Config.JwtExpirTime); UserReidsCache.AppletUserInfoSet(UserModuleCacheKeyConfig.Applet_Login_Info + UserId, appletUserInfo, Config.JwtExpirTime);
if (couponResult != null && couponResult.ID > 0) if (couponResult != null && couponResult.ID > 0)
{ {
return ApiResult.CouponSuccess(ResultCode.Success,1, "", couponResult.Name, appletUserInfo); return ApiResult.CouponSuccess(ResultCode.Success, 1, "", couponResult.Name, appletUserInfo);
} }
else else
{ {
return ApiResult.CouponSuccess(ResultCode.Fail, 1, "","", appletUserInfo); return ApiResult.CouponSuccess(ResultCode.Fail, 1, "", "", appletUserInfo);
} }
} }
return ApiResult.CouponFailed(ResultCode.Fail,1, ""); return ApiResult.CouponFailed(ResultCode.Fail, 1, "");
// return ApiResult.Failed("注册失败,请联系管理员"); // return ApiResult.Failed("注册失败,请联系管理员");
} }
else else
...@@ -225,7 +229,8 @@ namespace Mall.WebApi.Controllers.User ...@@ -225,7 +229,8 @@ namespace Mall.WebApi.Controllers.User
return ApiResult.CouponFailed(ResultCode.Fail, 1, ""); return ApiResult.CouponFailed(ResultCode.Fail, 1, "");
// return ApiResult.Failed("未能查询到用户信息"); // return ApiResult.Failed("未能查询到用户信息");
} }
if (umodel.Blacklist == 1) { if (umodel.Blacklist == 1)
{
return ApiResult.Failed("账号已被冻结,请联系运营商"); return ApiResult.Failed("账号已被冻结,请联系运营商");
} }
TokenUserInfo userInfo = new TokenUserInfo { uid = umodel.Id.ToString(), requestFrom = ApiRequestFromEnum.MiniProgram }; TokenUserInfo userInfo = new TokenUserInfo { uid = umodel.Id.ToString(), requestFrom = ApiRequestFromEnum.MiniProgram };
...@@ -249,7 +254,7 @@ namespace Mall.WebApi.Controllers.User ...@@ -249,7 +254,7 @@ namespace Mall.WebApi.Controllers.User
#endregion #endregion
var mmodel = programModule.GetMiniProgramModule(new RB_MiniProgram_Extend() { MallBaseId = umodel.MallBaseId }); var mmodel = programModule.GetMiniProgramModule(new RB_MiniProgram_Extend() { MallBaseId = umodel.MallBaseId });
//2020-08-12 Add By:W //2020-08-12 Add By:W
var smallShopsInfoModle = userModule.GetSmallShopsInfoList(new RB_SmallShops_Info_Extend { TenantId = umodel.TenantId, MallBaseId = umodel.MallBaseId, UserId = umodel.Id }).OrderByDescending(x => x.CreateDate).FirstOrDefault(); var smallShopsInfoModle = userModule.GetSmallShopsInfoList(new RB_SmallShops_Info_Extend { TenantId = umodel.TenantId, MallBaseId = umodel.MallBaseId, UserId = umodel.Id }).OrderByDescending(x => x.CreateDate).FirstOrDefault();
AppletUserInfo appletUserInfo = new AppletUserInfo() AppletUserInfo appletUserInfo = new AppletUserInfo()
{ {
...@@ -265,13 +270,13 @@ namespace Mall.WebApi.Controllers.User ...@@ -265,13 +270,13 @@ namespace Mall.WebApi.Controllers.User
SecretKey = umodel.SecretKey, SecretKey = umodel.SecretKey,
SuperiorId = umodel.SuperiorId ?? 0, SuperiorId = umodel.SuperiorId ?? 0,
Token = token, Token = token,
SmallShopId =(smallShopsInfoModle != null && smallShopsInfoModle.AuditStatus == DistributorAuditStatusEnum.Audited) ? smallShopsInfoModle.Id : 0, SmallShopId = (smallShopsInfoModle != null && smallShopsInfoModle.AuditStatus == DistributorAuditStatusEnum.Audited) ? smallShopsInfoModle.Id : 0,
UserSmallShopId = umodel.SmallShopId, UserSmallShopId = umodel.SmallShopId,
IsOpenSchool = mmodel.IsOpenSchool, IsOpenSchool = mmodel.IsOpenSchool,
UserPageType = mmodel.IsOpenSchool == 1 ? umodel.UserPageType : Common.Enum.Goods.GoodsPageTypeEnum.All UserPageType = mmodel.IsOpenSchool == 1 ? umodel.UserPageType : Common.Enum.Goods.GoodsPageTypeEnum.All
}; };
UserReidsCache.AppletUserInfoSet(UserModuleCacheKeyConfig.Applet_Login_Info + umodel.Id, appletUserInfo, Config.JwtExpirTime); UserReidsCache.AppletUserInfoSet(UserModuleCacheKeyConfig.Applet_Login_Info + umodel.Id, appletUserInfo, Config.JwtExpirTime);
return ApiResult.CouponSuccess(ResultCode.Fail, 1,"", "", appletUserInfo); return ApiResult.CouponSuccess(ResultCode.Fail, 1, "", "", appletUserInfo);
//return ApiResult.Success("", appletUserInfo); //return ApiResult.Success("", appletUserInfo);
} }
} }
......
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