Exemplo n.º 1
0
        /// <summary>
        /// 获取订单状态的数量
        /// </summary>
        /// <param name="userId">当前账号Id</param>
        /// <param name="status">要查询的订单状态</param>
        /// <returns></returns>
        public int GetStatusCount(Guid userId, G_OrderStatusEnum status)
        {
            ISpecification <G_Order> spec = Specification <G_Order> .Eval(item => true);

            spec = new AndSpecification <G_Order>(spec,
                                                  Specification <G_Order> .Eval(item =>
                                                                                item.CreatedBy == userId));
            spec = new AndSpecification <G_Order>(spec,
                                                  Specification <G_Order> .Eval(item =>
                                                                                item.Status == status));
            return(this._IG_OrderRepository.GetStatusCount(spec));
        }
Exemplo n.º 2
0
        private void CreateRecord(G_OrderDTO order, G_OrderStatusEnum status, string remark = "")
        {
            var record = new G_OrderRecordDTO();

            record.OrderId     = order.Id;
            record.CreatedBy   = record.ModifiedBy = this.User.Id;
            record.CreatedDate = record.ModifiedDate = DateTime.Now;
            record.Remark      = remark;
            record.Status      = status;
            record.UserCode    = this.User.G_UserDetail.Code;
            record.UserId      = this.User.Id;
            this._IG_OrderRecordService.Create(record);
        }
Exemplo n.º 3
0
        private void CreateRecord(Guid orderId, string remark, G_OrderStatusEnum status)
        {
            var orderRecord = new G_OrderRecordDTO
            {
                CreatedBy  = this.User.Id,
                ModifiedBy = this.User.Id,
                Status     = status,
                OrderId    = orderId,
                Remark     = remark,
                UserId     = this.User.Id,
            };

            this._IG_OrderRecordService.Create(orderRecord);
        }