Commit 892fc30b authored by 黄奎's avatar 黄奎

页面修改

parent 114d38cd
......@@ -63,5 +63,10 @@ namespace Mall.Model.Extend.MarketingCenter
return imgList;
}
}
/// <summary>
/// 商品名称
/// </summary>
public string GoodsName { get; set; }
}
}
\ No newline at end of file
......@@ -24,39 +24,39 @@ namespace Mall.Repository.MarketingCenter
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT *
FROM rb_share_friend
WHERE 1=1 AND Status=0
SELECT A.*,B.Name AS GoodsName
FROM rb_share_friend AS A LEFT JOIN rb_goods AS B ON A.GoodsId=B.Id
WHERE 1=1 AND A.Status=0
");
if (query != null)
{
if (query.TenantId > 0)
{
builder.Append($" AND {nameof(RB_Share_Friend_Extend.TenantId)}={query.TenantId}");
builder.Append($" AND A.{nameof(RB_Share_Friend_Extend.TenantId)}={query.TenantId}");
}
if (query.TenantId > 0)
{
builder.Append($" AND {nameof(RB_Share_Friend_Extend.MallBaseId)}={query.MallBaseId}");
builder.Append($" AND A.{nameof(RB_Share_Friend_Extend.MallBaseId)}={query.MallBaseId}");
}
if (query.CateId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Share_Friend_Extend.CateId),query.CateId);
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Share_Friend_Extend.CateId),query.CateId);
}
if (!string.IsNullOrWhiteSpace(query.CateIds))
{
builder.AppendFormat(" AND {0} IN({1}) ", nameof(RB_Share_Friend_Extend.CateId), query.CateIds);
builder.AppendFormat(" AND A.{0} IN({1}) ", nameof(RB_Share_Friend_Extend.CateId), query.CateIds);
}
if (!string.IsNullOrWhiteSpace(query.KeyWords))
{
builder.AppendFormat(" AND {0} LIKE '%{1}%' ", nameof(RB_Share_Friend_Extend.MaterialInfo), query.KeyWords);
builder.AppendFormat(" AND A.{0} LIKE '%{1}%' ", nameof(RB_Share_Friend_Extend.MaterialInfo), query.KeyWords);
}
if (!string.IsNullOrWhiteSpace(query.QStartDate))
{
builder.AppendFormat(" AND {0}>='{1}' ", nameof(RB_Share_Friend_Extend.CreateDate), Convert.ToDateTime(query.QStartDate).ToString("yyyy-MM-dd"));
builder.AppendFormat(" AND A.{0}>='{1}' ", nameof(RB_Share_Friend_Extend.CreateDate), Convert.ToDateTime(query.QStartDate).ToString("yyyy-MM-dd"));
}
if (!string.IsNullOrWhiteSpace(query.QEndDate))
{
builder.AppendFormat(" AND {0}<='{1} 23:59:59' ", nameof(RB_Share_Friend_Extend.CreateDate), Convert.ToDateTime(query.QEndDate).ToString("yyyy-MM-dd"));
builder.AppendFormat(" AND A.{0}<='{1} 23:59:59' ", nameof(RB_Share_Friend_Extend.CreateDate), Convert.ToDateTime(query.QEndDate).ToString("yyyy-MM-dd"));
}
}
return GetPage<RB_Share_Friend_Extend>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList();
......
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