/// <summary>
 /// 修改购买订单处理结果
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int UpdateOrderResult(CouponBuyModel model)
 {
     const string sql = @"update coupon_order set result=@result,resultdesc=@resultdesc,modifiedtime=@modifiedtime where innerid=@innerid;";
     try
     {
         Helper.Execute(sql, new
         {
             model.innerid,
             model.result,
             model.resultdesc,
             modifiedtime = DateTime.Now
         });
         return 1;
     }
     catch (Exception ex)
     {
         return 0;
     }
 }
 /// <summary>
 /// 保存购买订单信息
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public int SaveOrder(CouponBuyModel model)
 {
     const string sql = @"INSERT INTO coupon_order
                         (innerid, order_id, order_status, order_total_price, order_create_time, order_express_price, buyer_openid, buyer_nick, receiver_name, receiver_province, receiver_city, receiver_address, receiver_mobile, receiver_phone, product_id, product_name, product_price, product_sku, product_count, product_img, delivery_id, delivery_company, trans_id, result,resultdesc,createdtime)
                         VALUES
                         (@innerid, @order_id, @order_status, @order_total_price, @order_create_time, @order_express_price, @buyer_openid, @buyer_nick, @receiver_name, @receiver_province, @receiver_city,@receiver_address, @receiver_mobile, @receiver_phone, @product_id, @product_name, @product_price, @product_sku, @product_count, @product_img, @delivery_id, @delivery_company, @trans_id, @result,@resultdesc,@createdtime);";
     try
     {
         Helper.Execute(sql, new
         {
             model.innerid,
             model.Order.order_id,
             model.Order.order_status,
             model.Order.order_total_price,
             model.Order.order_create_time,
             model.Order.order_express_price,
             model.Order.buyer_openid,
             model.Order.buyer_nick,
             model.Order.receiver_name,
             model.Order.receiver_province,
             model.Order.receiver_city,
             model.Order.receiver_address,
             model.Order.receiver_mobile,
             model.Order.receiver_phone,
             model.Order.product_id,
             model.Order.product_name,
             model.Order.product_price,
             model.Order.product_sku,
             model.Order.product_count,
             model.Order.product_img,
             model.Order.delivery_id,
             model.Order.delivery_company,
             model.Order.trans_id,
             model.result,
             model.resultdesc,
             createdtime = DateTime.Now
         });
         return 1;
     }
     catch (Exception ex)
     {
         return 0;
     }
 }