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

UpdateCustTotalCount() public method

更新会员的刷新次数
public UpdateCustTotalCount ( string custid, int type, int count, int oper = 1 ) : int
custid string
type int
count int
oper int 1+ 2-
return int
        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;
        }