using Edu.Model.Entity.OKR; using Edu.Model.ViewModel.OKR; using System.Collections.Generic; using System.Linq; namespace Edu.Repository.OKR { /// /// OKR关注仓储层 /// public class RB_OKR_AttentionRepository : BaseRepository { /// /// 获取列表 /// /// /// public List GetList(RB_OKR_Attention_ViewModel demodel) { string where = $@" 1=1 and Status =0"; if (demodel.Group_Id > 0) { where += $@" and {nameof(RB_OKR_Attention_ViewModel.Group_Id)} ={demodel.Group_Id}"; } if (demodel.AccountId > 0) { where += $@" and {nameof(RB_OKR_Attention_ViewModel.AccountId)} ={demodel.AccountId}"; } if (demodel.AttentionId > 0) { where += $@" and {nameof(RB_OKR_Attention_ViewModel.AttentionId)} ={demodel.AttentionId}"; } string sql = $@" select * from RB_OKR_Attention where {where} order by Id desc"; return Get(sql).ToList(); } } }