Commit a6fc99a8 authored by 吴春's avatar 吴春

提交代码

parent f2ce1c42
......@@ -110,5 +110,11 @@ namespace Mall.Common
/// 类型
/// </summary>
public Common.Enum.Goods.GoodsPageTypeEnum? UserPageType { get; set; }
/// <summary>
/// 是否开启校园版(1-开启)
/// </summary>
public int IsOpenSchool { get; set; }
}
}
\ No newline at end of file
......@@ -85,7 +85,17 @@ namespace Mall.Repository.Product
{
where += $@" and g.{nameof(RB_Goods_Extend.SupplierId)}={dmodel.SupplierId}";
}
if (dmodel.GoodsPageType.HasValue)
{
if (dmodel.GoodsPageType == Common.Enum.Goods.GoodsPageTypeEnum.Mall)
{
where += $@" and g.{nameof(RB_Goods_Extend.GoodsPageType)} in(0,1)";
}
else if (dmodel.GoodsPageType == Common.Enum.Goods.GoodsPageTypeEnum.School)
{
where += $@" and g.{nameof(RB_Goods_Extend.GoodsPageType)} in(0,2)";
}
}
string orderBy = " g.CreateDate desc";
if (dmodel.OrderBy == 1)
{
......
......@@ -106,6 +106,14 @@ namespace Mall.WebApi.Controllers.User
demodel.ContactWay ??= "";
demodel.Remark ??= "";
demodel.TotalConsumption ??= 0;
if (!demodel.UserPageType.HasValue)
{
demodel.UserPageType ??= Common.Enum.Goods.GoodsPageTypeEnum.Mall;
}
else if(demodel.UserPageType == Common.Enum.Goods.GoodsPageTypeEnum.All)
{
demodel.UserPageType ??= Common.Enum.Goods.GoodsPageTypeEnum.Mall;
}
#endregion
var basicsModel = userModule.GetDistributorBasicsInfo(requestParm.TenantId.ToString(), requestParm.MallBaseId);
if ((basicsModel?.ReferralsCondition ?? DistrbutorReferralsEnum.SCDJ) == DistrbutorReferralsEnum.SCDJ || (basicsModel?.ReferralsCondition ?? DistrbutorReferralsEnum.SCDJ) == DistrbutorReferralsEnum.SC7SF)
......@@ -187,8 +195,9 @@ namespace Mall.WebApi.Controllers.User
SuperiorId = demodel.SuperiorId ?? 0,
Token = token,
SmallShopId = 0,
UserSmallShopId= demodel.SmallShopId,
UserPageType= demodel.UserPageType
UserSmallShopId = demodel.SmallShopId,
IsOpenSchool = mmodel.IsOpenSchool,
UserPageType = mmodel.IsOpenSchool==1? demodel.UserPageType:Common.Enum.Goods.GoodsPageTypeEnum.All
};
UserReidsCache.AppletUserInfoSet(UserModuleCacheKeyConfig.Applet_Login_Info + UserId, appletUserInfo, Config.JwtExpirTime);
if (couponResult != null && couponResult.ID > 0)
......@@ -257,7 +266,8 @@ namespace Mall.WebApi.Controllers.User
Token = token,
SmallShopId =(smallShopsInfoModle != null && smallShopsInfoModle.AuditStatus == DistributorAuditStatusEnum.Audited) ? smallShopsInfoModle.Id : 0,
UserSmallShopId = umodel.SmallShopId,
UserPageType = demodel.UserPageType
IsOpenSchool = mmodel.IsOpenSchool,
UserPageType = mmodel.IsOpenSchool == 1 ? demodel.UserPageType : Common.Enum.Goods.GoodsPageTypeEnum.All
};
UserReidsCache.AppletUserInfoSet(UserModuleCacheKeyConfig.Applet_Login_Info + umodel.Id, appletUserInfo, Config.JwtExpirTime);
return ApiResult.CouponSuccess(ResultCode.Fail, 1,"", "", 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