//[Authorize(AuthenticationSchemes = "jwt")] public APIResult GetOrderStatus([FromBody] GetGetOrderStatusModel input) { var memberTradeForRechanges = _financedb.MemberTradeForRechanges.FirstOrDefault(m => m.ConglomerationOrderId.Equals(input.OrderId) && (m.Status == MemberTradeForRechangeStatus.成功)); if (memberTradeForRechanges != null) { return(Success()); } return(Error("未支付")); }
public APIResult ApplicationDrawback([FromBody] GetGetOrderStatusModel input) { var conglomerationOrder = db.ConglomerationOrder.Find(input.OrderId); if (conglomerationOrder == null) { return(Error("订单不存在")); } if (conglomerationOrder.Status != ShopOrderStatus.已完成) { return(Error("订单未完成")); } conglomerationOrder.Status = ShopOrderStatus.退款审批; db.SaveChanges(); return(Success("申请成功")); }
public APIResult GetOrderDetails([FromBody] GetGetOrderStatusModel input) { var shop = db.Shops.Find(input.ShopId); var order = db.ConglomerationOrder.Find(input.OrderId); order.ConglomerationActivity = db.ConglomerationActivity.Find(order.ConglomerationActivityId); order.ConglomerationSetUp = db.ConglomerationSetUp.Find(order.ConglomerationSetUpId); var resultItem = _mapper.Map <GetOrderListResultModel>(order); if (order.Type == ConsignmentType.快递) { order.ConglomerationExpress = db.ConglomerationExpress.Find(order.ConglomerationExpressId); } resultItem.ShopAddress = shop.Address; resultItem.ConglomerationExpress = order.ConglomerationExpress; return(Success(resultItem)); }