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_UpdateNotificationRepository : BaseRepository { /// /// 获取列表 /// /// /// public List GetList(RB_OKR_UpdateNotification_ViewModel demodel) { string where = $@" 1=1 "; if (demodel.Group_Id > 0) { where += $@" and {nameof(RB_OKR_UpdateNotification_ViewModel.Group_Id)} ={demodel.Group_Id}"; } if (demodel.ReceiveId > 0) { where += $@" and {nameof(RB_OKR_UpdateNotification_ViewModel.ReceiveId)} ={demodel.ReceiveId}"; } if (!string.IsNullOrEmpty(demodel.ReceiveIds)) { where += $@" and {nameof(RB_OKR_UpdateNotification_ViewModel.ReceiveId)} in({demodel.ReceiveIds})"; } if (demodel.UpdateBy > 0) { where += $@" and {nameof(RB_OKR_UpdateNotification_ViewModel.UpdateBy)} ={demodel.UpdateBy}"; } if (!string.IsNullOrEmpty(demodel.UpdateByIds)) { where += $@" and {nameof(RB_OKR_UpdateNotification_ViewModel.UpdateBy)} in({demodel.UpdateByIds})"; } if (demodel.State > 0) { where += $@" and {nameof(RB_OKR_UpdateNotification_ViewModel.State)} ={demodel.State}"; } string sql = $@" select * from RB_OKR_UpdateNotification where {where} order by Id desc"; return Get(sql).ToList(); } } }