using Edu.Common.Enum; using Edu.Model.Entity.WeChat; using Edu.Model.ViewModel.WeChat; using System; using System.Collections.Generic; using System.Linq; using System.Text; using VT.FW.DB; using VT.FW.DB.Dapper; namespace Edu.Repository.WeChat { /// /// 企业微信客户操作仓储层 /// [Serializable] [DB(ConnectionName = "DefaultConnection")] public class RB_WeChat_CustomerConfigRepository : BaseRepository { /// /// 获取列表 /// /// /// public List GetList(RB_WeChat_CustomerConfig_ViewModel demodel) { DynamicParameters parameters = new DynamicParameters(); string where = $@" 1=1 and r.{nameof(RB_WeChat_CustomerConfig_ViewModel.Status)} =0"; if (demodel.Group_Id > 0) { where += $@" and r.{nameof(RB_WeChat_CustomerConfig_ViewModel.Group_Id)} ={demodel.Group_Id}"; } string sql = $@" SELECT * From RB_WeChat_CustomerConfig r WHERE {where} ORDER BY r.Id DESC "; return Get(sql, parameters).ToList(); } } }