CCN.Modules.Car.DataAccess.CarDataAccess.UpSeeCount C# (CSharp) Method

UpSeeCount() public method

累计车辆查看次数
public UpSeeCount ( string id, int count = 1 ) : int
id string 车辆id
count int 新增次数
return int
        public int UpSeeCount(string id, int count = 1)
        {
            const string sql = @"update car_share set seecount=seecount+@count where carid=@carid;";
            try
            {
                Helper.Execute(sql, new { carid = id, count = count });
            }
            catch (Exception ex)
            {
                return 0;
            }
            return 1;
        }
CarDataAccess