using System.Collections.Generic;
using System.Linq;
using System.Text;
using Edu.Common.Enum;
using Edu.Model.Entity.App;
namespace Edu.Repository.App
{
///
/// app首页bannerLabel仓储层
///
public class RB_HomePage_LableRepository : BaseRepository
{
///
/// 获取学生app首页Lable列表
///
///
///
public List GetHomePageLableList(RB_HomePage_Lable query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@" SELECT * FROM RB_HomePage_Lable WHERE 1=1 ");
builder.AppendFormat(" AND {0}={1} ", nameof(RB_HomePage_Lable.Status), (int)DateStateEnum.Normal);
if (query != null)
{
if (query.Group_Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_HomePage_Lable.Group_Id), query.Group_Id);
}
if (query.School_Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_HomePage_Lable.School_Id), query.School_Id);
}
}
return Get(builder.ToString()).ToList();
}
}
}