using System;
using System.Collections.Generic;
using System.Text;
using Mall.Model.Entity.Education;

namespace Mall.Repository.Education
{
   public class Rb_Education_DynamicMessageRepository:BaseRepository<Rb_Education_DynamicMessage>
    {
        /// <summary>
        /// 获取消息未读数
        /// </summary>
        /// <param name="empId">员工id</param>
        /// <returns></returns>
        public int GetDynamicMessageCount(Rb_Education_DynamicMessage model)
        {
            string sql = $@"SELECT COUNT(*) from rb_education_dynamicmessage m where m.UserId ={model.UserId} and m.TenantId ={model.TenantId} and m.MallBaseId ={model.MallBaseId}";
            return Convert.ToInt32(ExecuteScalar(sql));
        }
    }
}
