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_PeriodPermissionRepository : BaseRepository
{
///
/// 获取列表
///
///
///
public List GetList(RB_OKR_PeriodPermission demodel,string CreateByIds ="")
{
string where = $@" 1=1";
if (demodel.Group_Id > 0)
{
where += $@" and {nameof(RB_OKR_PeriodPermission.Group_Id)} ={demodel.Group_Id}";
}
if (demodel.PeriodId > 0)
{
where += $@" and {nameof(RB_OKR_PeriodPermission.PeriodId)} ={demodel.PeriodId}";
}
if (demodel.CreateBy > 0)
{
where += $@" and {nameof(RB_OKR_PeriodPermission.CreateBy)} ={demodel.CreateBy}";
}
if (!string.IsNullOrEmpty(CreateByIds))
{
where += $@" and {nameof(RB_OKR_PeriodPermission.CreateBy)} in({CreateByIds})";
}
string sql = $@" select * from RB_OKR_PeriodPermission where {where} order by Id desc";
return Get(sql).ToList();
}
}
}