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;
}
}