CCN.Modules.Customer.DataAccess.CustomerDA.GetCustLaudatorByOpenid C# (CSharp) Method

GetCustLaudatorByOpenid() public method

获取点赞人信息 by openid
public GetCustLaudatorByOpenid ( string openid, string tocustid ) : CustLaudator
openid string 点赞者的openid
tocustid string 被点赞者的会员id
return CCN.Modules.Customer.BusinessEntity.CustLaudator
        public CustLaudator GetCustLaudatorByOpenid(string openid, string tocustid)
        {
            const string sql = "select a.*,(select count(1) from cust_laudator_relation where laudatorid=a.innerid and tocustid=@tocustid) as ispraise from cust_laudator as a where openid=@openid;";

            try
            {
                var custModel = Helper.Query<CustLaudator>(sql, new { openid, tocustid }).FirstOrDefault();
                return custModel;

            }
            catch (Exception ex)
            {
                return null;
            }
        }