Commit d2dec996 authored by 吴春's avatar 吴春

1

parent 13122f25
...@@ -40,5 +40,26 @@ namespace Mall.Model.Extend.TradePavilion ...@@ -40,5 +40,26 @@ namespace Mall.Model.Extend.TradePavilion
/// 物业服务 /// 物业服务
/// </summary> /// </summary>
public List<string> PropertyDemandList { get; set; } public List<string> PropertyDemandList { get; set; }
/// <summary>
/// 店铺数
/// </summary>
public int MaxShopNum { get; set; }
/// <summary>
/// 店铺数
/// </summary>
public int MixShopNum { get; set; }
/// <summary>
/// 店铺数
/// </summary>
public int MaxAreaRequirement { get; set; }
/// <summary>
/// 店铺数
/// </summary>
public int MixAreaRequirement { get; set; }
} }
} }
...@@ -41,7 +41,7 @@ WHERE 1=1 "); ...@@ -41,7 +41,7 @@ WHERE 1=1 ");
{ {
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Brand_Enterprise_Extend.MallBaseId), query.MallBaseId); builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Brand_Enterprise_Extend.MallBaseId), query.MallBaseId);
} }
if (query.CategoryId > 0) if (query.CategoryId > 0)
{ {
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Brand_Enterprise_Extend.CategoryId), query.CategoryId); builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Brand_Enterprise_Extend.CategoryId), query.CategoryId);
...@@ -68,7 +68,7 @@ WHERE 1=1 "); ...@@ -68,7 +68,7 @@ WHERE 1=1 ");
/// <param name="rowsCount"></param> /// <param name="rowsCount"></param>
/// <param name="query"></param> /// <param name="query"></param>
/// <returns></returns> /// <returns></returns>
public List<RB_Brand_Enterprise_Extend> GetBrandEnterpriseBriefRepository(RB_Brand_Enterprise_Extend query,string startTime="",string endTime = "") public List<RB_Brand_Enterprise_Extend> GetBrandEnterpriseBriefRepository(RB_Brand_Enterprise_Extend query, string startTime = "", string endTime = "")
{ {
DynamicParameters parameters = new DynamicParameters(); DynamicParameters parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
...@@ -83,7 +83,7 @@ WHERE 1=1 "); ...@@ -83,7 +83,7 @@ WHERE 1=1 ");
{ {
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Brand_Enterprise_Extend.MallBaseId), query.MallBaseId); builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Brand_Enterprise_Extend.MallBaseId), query.MallBaseId);
} }
if (query.CategoryId > 0) if (query.CategoryId > 0)
{ {
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Brand_Enterprise_Extend.CategoryId), query.CategoryId); builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Brand_Enterprise_Extend.CategoryId), query.CategoryId);
...@@ -97,7 +97,7 @@ WHERE 1=1 "); ...@@ -97,7 +97,7 @@ WHERE 1=1 ");
builder.AppendFormat(" AND A.{0} LIKE @BrandName ", nameof(RB_Brand_Enterprise_Extend.BrandName)); builder.AppendFormat(" AND A.{0} LIKE @BrandName ", nameof(RB_Brand_Enterprise_Extend.BrandName));
parameters.Add("@BrandName", "%" + query.BrandName + "%"); parameters.Add("@BrandName", "%" + query.BrandName + "%");
} }
} }
if (!string.IsNullOrWhiteSpace(startTime)) if (!string.IsNullOrWhiteSpace(startTime))
{ {
...@@ -135,7 +135,7 @@ WHERE 1=1 ...@@ -135,7 +135,7 @@ WHERE 1=1
{ {
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Brand_Enterprise_Extend.MallBaseId), query.MallBaseId); builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Brand_Enterprise_Extend.MallBaseId), query.MallBaseId);
} }
if (query.CategoryId > 0) if (query.CategoryId > 0)
{ {
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Brand_Enterprise_Extend.CategoryId), query.CategoryId); builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Brand_Enterprise_Extend.CategoryId), query.CategoryId);
...@@ -186,6 +186,27 @@ WHERE 1=1 ...@@ -186,6 +186,27 @@ WHERE 1=1
{ {
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Brand_Enterprise_Extend.CategoryId), query.CategoryId); builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Brand_Enterprise_Extend.CategoryId), query.CategoryId);
} }
if (query.MixShopNum > 0)
{
builder.AppendFormat(" AND A.{0}>={1} ", nameof(RB_Brand_Enterprise_Extend.ShopNum), query.MixShopNum);
}
if (query.MaxShopNum > 0)
{
builder.AppendFormat(" AND A.{0} <={1} ", nameof(RB_Brand_Enterprise_Extend.ShopNum), query.MaxShopNum);
}
if (query.MixAreaRequirement > 0&& query.MaxAreaRequirement > 0)
{
// AND((AreaRequirement>=500 AND AreaRequirement<=2000) OR (AreaRequirement<= 500 AND EndAreaRequirement>=2000) OR (EndAreaRequirement>=500 AND EndAreaRequirement<=2000)) ;
builder.AppendFormat(" AND((A.{0}>={1} AND A.{0}<={2}) OR (A.{0}<= {1} AND A.{3}>={2}) OR (A.{3}>={1} AND A.{3}<={2})) ", nameof(RB_Brand_Enterprise_Extend.AreaRequirement), query.MixAreaRequirement, query.MaxAreaRequirement,nameof(RB_Brand_Enterprise_Extend.EndAreaRequirement));
}
else if (query.MixAreaRequirement > 0)
{
builder.AppendFormat(" AND A.{0} >={1} ", nameof(RB_Brand_Enterprise_Extend.AreaRequirement), query.MixAreaRequirement);
}
else if (query.MaxAreaRequirement > 0)
{
builder.AppendFormat(" AND A.{0} <={1} ", nameof(RB_Brand_Enterprise_Extend.EndAreaRequirement), query.MaxAreaRequirement);
}
if (query.IsInChengdu > -1) if (query.IsInChengdu > -1)
{ {
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Brand_Enterprise_Extend.IsInChengdu), query.IsInChengdu); builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Brand_Enterprise_Extend.IsInChengdu), query.IsInChengdu);
......
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