Commit 00451709 authored by 黄奎's avatar 黄奎

接口调整

parent 759298d3
This diff is collapsed.
...@@ -80,21 +80,23 @@ namespace Mall.Repository.Education ...@@ -80,21 +80,23 @@ namespace Mall.Repository.Education
{ {
builder.Append($" AND a.{nameof(RB_Education_CouponProduct.CouponId)} in ({DiscountCouponIds})"); builder.Append($" AND a.{nameof(RB_Education_CouponProduct.CouponId)} in ({DiscountCouponIds})");
} }
string sql = ""; string builderStr = builder.ToString();
string sql;
if (IsSelectDel) if (IsSelectDel)
{ {
sql = $"SELECT a.* from {TableName} as a WHERE 1=1 "; sql = $"SELECT a.* from {TableName} as a WHERE 1=1 ";
} }
else { else
sql = $"SELECT a.* from {TableName} as a WHERE a.{nameof(RB_Education_CouponProduct.Status)}=0 {builder.ToString()} "; {
sql = $"SELECT a.* from {TableName} as a WHERE a.{nameof(RB_Education_CouponProduct.Status)}=0 {builderStr} ";
} }
if (query.UseType == Common.Enum.MarketingCenter.UseTypeEnum.Category) if (query.UseType == Common.Enum.MarketingCenter.UseTypeEnum.Category)
{ {
sql = $" SELECT a.*,b.`Name` as Relevance from {TableName} as a LEFT JOIN {PCategoryTableName} as b on a.ProductId=b.Id WHERE a.{nameof(RB_Education_CouponProduct.Status)}=0 {builder.ToString()} "; sql = $" SELECT a.*,b.`Name` as Relevance from {TableName} as a LEFT JOIN {PCategoryTableName} as b on a.ProductId=b.Id WHERE a.{nameof(RB_Education_CouponProduct.Status)}=0 {builderStr} ";
} }
else if (query.UseType == Common.Enum.MarketingCenter.UseTypeEnum.Product) else if (query.UseType == Common.Enum.MarketingCenter.UseTypeEnum.Product)
{ {
sql = $" SELECT a.*,b.`Name` as Relevance from {TableName} as a LEFT JOIN {GoodsTableName} as b on a.ProductId=b.Id WHERE a.{nameof(RB_Education_CouponProduct.Status)}=0 {builder.ToString()} "; sql = $" SELECT a.*,b.`Name` as Relevance from {TableName} as a LEFT JOIN {GoodsTableName} as b on a.ProductId=b.Id WHERE a.{nameof(RB_Education_CouponProduct.Status)}=0 {builderStr} ";
} }
return Get<RB_Education_CouponProduct_Extend>(sql).ToList(); return Get<RB_Education_CouponProduct_Extend>(sql).ToList();
} }
......
...@@ -1649,7 +1649,7 @@ where {where} group by g.Id order by col.Id desc"; ...@@ -1649,7 +1649,7 @@ where {where} group by g.Id order by col.Id desc";
{ {
DynamicParameters parameters = new DynamicParameters(); DynamicParameters parameters = new DynamicParameters();
string where = $" 1=1 and g.{nameof(RB_Goods_Extend.Status)}=0 and g.RetailStore=1"; string where = $" 1=1 and g.{nameof(RB_Goods_Extend.Status)}=0 and g.RetailStore=1";
string sourceWhere = "";
if (dmodel.GoodsClassify == 3) if (dmodel.GoodsClassify == 3)
{//查询非司导商品 {//查询非司导商品
where += $@" and g.GoodsClassify =3"; where += $@" and g.GoodsClassify =3";
...@@ -1694,7 +1694,7 @@ where {where} group by g.Id order by col.Id desc"; ...@@ -1694,7 +1694,7 @@ where {where} group by g.Id order by col.Id desc";
where += $@" and IFNULL(synchro.{nameof(RB_Goods_Extend.Isynchro)},0)=0"; where += $@" and IFNULL(synchro.{nameof(RB_Goods_Extend.Isynchro)},0)=0";
} }
} }
sourceWhere = $@"and TenantId={dmodel.SourceTenantId} and MallBaseId={dmodel.SourceMallBaseId}"; string sourceWhere = $@"and TenantId={dmodel.SourceTenantId} and MallBaseId={dmodel.SourceMallBaseId}";
if (!string.IsNullOrEmpty(dmodel.GoodsIds)) if (!string.IsNullOrEmpty(dmodel.GoodsIds))
{ {
where += $@" and g.{nameof(RB_Goods_Extend.Id)} in({dmodel.GoodsIds})"; where += $@" and g.{nameof(RB_Goods_Extend.Id)} in({dmodel.GoodsIds})";
......
...@@ -760,18 +760,6 @@ WHERE u.TenantId={tenantId} and u.MallBaseId={mallBaseId} and u.SuperiorId ={uid ...@@ -760,18 +760,6 @@ WHERE u.TenantId={tenantId} and u.MallBaseId={mallBaseId} and u.SuperiorId ={uid
return 0; return 0;
} }
/// <summary>
/// 获取七天后自动释放
/// </summary>
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public List<RB_Member_User_Extend> AutoReleaseTheOffline(int tenantId, int mallBaseId)
{
string sql = $@"SELECT * FROM rb_member_user WHERE DownlineCondition=4 and IsDistributor = 0 and SuperiorId >0 AND DATE_ADD(CreateDate,INTERVAL 7 DAY) < '{Common.ConvertHelper.FormatTime(DateTime.Now)}'";
return Get<RB_Member_User_Extend>(sql).ToList();
}
/// <summary> /// <summary>
/// 获取用户上级所有的id /// 获取用户上级所有的id
/// </summary> /// </summary>
......
...@@ -677,10 +677,12 @@ namespace Mall.WebApi.Controllers.Education ...@@ -677,10 +677,12 @@ namespace Mall.WebApi.Controllers.Education
public ApiResult GetEducationTalkList(object requestMsg) public ApiResult GetEducationTalkList(object requestMsg)
{ {
var parms = JsonConvert.DeserializeObject<RequestParm>(requestMsg.ToString()); var parms = JsonConvert.DeserializeObject<RequestParm>(requestMsg.ToString());
Rb_Education_Talk_Extend demodel = new Rb_Education_Talk_Extend(); Rb_Education_Talk_Extend demodel = new Rb_Education_Talk_Extend
demodel.TenantId = parms.TenantId; {
demodel.MallBaseId = parms.MallBaseId; TenantId = parms.TenantId,
demodel.IsOpen = 1; MallBaseId = parms.MallBaseId,
IsOpen = 1
};
List<Rb_Education_Talk_Extend> talkList = dynamicModule.GetEducationTalkList(demodel); List<Rb_Education_Talk_Extend> talkList = dynamicModule.GetEducationTalkList(demodel);
return ApiResult.Success("", talkList.Select(x => new { x.IsOpen, x.Id, x.Content, x.CoverPhoto })); return ApiResult.Success("", talkList.Select(x => new { x.IsOpen, x.Id, x.Content, x.CoverPhoto }));
} }
......
...@@ -33,7 +33,7 @@ namespace Mall.WebApi.Controllers.Education ...@@ -33,7 +33,7 @@ namespace Mall.WebApi.Controllers.Education
public class EducationController : BaseController public class EducationController : BaseController
{ {
private readonly IHttpContextAccessor _accessor; private readonly IHttpContextAccessor _accessor;
private readonly EducationModule educationModule = new EducationModule(); private readonly EducationModule educationModule = AOP.AOPHelper.CreateAOPObject<EducationModule>();
private readonly Module.User.UserModule UserModule = new Module.User.UserModule(); private readonly Module.User.UserModule UserModule = new Module.User.UserModule();
private readonly DynamicModule dynamicModule = new DynamicModule(); private readonly DynamicModule dynamicModule = new DynamicModule();
private readonly ActivityModule activityModule = new ActivityModule(); private readonly ActivityModule activityModule = new ActivityModule();
......
...@@ -23,7 +23,7 @@ namespace Mall.WebApi.Controllers.User ...@@ -23,7 +23,7 @@ namespace Mall.WebApi.Controllers.User
[EnableCors("AllowCors")] [EnableCors("AllowCors")]
public class MemberUserController : BaseController public class MemberUserController : BaseController
{ {
private MemberUserModule MemberUserModule = new MemberUserModule(); private readonly MemberUserModule MemberUserModule = new MemberUserModule();
/// <summary> /// <summary>
/// 根据用户Id更新用户头像和名称 /// 根据用户Id更新用户头像和名称
......
...@@ -59,6 +59,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mall.Module.TradePavilion", ...@@ -59,6 +59,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mall.Module.TradePavilion",
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mall.Module.Miai", "Mall.Module.Miai\Mall.Module.Miai.csproj", "{2EEB81FD-7176-4407-871E-AC41343BC601}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mall.Module.Miai", "Mall.Module.Miai\Mall.Module.Miai.csproj", "{2EEB81FD-7176-4407-871E-AC41343BC601}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{7E74ADDD-09BE-4C5B-8FA4-EE384282D553}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
......
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