Commit a6fc99a8 authored by 吴春's avatar 吴春

提交代码

parent f2ce1c42
...@@ -110,5 +110,11 @@ namespace Mall.Common ...@@ -110,5 +110,11 @@ namespace Mall.Common
/// 类型 /// 类型
/// </summary> /// </summary>
public Common.Enum.Goods.GoodsPageTypeEnum? UserPageType { get; set; } 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 ...@@ -85,7 +85,17 @@ namespace Mall.Repository.Product
{ {
where += $@" and g.{nameof(RB_Goods_Extend.SupplierId)}={dmodel.SupplierId}"; 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"; string orderBy = " g.CreateDate desc";
if (dmodel.OrderBy == 1) if (dmodel.OrderBy == 1)
{ {
......
...@@ -106,6 +106,14 @@ namespace Mall.WebApi.Controllers.User ...@@ -106,6 +106,14 @@ namespace Mall.WebApi.Controllers.User
demodel.ContactWay ??= ""; demodel.ContactWay ??= "";
demodel.Remark ??= ""; demodel.Remark ??= "";
demodel.TotalConsumption ??= 0; 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 #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)
...@@ -187,8 +195,9 @@ namespace Mall.WebApi.Controllers.User ...@@ -187,8 +195,9 @@ namespace Mall.WebApi.Controllers.User
SuperiorId = demodel.SuperiorId ?? 0, SuperiorId = demodel.SuperiorId ?? 0,
Token = token, Token = token,
SmallShopId = 0, SmallShopId = 0,
UserSmallShopId= demodel.SmallShopId, UserSmallShopId = demodel.SmallShopId,
UserPageType= demodel.UserPageType IsOpenSchool = mmodel.IsOpenSchool,
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)
...@@ -257,7 +266,8 @@ namespace Mall.WebApi.Controllers.User ...@@ -257,7 +266,8 @@ namespace Mall.WebApi.Controllers.User
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,
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); 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);
......
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