/// <summary> /// 买家确认收到货,等待支付宝打款给卖家 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void ap_WaitSysPaySeller(object sender, NotifyEventArgs e) { log.Info("买家确认收到货,等待支付宝打款给卖家,订单号为:" + e.Out_Trade_No); CommOrderModel omodel = obll.GetModel(e.Out_Trade_No); if (omodel.PayMethod == PayMethType.支付宝) { if (obll.ChangeOrderStatus(e.Out_Trade_No, OrderStatus.买家确认)) { string remark = e.Trade_Status + " " + e.Refund_Status; lbll.Add(e.Out_Trade_No, remark, OrderStatus.买家确认.ToString(), "alipay"); } } }
/// <summary> /// 置为订单完成,前置条件:物流已到货,且支付成功 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnFinish_Click(object sender, EventArgs e) { CommOrderBll obll = new CommOrderBll(); OrderChangeLogBll lbll = new OrderChangeLogBll(); CommOrderModel order = obll.GetModel(lblOrderId.Text); if (order != null && order.OrderStatus == OrderStatus.物流到货 && order.PayStatus == PayStatus.支付成功) { obll.ChangeOrderStatus(order.OrderId, OrderStatus.交易完成); lbll.Add(order.OrderId, txtActionRemark.Text.Trim(), OrderStatus.交易完成.ToString(), Context.User.Identity.Name); ShowOrderInfo(lblOrderId.Text); } }
/// <summary> /// 置为备货状态,前置条件为:订单为初始创建,如果是货到付款,不需要判断支付状态,其他的需要为已支付状态 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnPrepareGoods_Click(object sender, EventArgs e) { CommOrderBll obll = new CommOrderBll(); OrderChangeLogBll lbll = new OrderChangeLogBll(); CommOrderModel order = obll.GetModel(lblOrderId.Text); if (order != null && order.OrderStatus == OrderStatus.已创建 && (order.PayMethod == PayMethType.货到付款 || order.PayStatus == PayStatus.支付成功)) { obll.ChangeOrderStatus(order.OrderId, OrderStatus.备货中); lbll.Add(order.OrderId, txtActionRemark.Text.Trim(), OrderStatus.备货中.ToString(), Context.User.Identity.Name); ShowOrderInfo(lblOrderId.Text); } }
/// <summary> /// 置为交易失败,前置条件为:货到付款订单,已发货;其他订单,已退款 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnFail_Click(object sender, EventArgs e) { CommOrderBll obll = new CommOrderBll(); OrderChangeLogBll lbll = new OrderChangeLogBll(); CommOrderModel order = obll.GetModel(lblOrderId.Text); if (order != null && ((order.PayMethod == PayMethType.货到付款 && order.OrderStatus == OrderStatus.已发货) || (order.PayMethod != PayMethType.货到付款 && order.PayStatus == PayStatus.退款完成))) { obll.ChangeOrderStatus(order.OrderId, OrderStatus.交易失败); lbll.Add(order.OrderId, txtActionRemark.Text.Trim(), OrderStatus.交易失败.ToString(), Context.User.Identity.Name); ShowOrderInfo(lblOrderId.Text); } }
/// <summary> /// 置为买家签收(买家确认),隐含实现,如果为线上支付,则同时跳转至结算页面,前置条件:订单已发货 /// 如果是货到付款订单,同时设置订单支付状态为已支付 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnCherrys_Click(object sender, EventArgs e) { CommOrderBll obll = new CommOrderBll(); OrderChangeLogBll lbll = new OrderChangeLogBll(); CommOrderModel order = obll.GetModel(lblOrderId.Text); if (order.OrderStatus == OrderStatus.已发货 || order.OrderStatus == OrderStatus.物流到货) { obll.ChangeOrderStatus(order.OrderId, OrderStatus.买家确认); lbll.Add(order.OrderId, txtActionRemark.Text.Trim(), OrderStatus.买家确认.ToString(), Context.User.Identity.Name); if (order.PayMethod == PayMethType.支付宝) { // 转向支付结算页面 } ShowOrderInfo(lblOrderId.Text); } }