using Edu.Common.Enum; using Edu.Model.Entity.User; using Edu.Model.ViewModel.User; using System.Collections.Generic; using System.Linq; using System.Text; using VT.FW.DB.Dapper; namespace Edu.Repository.User { /// /// 公告基础仓储层 /// public class RB_Notice_BaseRepository : BaseRepository { public List GetList(RB_Notice_Base_ViewModel demodel) { string where = $@" 1=1 and Status=0 "; if (demodel.Group_Id > 0) { where += $@" and {nameof(RB_Notice_Base.Group_Id)} ={demodel.Group_Id}"; } if (demodel.School_Id > 0) { where += $@" and {nameof(RB_Notice_Base.School_Id)} ={demodel.School_Id}"; } string sql = $@" select * from RB_Notice_Base where {where}"; return Get(sql).ToList(); } } }