Exemplo n.º 1
0
        /// <summary>
        /// 取得配送訂單清單
        /// </summary>
        /// <param name="memberId">會員編號</param>
        /// <returns>配送訂單清單</returns>
        public List <ShippingOrder> GetShippingOrders(int memberId)
        {
            ShippingOrderQueryBuilder builder = new ShippingOrderQueryBuilder();
            string sql = builder.GetShippingOrdersSql();

            return(this.ShippingOrderRepository.Query <ShippingOrder>(sql, new { MemberId = memberId }).ToList());
        }
Exemplo n.º 2
0
        /// <summary>
        /// 新增配送訂單
        /// </summary>
        /// <param name="orderId">訂單編號</param>
        public void InsertShippingOrder(string orderId)
        {
            ShippingOrder model = new ShippingOrder()
            {
                Id        = this.GetShippingOrderSequence(),
                OrderId   = orderId,
                Status    = 1,
                CteatedAt = DateTime.Now
            };

            ShippingOrderQueryBuilder builder = new ShippingOrderQueryBuilder();
            string sql = builder.GetInsertShippingOrderSql();

            this.ShippingOrderRepository.Execute(sql, model);
        }