/// <summary> /// 24小时内有没有产生交易的订单 /// </summary> /// <param name="userId"></param> /// <returns></returns> public bool CheckOrderCountByUserId(int userId) { //获取最近的一笔 未取消的售卖订单 OrderInfo order = new OrderInfo(); order = _orderDal.GetLastOrder(userId); if (order != null && order.CreateTime.AddDays(1) >= DateTime.Now) { return(true); } return(false); }