using Edu.Model.Entity.WeChat;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VT.FW.DB.Dapper;

namespace Edu.Repository.WeChat
{
    public class RB_CustomQueryRepository:BaseRepository<RB_CustomQuery>
    {
        /// <summary>
        /// 查询指定用户的自定义内容
        /// </summary>
        /// <param name="uid"></param>
        /// <param name="code"></param>
        /// <returns></returns>
        public List<RB_CustomQuery> GetUserCustomQuery(int uid,string code)
        {
            string sql = $"select Id,Name from RB_CustomQuery where CreateBy=@uid and Code=@code";

            DynamicParameters parameters = new DynamicParameters();
            parameters.Add("uid", uid);
            parameters.Add("code", code);

            return Get<RB_CustomQuery>(sql,parameters).ToList();

        }
    }
}
