using Edu.Common.Enum; using Edu.Model.Entity.OKR; using Edu.Model.ViewModel.OKR; using System.Collections.Generic; using System.Linq; using System.Text; using VT.FW.DB.Dapper; namespace Edu.Repository.OKR { /// /// OKR提醒仓储层 /// public class RB_OKR_RemindRepository : BaseRepository { /// /// 获取分页列表 /// /// /// /// /// /// public List GetPageList(int pageIndex, int pageSize, out long rowsCount, RB_OKR_Remind_ViewModel demodel) { string where = $@" 1=1"; if (demodel.Group_Id > 0) { where += $@" and {nameof(RB_OKR_Remind_ViewModel.Group_Id)} ={demodel.Group_Id}"; } if (demodel.Type > 0) { where += $@" and {nameof(RB_OKR_Remind_ViewModel.Type)} ={demodel.Type}"; } string sql = $@" select * from RB_OKR_Remind where {where} order by Id desc"; return GetPage(pageIndex, pageSize, out rowsCount, sql).ToList(); } /// /// 获取列表 /// /// /// public List GetList(RB_OKR_Remind_ViewModel demodel) { string where = $@" 1=1"; if (demodel.Group_Id > 0) { where += $@" and {nameof(RB_OKR_Remind_ViewModel.Group_Id)} ={demodel.Group_Id}"; } if (demodel.Type > 0) { where += $@" and {nameof(RB_OKR_Remind_ViewModel.Type)} ={demodel.Type}"; } if (demodel.Enable > 0) { where += $@" and {nameof(RB_OKR_Remind_ViewModel.Enable)} ={demodel.Enable}"; } string sql = $@" select * from RB_OKR_Remind where {where} order by Id desc"; return Get(sql).ToList(); } } }