Commit 00451709 authored by 黄奎's avatar 黄奎

接口调整

parent 759298d3
This diff is collapsed.
......@@ -80,21 +80,23 @@ namespace Mall.Repository.Education
{
builder.Append($" AND a.{nameof(RB_Education_CouponProduct.CouponId)} in ({DiscountCouponIds})");
}
string sql = "";
string builderStr = builder.ToString();
string sql;
if (IsSelectDel)
{
sql = $"SELECT a.* from {TableName} as a WHERE 1=1 ";
}
else {
sql = $"SELECT a.* from {TableName} as a WHERE a.{nameof(RB_Education_CouponProduct.Status)}=0 {builder.ToString()} ";
else
{
sql = $"SELECT a.* from {TableName} as a WHERE a.{nameof(RB_Education_CouponProduct.Status)}=0 {builderStr} ";
}
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)
{
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();
}
......
......@@ -1649,7 +1649,7 @@ where {where} group by g.Id order by col.Id desc";
{
DynamicParameters parameters = new DynamicParameters();
string where = $" 1=1 and g.{nameof(RB_Goods_Extend.Status)}=0 and g.RetailStore=1";
string sourceWhere = "";
if (dmodel.GoodsClassify == 3)
{//查询非司导商品
where += $@" and g.GoodsClassify =3";
......@@ -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";
}
}
sourceWhere = $@"and TenantId={dmodel.SourceTenantId} and MallBaseId={dmodel.SourceMallBaseId}";
string sourceWhere = $@"and TenantId={dmodel.SourceTenantId} and MallBaseId={dmodel.SourceMallBaseId}";
if (!string.IsNullOrEmpty(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
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>
/// 获取用户上级所有的id
/// </summary>
......
......@@ -677,10 +677,12 @@ namespace Mall.WebApi.Controllers.Education
public ApiResult GetEducationTalkList(object requestMsg)
{
var parms = JsonConvert.DeserializeObject<RequestParm>(requestMsg.ToString());
Rb_Education_Talk_Extend demodel = new Rb_Education_Talk_Extend();
demodel.TenantId = parms.TenantId;
demodel.MallBaseId = parms.MallBaseId;
demodel.IsOpen = 1;
Rb_Education_Talk_Extend demodel = new Rb_Education_Talk_Extend
{
TenantId = parms.TenantId,
MallBaseId = parms.MallBaseId,
IsOpen = 1
};
List<Rb_Education_Talk_Extend> talkList = dynamicModule.GetEducationTalkList(demodel);
return ApiResult.Success("", talkList.Select(x => new { x.IsOpen, x.Id, x.Content, x.CoverPhoto }));
}
......
......@@ -33,7 +33,7 @@ namespace Mall.WebApi.Controllers.Education
public class EducationController : BaseController
{
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 DynamicModule dynamicModule = new DynamicModule();
private readonly ActivityModule activityModule = new ActivityModule();
......
......@@ -23,7 +23,7 @@ namespace Mall.WebApi.Controllers.User
[EnableCors("AllowCors")]
public class MemberUserController : BaseController
{
private MemberUserModule MemberUserModule = new MemberUserModule();
private readonly MemberUserModule MemberUserModule = new MemberUserModule();
/// <summary>
/// 根据用户Id更新用户头像和名称
......
......@@ -59,6 +59,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mall.Module.TradePavilion",
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mall.Module.Miai", "Mall.Module.Miai\Mall.Module.Miai.csproj", "{2EEB81FD-7176-4407-871E-AC41343BC601}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{7E74ADDD-09BE-4C5B-8FA4-EE384282D553}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
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