public CustomerEntity getUserInfo(int userId) { string sql = @"SELECT * FROM Customer AS c WHERE c.ID=@userId"; var parameters = DbSFO2ORead.CreateParameterCollection(); parameters.Append("@userId", userId); return(DbSFO2OMain.ExecuteSqlFirst <CustomerEntity>(sql, parameters)); }
/// <summary> /// 获得我的酒豆 /// </summary> /// <param name="orderCode">订单号</param> /// <returns></returns> public MyHL getMyHL(int userId) { string sql = @"SELECT hls.HuoLi as countHL,hls.LockedHuoLi as freezeHL,hls.HuoLiCurrent as usableHL FROM dbo.HuoLiTotal AS hls WHERE hls.UserId=@userId"; var parameters = DbSFO2ORead.CreateParameterCollection(); parameters.Append("@userId", userId); return(DbSFO2OMain.ExecuteSqlFirst <MyHL>(sql, parameters)); }