/Paint/CreatePaintOrder
2020-05-13 10:47:53 0 举报
test
作者其他创作
大纲/内容
List<string> pids = new List<string>() { model.ProductId + \"|\" + model.VariantId }; var products = (await _productService.SelectProduct(pids)).ToList();
if (item == null)
OperationResult<CreateOrderResultInfo> orderResult;
/// <summary> /// 分渠道获取喷漆车型档次GetVehicleLevel
falsedic.Add(\"Code\
var config = await GetVehicleLevelModelByVehicleId(vehicleId);
return OperationResult.FromResult(await PaintManager.GetPaintSurfaceConfig(channel));
if (item.GroupId.HasValue) // 参团
if (!services.Any() || services.All(s => s.ServiceId != serviceId))
/// 喷漆打折GetPaintDiscount
/// 创建订单CreateOrderAsync
if (!string.IsNullOrEmpty(level))
// // 摘要: // /// 获取门店服务价格 /// // // 参数: // shopId: // // serviceId: [OperationContract(Name = \"SelectShopServicePrice\
true dic.Add(\"Code\
/// 产品基础信息实时价格SelectProductBaseInfoWithDbPriceAsync
if (rule.Success && rule.Result.NotEmpty())
@\
/// 批量查询产品(无缓存) (上架&不是服务产品 || 服务产品)return (await SelectProductBaseInfoWithDbPriceAsync(pids.ToList())).Select(ProductModelExtension.ConvertToOrderProductModel).ToList();
List<PaintServiceProductModel> result = new List<PaintServiceProductModel>();
true dic.Add(\"Code\
dic.Add(\"Code\
if (shop == null)
//使用优惠券 if (!model.UseDiscount && !string.IsNullOrWhiteSpace(model.PromotionCode))
// // 摘要: // 根据车型获取车型等级 // // 返回结果: // 车型等级 public Task<OperationResult<string>> GetVehicleLevelByVehicleAsync(VehicleRequest vehicle);
// // 摘要: // 下单前校验使用的优惠券是否合法(最新) [OperationContract(Action = \"https://service.tuhu.cn/Member/Promotion/PromotionCodeVerify\
var userId = User.Identity.GetUserId().ToGuid();
if (shop.AdditionalInfo?.BusinessStatus == \"1即将营业\")
if (surfaces == null || !surfaces.Any())
if (orderResult.Success && orderResult.Result != null && orderResult.Result.OrderId > 0)
var product = products.First(); var surfaces = await _paintBl.GetStandardSurfaces(model.Mians.Keys.ToList());
true return;
/// 分城市喷漆打折GetPaintDiscountPackageAsync
List<string> shopServiceIds = new List<string> { serviceId };
if (orderServiceResult.Success && orderServiceResult.Result != null && orderServiceResult.Result.OrderId > 0)
truevar flashOrderResult = await _activityService.FlashSaleCreateOrderAsync(order);
var paintServices = await GetAllPaintServices();
if (model.Mians?.Keys != null && model.Mians.Keys.Contains(ApiHelper.ZhengCheGaiSe))
// // 摘要: // 根据订单PKID获取订单信息 // // 参数: // orderId: // // isReadOnly: // // 返回结果: // 订单 [OperationContract(Name = \"FetchOrderByOrderId\
var serviceIds = await GetServiceIdsByVehicleLevel(vehicleLevel);
//打折 if (model.UseDiscount)
// // 摘要: // 获取门店简略详情信息 // // 参数: // shopId: // // 返回结果: // 门店信息 [OperationContract(Name = \"FetchShopSimpleDetail\
return OperationResult.FromResult(await PaintManager.GetServicesByVehicle(request));
// // 摘要: // 获取漆面配置数据 // // 返回结果: // 获取漆面配置数据 public Task<OperationResult<IEnumerable<PaintSurfaceConfig>>> GetPaintSurfaceConfigNewAsync(string channel);
true dic.Add(\"Code\
false dic.Add(\"Code\
var shop = await _shopService.FetchShopSimpleDetailAsync(model.ShopId.Value);
//积分抵扣 if (useIntegral && simpleOrder != null && simpleOrder.SumMoney > 0)
true
if (simpleOrder != null && simpleOrder.SumMoney == 0)
var services = (await _paintService.GetServicesByVehicle(request)).ToList();
return result;
/// 一个门店的简单信息FetchShopSimpleDetailAsync
/// 获取漆面配置数据GetPaintSurfaceConfigNewAsync
// // 摘要: // 限购下单 [OperationContract(Action = \"https://service.tuhu.cn/Activity/FlashSaleCreateOrder/FlashSaleCreateOrder\
//去空格
// // 摘要: // 获取所有的门店服务 public Task<OperationResult<IEnumerable<ShopServiceModel>>> SelectAllServicesAsync();
false_logger.Info($\"ApiCreateOrderAsyncInfo ErrorCode:{orderResult.ErrorCode} ErrorMessage :{orderResult.ErrorMessage}\");
falseorderResult = OperationResult.FromError<CreateOrderResultInfo>(\"FlashOrderError\
/// 门店结算件GetShopServicePrice
/// 订单完成后更新拼团数据UpdatePinTuanData
// // 摘要: // /// 根据pid查询产品基础信息(价格实时获取)/// // // 参数: // pids: [OperationContract(Action = \"https://service.tuhu.cn/ProductQuery/ProductUnionQuery/SelectProductBaseInfoWithDbPrice\
//订单渠道默认值 if (string.IsNullOrWhiteSpace(order.OrderChannel)) { order.OrderChannel = \"JIOS\"; }
if (model.Version == \"1\")
if (order.OrderType != \"12加油卡\" && order.OrderType != \"11违章代缴\" && order.OrderType != OrderTypeEnum.付费会员购买)
return orderResult;
true dic.Add(\"Code\
if (string.IsNullOrEmpty(model.DefaultCar?.ProductID))
//订单缺少赠品增加监控日志 if ((order.IsGiftsLosing ?? false) && _environment.IsProduction())
///根据车型查询喷漆产品
trueawait PayUnifiedCallBackAsync(simpleOrder.OrderId);
// // 摘要: // 获取车型对应的喷漆服务产品 // // 返回结果: // 获取车型对应的喷漆服务产品 public Task<OperationResult<IEnumerable<PaintServiceProductModel>>> GetServicesByVehicleAsync(VehicleRequest vehicle);
//支付信息 dic.Add(\"PayInfo\
truePaintDiscountDetailModel discount = null;
if (serviceIds != null && serviceIds.Any() && paintServices != null && paintServices.Any())
var item = book?.OrderList?.FirstOrDefault(b => b.GroupId.HasValue || !string.IsNullOrEmpty(b.ProductGroupId));
if (rule.Result.Any(p => p.Pid == item.Pid))
if (!(shop.SuspendStartDateTime == null || shop.SuspendEndDateTime == null || (DateTime.Now < shop.SuspendStartDateTime) || DateTime.Now > shop.SuspendEndDateTime.Value.AddDays(1)))
/// 验证优惠券使用PromotionCodeVerifyAsync
if (request?.Vehicle != null && !string.IsNullOrEmpty(request.Vehicle.VehicleId))
else if (!string.IsNullOrEmpty(item.ProductGroupId)) // 开团
var order = new CreateOrderRequest { OrderChannel = string.IsNullOrWhiteSpace(model.OrderChannel) ? \"kH5\
dic.Add(\"Code\
decimal num = surfaces.Sum(s => s.NumOfStandardSurface);
/// <summary> /// 获取该车型可用的喷漆服务GetServicesByVehicle
if (flashOrderResult.Success && flashOrderResult.Result != null && flashOrderResult.Result.OrderId > 0)
falsevar orderServiceResult = await _orderService.CreateOrderAsync(order);
true dic[\"Code\"] = \"0\"; dic[\"Message\"] = \"新店近期开业 暂不支持下单 敬请关注\"; return Json(dic);
return Json(dic);
true foreach (var item in order.Items)
true result = paintServices.Where(o => serviceIds.Contains(o.ServiceId)).ToList();
// // 摘要: // 获取门店完整信息 // // 参数: // shopId: // // 返回结果: // 门店信息 [OperationContract(Name = \"FetchShopDetail\
if (orderResult.Success && orderResult.Result != null)
true orderItem.ListPrice = product.Price * num; orderItem.Price = discount.ActivityPrice; orderItem.ActivityType = \"喷漆打折\"; orderItem.Remark = discount.ActivityExplain;
// // 摘要: // 积分转E点接口 [OperationContract(Action = \"https://service.tuhu.cn/Member/UserIntegral/IntegralExchangeECard\
true dic.Add(\"Code\
await _cacheManager.SetOrderNoToCache(orderResult.Result.OrderNo);
true await _utilityService.MetricsCounterAsync(new Service.C.Monitor.MetricsCounterRequest { StatName = \"OrderGiftLoss\
请求参数示例:jsonStr: { \"Name\": \"途虎测试\
await _cacheManager.SetOrderIdToCache(orderResult.Result.OrderId);
if (service == null)
var orderResult = await _createOrderBl.CreateOrderAsync(order);
if (!model.ShopId.HasValue)
trueitem.UsePromotionCode = true;
if (!string.IsNullOrEmpty(vehicleLevel))
if (discount != null)
truevar headerInfo = Request.Headers.GetRequestHeaderInfo(); var ipAddress = _context.HttpContext.Request.RemoteIpAddress;
var result = string.Empty;
if (!products.Any())
/// 获取标准面的数量GetStandardSurfaces
if (order.OrderType != OrderTypeEnum.美容团购 && order.Items.Any(item => item.ActivityId.HasValue))
true extCol[\"PaintVehicleLevel\"] = level;
@\"SELECT * FROM Configuration..PaintSurfaceConfig WITH(NOLOCK) where IsCPortShow = 1 ORDER BY DisplayIndex ASC\";
// // 摘要: // 创建订单,需要带上套装和赠品 // // 参数: // request: // // 返回结果: // OrderNo [OperationContract(Name = \"CreateOrder\
trueshopServiceIds.Add(ApiHelper.EntireCarPaintServiceId);
@\"SELECT ServiceId FROM Configuration..PaintVehicleServiceConfig WITH ( NOLOCK ) WHERE VehicleLevel = @VehicleLevel ORDER BY DisplayIndex ASC\";
/// 车型等级GetVehicleLevelByVehicle
0 条评论
下一页