CCN.Modules.Auction.DataAccess.AuctionDataAccess.GetAuctionTimeList C# (CSharp) Метод

GetAuctionTimeList() публичный Метод

获取拍卖时间列表
public GetAuctionTimeList ( ) : IEnumerable
Результат IEnumerable
        public IEnumerable<AuctionTimeViewModel> GetAuctionTimeList()
        {
            var currentTime = DateTime.Now.Hour;
            //var now = DateTime.Now;
            const string sql =
                @"select innerid, no, type, beginhour, endhour, beginmin, endmin, modifiedtime, createdtime,now() as currenttime from auction_timerange
                         where beginhour<=@currentTime and endhour>@currentTime or (`no`=
                         (select `no`+1 from auction_timerange where beginhour<=@currentTime and endhour>@currentTime)) order by no asc;";
            var list = Helper.Query<AuctionTimeViewModel>(sql, new { currentTime });
            return list;
        }