/// <summary> /// 订单详情--退款 /// </summary> private bool RefundOrderDetail(XJ_ProductItem item) { //判断门票是否可以退票和过了退票有效期 var result = _orderDetailService.XJ_CheckOrderDetailIsCanncel(item.OrderDetailId); if (result == null) { return(false); } try { _orderService.BeginTran(); //添加退款记录 var tbl_RefundDetail = _refundDetailService.Add(result); //更新订单详情的状态:为已退款 _orderDetailService.UpdateOrderDetailForRefund(result); //更新票的日售票数 _ticketService.UpdateTicketBySellCount(result); //退激活票时,同步删除验票表存在的数据 _ticketTestingService.Delete(result.OrderNo); //添加日志 _saleLogService.Add(tbl_RefundDetail); //提交事物 _orderService.CommitTran(); return(true); } catch (Exception ex) { _orderService.RollbackTran(); return(false); } }
/// <summary> /// 渠道订单下发结果通知--OTA订单 /// </summary> /// <param name="item"></param> private void UpdateIssuedLineForOTA(XJ_ProductItem item) { string timeStamp = DateTime.Now.GetTimeStamp(); var sign = Md5HashHelper.HashPassword(_merCode + _key + timeStamp); var update = _orderIssuedsSoapClient.UpdateIssuedLine(_merCode, item.OrderNo, item.CodeStr, sign, timeStamp, "", "", 4); var resultDataUpdate = JsonHelper.JsonToObject <ResultData>(update); if (resultDataUpdate.IsTrue && resultDataUpdate.ResultCode == "200") { //成功 } Console.Write("\n渠道订单下发结果通知--OTA订单:" + (resultDataUpdate.IsTrue == true ? "成功" : "失败")); }
/// <summary> /// 修改订单详情 /// </summary> /// <param name="item"></param> /// <returns></returns> private bool UpdateOrderDetail(XJ_ProductItem item) { var result = _orderDetailService.XJ_CheckOrderDetailIsUpdate(item.OrderDetailId); if (result == null) { return(false); } try { //_orderService.UpdateOrder(tbl_Order, orderInfo); _orderDetailService.XJ_UpdateOrderDetail(result, item); return(true); } catch (Exception ex) { return(false); } }
/// <summary> /// 修改--小径平台 /// </summary> /// <param name="orderDeail"></param> /// <param name="item"></param> public void XJ_UpdateOrderDetail(Tbl_OrderDetail orderDeail, XJ_ProductItem item) { orderDeail.ValidityDateStart = item.StartDate; orderDeail.ValidityDateEnd = item.EndDate; _orderDetailRepository.Update(orderDeail); }