| | |
| | | using CoreCms.Net.IRepository; |
| | | using CoreCms.Net.IRepository.UnitOfWork; |
| | | using CoreCms.Net.IServices; |
| | | using CoreCms.Net.IServices.baifenbingfa; |
| | | using CoreCms.Net.Loging; |
| | | using CoreCms.Net.Model.Entities; |
| | | using CoreCms.Net.Model.Entities.Expression; |
| | |
| | | private readonly ICoreCmsOrderItemServices _orderItemServices; |
| | | private readonly ICoreCmsUserServices _userServices; |
| | | private readonly ICoreCmsUserGradeServices _userGradeServices; |
| | | private readonly IBfbfComAPIService _bfbfComAPIService; |
| | | |
| | | private readonly IServiceProvider _serviceProvider; |
| | | |
| | |
| | | , ICoreCmsPromotionServices promotionServices |
| | | , ICoreCmsGoodsCollectionServices goodsCollectionServices |
| | | , ICoreCmsBrandServices brandServices |
| | | , ICoreCmsOrderItemServices orderItemServices, ICoreCmsUserServices userServices, ICoreCmsUserGradeServices userGradeServices, IServiceProvider serviceProvider) |
| | | , ICoreCmsOrderItemServices orderItemServices, ICoreCmsUserServices userServices, ICoreCmsUserGradeServices userGradeServices, IServiceProvider serviceProvider, IBfbfComAPIService bfbfComAPIService) |
| | | { |
| | | this._dal = dal; |
| | | base.BaseDal = dal; |
| | |
| | | _userServices = userServices; |
| | | _userGradeServices = userGradeServices; |
| | | _serviceProvider = serviceProvider; |
| | | _bfbfComAPIService = bfbfComAPIService; |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | //获取会员级别优惠价 |
| | | //获取会员等级优惠价格体系 |
| | | decimal gradePrice = 0; |
| | | //百分兵法增加 |
| | | bool IsDictionary = await _bfbfComAPIService.IsDictionary(userId); |
| | | if (userId > 0 && type == "goods") |
| | | { |
| | | //获取用户信息 |
| | |
| | | if (userInfo != null) |
| | | { |
| | | var goodsGrades = await _goodsGradeServices.QueryByClauseAsync(p => p.goodsId == good.id && p.gradeId == userInfo.grade); |
| | | //对接经销商会员 |
| | | |
| | | if (goodsGrades != null) |
| | | { |
| | | gradePrice = goodsGrades.gradePrice; |
| | |
| | | item.goods_id = good.id.ToString(); |
| | | item.goods_name = good.name; |
| | | item.image = o.images; |
| | | if(!IsDictionary) |
| | | item.price = o.price - gradePrice; //减去会员等级价格 |
| | | else |
| | | item.price = o.distributionPrice; |
| | | item.sku_name_arr = o.spesDesc.Split(",").Select(s => s.Split(":")[1]).ToList(); |
| | | item.stock = o.stock; |
| | | item.cutMoney = o.cutMoney; |
| | | item.distributionCutMoney = o.distributionCutMoney; |
| | | item.mktPrice = o.mktprice; |
| | | item.selPrice = o.price; |
| | | if (type == GlobalEnumVars.OrderType.PinTuan.ToString().ToLowerInvariant()) |
| | |
| | | item.goods_id = good.id.ToString(); |
| | | item.goods_name = good.name; |
| | | item.image = o.images; |
| | | item.price = o.price - gradePrice; //减去会员等级价格 |
| | | if (!IsDictionary) |
| | | item.price = o.price - gradePrice; //减去会员等级价格 |
| | | else |
| | | item.price = o.distributionPrice; |
| | | //item.price = o.price - gradePrice; //减去会员等级价格 |
| | | item.sku_name_arr = new List<string> { "默认" }; |
| | | item.stock = o.stock; |
| | | item.cutMoney = o.cutMoney; |
| | | item.distributionCutMoney = o.distributionCutMoney; |
| | | item.mktPrice = o.mktprice; |
| | | item.selPrice = o.price; |
| | | if (type == GlobalEnumVars.OrderType.PinTuan.ToString().ToLowerInvariant()) |