public int UpdateCustTotalCount(string custid, int type, int count, int oper = 1)
{
var sql = "";
var o = oper == 1 ? "+" : "-";
//刷新
if (type == 1)
{
sql = $"update cust_total_info set refreshnum=refreshnum{o}@count where custid=@custid;";
}
//置顶
else if (type == 2)
{
sql = $"update cust_total_info set topnum=topnum{o}@count where custid=@custid;";
}
//积分
else if (type == 3)
{
sql = $"update cust_total_info set currpoint=currpoint{o}@count where custid=@custid;";
}
var result = Helper.Execute(sql, new { count, custid });
return result;
}