public int CheckPraise(string ip, string companyid)
{
const string sql = @"select count(1) from settled_praiselog where ip=@ip and companyid=@companyid and date(createdtime)=@shortdate;";
try
{
return Helper.ExecuteScalar<int>(sql, new { ip, companyid, shortdate = DateTime.Now.ToShortDateString() });
}
catch (Exception ex)
{
LoggerFactories.CreateLogger().Write("企业评论失败:" + ex.Message, TraceEventType.Information);
return 0;
}
}