Commit 04e62a54 authored by liudong1993's avatar liudong1993

Merge branch 'master' of http://gitlab.oytour.com/Kui2/mall.oytour.com into sdzq-ld

parents feaf5d53 575b41e6
......@@ -230,5 +230,10 @@ namespace Mall.Model.Extend.Product
/// </summary>
public List<object> SupplierSpecificationList { get; set; }
/// <summary>
/// 是否直查询有视频商品(1-是)HK0902新增
/// </summary>
public int IsVideo { get; set; }
}
}
......@@ -24,5 +24,10 @@ namespace Mall.Model.Extend.Product
/// 路径
/// </summary>
public string Path { get; set; }
/// <summary>
/// 1-视频
/// </summary>
public int Type { get; set; }
}
}
......@@ -6956,14 +6956,14 @@ namespace Mall.Module.Product
if (model.Type == 2)
{
var oeModel = goods_OrderExpressRepository.GetList(new RB_Goods_OrderExpress_Extend() { AfterSaleOrderId = model.ReOrderId, TenantId = tenantId, MallBaseId = mallBaseId }).FirstOrDefault();
if (oeModel.Type == 1)
if (oeModel!=null&&oeModel.Type == 1)
{
var leModel = logistics_ExpressRepository.GetEntity(oeModel.ExpressId);
ExpressList.Add(new
{
Name = uModel.Name ?? "",
ExpressName = leModel.Name ?? "",
oeModel.ExpressNumber,
ExpressNumber=oeModel?.ExpressNumber??"",
Type = 1
});
}
......@@ -6973,7 +6973,7 @@ namespace Mall.Module.Product
{
Name = uModel.Name ?? "",
ExpressName = "",
ExpressNumber = oeModel.Remark,
ExpressNumber = oeModel?.Remark??"",
Type = 2
});
}
......
......@@ -1572,6 +1572,16 @@ namespace Mall.Module.Product
//轮播
model.CarouselImageList = new List<RB_ImageCommonModel>();
if (!string.IsNullOrWhiteSpace(model.VideoAddress))
{
model.CarouselImageList.Add(new RB_ImageCommonModel()
{
Id = 0,
Name = "",
Type = 1,
Path = model.VideoAddress
});
}
if (!string.IsNullOrEmpty(model.CarouselImage) && model.CarouselImage != "[]")
{
List<string> CarouselIdList = JsonConvert.DeserializeObject<List<string>>(model.CarouselImage);
......@@ -2370,7 +2380,8 @@ namespace Mall.Module.Product
pic_url = model.CarouselImageList.Select(x => new
{
id = x.Id,
pic_url = x.Path
pic_url = x.Path,
type = x.Type
}),
share = model.MaxShare,//分销佣金
myBuyCommission = MyBuyCommission,//粉象模式 自购返利
......@@ -4020,7 +4031,7 @@ namespace Mall.Module.Product
/// <param name="count"></param>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_Goods_Extend> GetProductGoodsPageList_V2(int pageIndex, int pageSize, out long count, RB_Goods_Extend demodel)
public List<RB_Goods_Extend> GetProductGoodsPageList_V2(int pageIndex, int pageSize, out long count, RB_Goods_Extend demodel, int SmallShopsId = 0)
{
if (!string.IsNullOrEmpty(demodel.CategoryIds) && !demodel.CategoryIds.Contains(','))
{
......@@ -4050,8 +4061,17 @@ namespace Mall.Module.Product
var list = goodsRepository.GetPageList(pageIndex, pageSize, out count, demodel);
if (list.Any())
{
//查询分类
RB_SmallShops_Info_Extend smallModel = new RB_SmallShops_Info_Extend();
List<RB_SmallShops_Price_Extend> smallPList = new List<RB_SmallShops_Price_Extend>();
List<RB_Goods_SpecificationPrice_Extend> spriceList = new List<RB_Goods_SpecificationPrice_Extend>();
//商品Id
string ids = string.Join(",", list.Select(x => x.Id));
if (SmallShopsId > 0)
{
smallModel = smallShops_InfoRepository.GetEntity<RB_SmallShops_Info_Extend>(SmallShopsId);
smallPList = smallShops_PriceRepository.GetList(new RB_SmallShops_Price_Extend() { SmallShopsId = SmallShopsId, GoodsIds = ids });
spriceList = goods_SpecificationPriceRepository.GetList(new RB_Goods_SpecificationPrice_Extend() { GoodsIds = ids });
}
var clist = goods_CategoryRepository.GetList(new RB_Goods_Category_Extend() { GoodsIds = ids, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
var olist = goods_OrderRepository.GetGoodsOrderNum(ids);
foreach (var item in list)
......@@ -4068,6 +4088,89 @@ namespace Mall.Module.Product
}
item.GoodsBuyNum = olist.Where(x => x.GoodsId == item.Id).FirstOrDefault()?.OrderNum ?? 0;
#region 微店价格
if (SmallShopsId > 0)
{
if ((smallModel.UpPrice ?? 0) > 0 || smallPList.Where(x => x.GoodsId == item.Id && x.UpPrice > 0).Any())
{
var spList = spriceList.Where(x => x.GoodsId == item.Id).ToList();
if (spList.Any())
{
foreach (var qitem in spList)
{
var sspModel = smallPList.Where(x => x.GoodsId == item.Id && x.SpecificationKey == qitem.SpecificationSort).FirstOrDefault();
if (sspModel != null)
{
//单商品设置的
if (sspModel.PriceType == 1)
{
qitem.SellingPrice = (qitem.SellingPrice ?? 0) + Math.Ceiling((qitem.SellingPrice ?? 0) * (sspModel.UpPrice ?? 0) / 100);
}
else if (sspModel.PriceType == 2)
{
qitem.SellingPrice = (qitem.SellingPrice ?? 0) + (sspModel.UpPrice ?? 0);
}
}
else
{
if ((smallModel.UpPrice ?? 0) > 0)
{
if (smallModel.PriceType == 1)
{
qitem.SellingPrice = (qitem.SellingPrice ?? 0) + Math.Ceiling((qitem.SellingPrice ?? 0) * (smallModel.UpPrice ?? 0) / 100);
}
else if (smallModel.PriceType == 2)
{
qitem.SellingPrice = (qitem.SellingPrice ?? 0) + (smallModel.UpPrice ?? 0);
}
}
}
}
item.SellingPrice = spList.Min(x => x.SellingPrice ?? 0);
decimal MaxPrice = spList.Max(x => x.SellingPrice ?? 0);
MaxPrice += Math.Ceiling(MaxPrice / 10);
if (MaxPrice > item.OriginalPrice)
{
item.OriginalPrice = MaxPrice;
}
}
else
{
var sspModel = smallPList.Where(x => x.GoodsId == item.Id && x.SpecificationKey == "").FirstOrDefault();
if (sspModel != null)
{
//单商品设置的
if (sspModel.PriceType == 1)
{
item.SellingPrice = (item.SellingPrice ?? 0) + Math.Ceiling((item.SellingPrice ?? 0) * (sspModel.UpPrice ?? 0) / 100);
item.OriginalPrice = (item.OriginalPrice ?? 0) + Math.Ceiling((item.OriginalPrice ?? 0) * (sspModel.UpPrice ?? 0) / 100);
}
else if (sspModel.PriceType == 2)
{
item.SellingPrice = (item.SellingPrice ?? 0) + (sspModel.UpPrice ?? 0);
item.OriginalPrice = (item.OriginalPrice ?? 0) + (sspModel.UpPrice ?? 0);
}
}
else
{
if ((smallModel.UpPrice ?? 0) > 0)
{
if (smallModel.PriceType == 1)
{
item.SellingPrice = (item.SellingPrice ?? 0) + Math.Ceiling((item.SellingPrice ?? 0) * (smallModel.UpPrice ?? 0) / 100);
item.OriginalPrice = (item.OriginalPrice ?? 0) + Math.Ceiling((item.OriginalPrice ?? 0) * (smallModel.UpPrice ?? 0) / 100);
}
else if (smallModel.PriceType == 2)
{
item.SellingPrice = (item.SellingPrice ?? 0) + (smallModel.UpPrice ?? 0);
item.OriginalPrice = (item.OriginalPrice ?? 0) + (smallModel.UpPrice ?? 0);
}
}
}
}
}
}
#endregion
}
}
return list;
......@@ -4122,13 +4225,22 @@ namespace Mall.Module.Product
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_Goods_Extend> GetProductGoodsList(RB_Goods_Extend demodel)
public List<RB_Goods_Extend> GetProductGoodsList(RB_Goods_Extend demodel, int SmallShopsId = 0)
{
var list = goodsRepository.GetList(demodel);
if (list.Any())
{
//查询分类
string ids = string.Join(",", list.Select(x => x.Id));
RB_SmallShops_Info_Extend smallModel = new RB_SmallShops_Info_Extend();
List<RB_SmallShops_Price_Extend> smallPList = new List<RB_SmallShops_Price_Extend>();
List<RB_Goods_SpecificationPrice_Extend> spriceList = new List<RB_Goods_SpecificationPrice_Extend>();
if (SmallShopsId > 0)
{
smallModel = smallShops_InfoRepository.GetEntity<RB_SmallShops_Info_Extend>(SmallShopsId);
smallPList = smallShops_PriceRepository.GetList(new RB_SmallShops_Price_Extend() { SmallShopsId = SmallShopsId, GoodsIds = ids });
spriceList = goods_SpecificationPriceRepository.GetList(new RB_Goods_SpecificationPrice_Extend() { GoodsIds = ids });
}
var clist = goods_CategoryRepository.GetList(new RB_Goods_Category_Extend() { GoodsIds = ids, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
foreach (var item in list)
{
......@@ -4142,6 +4254,90 @@ namespace Mall.Module.Product
item.CoverImage = CarouselIdList[0];
//轮播图
}
#region 微店价格
if (SmallShopsId > 0)
{
if ((smallModel.UpPrice ?? 0) > 0 || smallPList.Where(x => x.GoodsId == item.Id && x.UpPrice > 0).Any())
{
var spList = spriceList.Where(x => x.GoodsId == item.Id).ToList();
if (spList.Any())
{
foreach (var qitem in spList)
{
var sspModel = smallPList.Where(x => x.GoodsId == item.Id && x.SpecificationKey == qitem.SpecificationSort).FirstOrDefault();
if (sspModel != null)
{
//单商品设置的
if (sspModel.PriceType == 1)
{
qitem.SellingPrice = (qitem.SellingPrice ?? 0) + Math.Ceiling((qitem.SellingPrice ?? 0) * (sspModel.UpPrice ?? 0) / 100);
}
else if (sspModel.PriceType == 2)
{
qitem.SellingPrice = (qitem.SellingPrice ?? 0) + (sspModel.UpPrice ?? 0);
}
}
else
{
if ((smallModel.UpPrice ?? 0) > 0)
{
if (smallModel.PriceType == 1)
{
qitem.SellingPrice = (qitem.SellingPrice ?? 0) + Math.Ceiling((qitem.SellingPrice ?? 0) * (smallModel.UpPrice ?? 0) / 100);
}
else if (smallModel.PriceType == 2)
{
qitem.SellingPrice = (qitem.SellingPrice ?? 0) + (smallModel.UpPrice ?? 0);
}
}
}
}
item.SellingPrice = spList.Min(x => x.SellingPrice ?? 0);
decimal MaxPrice = spList.Max(x => x.SellingPrice ?? 0);
MaxPrice += Math.Ceiling(MaxPrice / 10);
if (MaxPrice > item.OriginalPrice)
{
item.OriginalPrice = MaxPrice;
}
}
else
{
var sspModel = smallPList.Where(x => x.GoodsId == item.Id && x.SpecificationKey == "").FirstOrDefault();
if (sspModel != null)
{
//单商品设置的
if (sspModel.PriceType == 1)
{
item.SellingPrice = (item.SellingPrice ?? 0) + Math.Ceiling((item.SellingPrice ?? 0) * (sspModel.UpPrice ?? 0) / 100);
item.OriginalPrice = (item.OriginalPrice ?? 0) + Math.Ceiling((item.OriginalPrice ?? 0) * (sspModel.UpPrice ?? 0) / 100);
}
else if (sspModel.PriceType == 2)
{
item.SellingPrice = (item.SellingPrice ?? 0) + (sspModel.UpPrice ?? 0);
item.OriginalPrice = (item.OriginalPrice ?? 0) + (sspModel.UpPrice ?? 0);
}
}
else
{
if ((smallModel.UpPrice ?? 0) > 0)
{
if (smallModel.PriceType == 1)
{
item.SellingPrice = (item.SellingPrice ?? 0) + Math.Ceiling((item.SellingPrice ?? 0) * (smallModel.UpPrice ?? 0) / 100);
item.OriginalPrice = (item.OriginalPrice ?? 0) + Math.Ceiling((item.OriginalPrice ?? 0) * (smallModel.UpPrice ?? 0) / 100);
}
else if (smallModel.PriceType == 2)
{
item.SellingPrice = (item.SellingPrice ?? 0) + (smallModel.UpPrice ?? 0);
item.OriginalPrice = (item.OriginalPrice ?? 0) + (smallModel.UpPrice ?? 0);
}
}
}
}
}
}
#endregion
}
}
return list;
......@@ -4349,7 +4545,7 @@ namespace Mall.Module.Product
{ nameof(RB_Goods.EnjoyMember),demodel.EnjoyMember},
{ nameof(RB_Goods.SeparateSetMember),demodel.SeparateSetMember},
{ nameof(RB_Goods.IsQuickBuy),demodel.IsQuickBuy},
};
}
List<WhereHelper> wheres = new List<WhereHelper>() {
......@@ -6716,7 +6912,6 @@ namespace Mall.Module.Product
}
#endregion
#region 分类包邮规则信息
/// <summary>
/// 物流规则列表
......
......@@ -233,7 +233,7 @@ namespace Mall.Module.User
{
{ nameof(RB_Employee_Extend.Status),1},
};
bool flag = roleRepository.Update(fileds, new WhereHelper(nameof(RB_Employee_Extend.EmpId), EmpId));
bool flag = employeeRepository.Update(fileds, new WhereHelper(nameof(RB_Employee_Extend.EmpId), EmpId));
return flag;
}
......
......@@ -411,6 +411,11 @@ WHERE {where} group by g.Id order by g.CreateDate desc";
{
where += $@" and g.{nameof(RB_Goods_Extend.CreateDate)} <='{dmodel.EndTime + " 23:59:59"}'";
}
if (dmodel.IsVideo > 0)
{
where += $@" and IFNULL(g.{nameof(RB_Goods_Extend.VideoAddress)} <>'' ";
}
//默认综合【升序】
string orderBy = $" order by g.{nameof(RB_Goods_Extend.Sort)} asc";
//上架时间【降序】
......
......@@ -197,98 +197,8 @@ namespace Mall.WebApi.Controllers
MallBaseId = MallBaseId,
GoodsIds = Ids,
GoodsStatus = 1
});
#region 微店价格
RB_SmallShops_Info_Extend smallModel = new RB_SmallShops_Info_Extend();
List<RB_SmallShops_Price_Extend> smallPList = new List<RB_SmallShops_Price_Extend>();
if (SmallShopsId > 0 && tempGoodsList.Any())
{
string goodsId = string.Join(",", tempGoodsList.Select(x => x.Id));
smallModel = smallShops_InfoRepository.GetEntity<RB_SmallShops_Info_Extend>(SmallShopsId);
smallPList = smallShops_PriceRepository.GetList(new RB_SmallShops_Price_Extend() { SmallShopsId = SmallShopsId, GoodsIds = goodsId });
var spriceList = goods_SpecificationPriceRepository.GetList(new RB_Goods_SpecificationPrice_Extend() { GoodsIds = goodsId });
foreach (var item in tempGoodsList)
{
if ((smallModel.UpPrice ?? 0) > 0 || smallPList.Where(x => x.GoodsId == item.Id && x.UpPrice > 0).Any())
{
var spList = spriceList.Where(x => x.GoodsId == item.Id).ToList();
if (spList.Any())
{
foreach (var qitem in spList)
{
var sspModel = smallPList.Where(x => x.GoodsId == item.Id && x.SpecificationKey == qitem.SpecificationSort).FirstOrDefault();
if (sspModel != null)
{
//单商品设置的
if (sspModel.PriceType == 1)
{
qitem.SellingPrice = (qitem.SellingPrice ?? 0) + Math.Ceiling((qitem.SellingPrice ?? 0) * (sspModel.UpPrice ?? 0) / 100);
}
else if (sspModel.PriceType == 2)
{
qitem.SellingPrice = (qitem.SellingPrice ?? 0) + (sspModel.UpPrice ?? 0);
}
}
else
{
if ((smallModel.UpPrice ?? 0) > 0)
{
if (smallModel.PriceType == 1)
{
qitem.SellingPrice = (qitem.SellingPrice ?? 0) + Math.Ceiling((qitem.SellingPrice ?? 0) * (smallModel.UpPrice ?? 0) / 100);
}
else if (smallModel.PriceType == 2)
{
qitem.SellingPrice = (qitem.SellingPrice ?? 0) + (smallModel.UpPrice ?? 0);
}
}
}
}
item.SellingPrice = spList.Min(x => x.SellingPrice ?? 0);
decimal MaxPrice = spList.Max(x => x.SellingPrice ?? 0);
MaxPrice += Math.Ceiling(MaxPrice / 10);
if (MaxPrice > item.OriginalPrice) {
item.OriginalPrice = MaxPrice;
}
}
else
{
var sspModel = smallPList.Where(x => x.GoodsId == item.Id && x.SpecificationKey == "").FirstOrDefault();
if (sspModel != null)
{
//单商品设置的
if (sspModel.PriceType == 1)
{
item.SellingPrice = (item.SellingPrice ?? 0) + Math.Ceiling((item.SellingPrice ?? 0) * (sspModel.UpPrice ?? 0) / 100);
item.OriginalPrice = (item.OriginalPrice ?? 0) + Math.Ceiling((item.OriginalPrice ?? 0) * (sspModel.UpPrice ?? 0) / 100);
}
else if (sspModel.PriceType == 2)
{
item.SellingPrice = (item.SellingPrice ?? 0) + (sspModel.UpPrice ?? 0);
item.OriginalPrice = (item.OriginalPrice ?? 0) + (sspModel.UpPrice ?? 0);
}
}
else
{
if ((smallModel.UpPrice ?? 0) > 0)
{
if (smallModel.PriceType == 1)
{
item.SellingPrice = (item.SellingPrice ?? 0) + Math.Ceiling((item.SellingPrice ?? 0) * (smallModel.UpPrice ?? 0) / 100);
item.OriginalPrice = (item.OriginalPrice ?? 0) + Math.Ceiling((item.OriginalPrice ?? 0) * (smallModel.UpPrice ?? 0) / 100);
}
else if (smallModel.PriceType == 2)
{
item.SellingPrice = (item.SellingPrice ?? 0) + (smallModel.UpPrice ?? 0);
item.OriginalPrice = (item.OriginalPrice ?? 0) + (smallModel.UpPrice ?? 0);
}
}
}
}
}
}
}
#endregion
}, SmallShopsId: SmallShopsId);
List<GoodsDetailsItem2> newGoodsList = new List<GoodsDetailsItem2>();
foreach (var goodItem in childItem.goodsList)
{
......@@ -317,99 +227,7 @@ namespace Mall.WebApi.Controllers
MallBaseId = MallBaseId,
CategoryIds = childItem.id.ToString(),
GoodsStatus = 1
});
#region 微店价格
RB_SmallShops_Info_Extend smallModel = new RB_SmallShops_Info_Extend();
List<RB_SmallShops_Price_Extend> smallPList = new List<RB_SmallShops_Price_Extend>();
if (SmallShopsId > 0 && catGoodsList.Any())
{
string goodsId = string.Join(",", catGoodsList.Select(x => x.Id));
smallModel = smallShops_InfoRepository.GetEntity<RB_SmallShops_Info_Extend>(SmallShopsId);
smallPList = smallShops_PriceRepository.GetList(new RB_SmallShops_Price_Extend() { SmallShopsId = SmallShopsId, GoodsIds = goodsId });
var spriceList = goods_SpecificationPriceRepository.GetList(new RB_Goods_SpecificationPrice_Extend() { GoodsIds = goodsId });
foreach (var item in catGoodsList)
{
if ((smallModel.UpPrice ?? 0) > 0 || smallPList.Where(x => x.GoodsId == item.Id && x.UpPrice > 0).Any())
{
var spList = spriceList.Where(x => x.GoodsId == item.Id).ToList();
if (spList.Any())
{
foreach (var qitem in spList)
{
var sspModel = smallPList.Where(x => x.GoodsId == item.Id && x.SpecificationKey == qitem.SpecificationSort).FirstOrDefault();
if (sspModel != null)
{
//单商品设置的
if (sspModel.PriceType == 1)
{
qitem.SellingPrice = (qitem.SellingPrice ?? 0) + Math.Ceiling((qitem.SellingPrice ?? 0) * (sspModel.UpPrice ?? 0) / 100);
}
else if (sspModel.PriceType == 2)
{
qitem.SellingPrice = (qitem.SellingPrice ?? 0) + (sspModel.UpPrice ?? 0);
}
}
else
{
if ((smallModel.UpPrice ?? 0) > 0)
{
if (smallModel.PriceType == 1)
{
qitem.SellingPrice = (qitem.SellingPrice ?? 0) + Math.Ceiling((qitem.SellingPrice ?? 0) * (smallModel.UpPrice ?? 0) / 100);
}
else if (smallModel.PriceType == 2)
{
qitem.SellingPrice = (qitem.SellingPrice ?? 0) + (smallModel.UpPrice ?? 0);
}
}
}
}
item.SellingPrice = spList.Min(x => x.SellingPrice ?? 0);
decimal MaxPrice = spList.Max(x => x.SellingPrice ?? 0);
MaxPrice += Math.Ceiling(MaxPrice / 10);
if (MaxPrice > item.OriginalPrice)
{
item.OriginalPrice = MaxPrice;
}
}
else
{
var sspModel = smallPList.Where(x => x.GoodsId == item.Id && x.SpecificationKey == "").FirstOrDefault();
if (sspModel != null)
{
//单商品设置的
if (sspModel.PriceType == 1)
{
item.SellingPrice = (item.SellingPrice ?? 0) + Math.Ceiling((item.SellingPrice ?? 0) * (sspModel.UpPrice ?? 0) / 100);
item.OriginalPrice = (item.OriginalPrice ?? 0) + Math.Ceiling((item.OriginalPrice ?? 0) * (sspModel.UpPrice ?? 0) / 100);
}
else if (sspModel.PriceType == 2)
{
item.SellingPrice = (item.SellingPrice ?? 0) + (sspModel.UpPrice ?? 0);
item.OriginalPrice = (item.OriginalPrice ?? 0) + (sspModel.UpPrice ?? 0);
}
}
else
{
if ((smallModel.UpPrice ?? 0) > 0)
{
if (smallModel.PriceType == 1)
{
item.SellingPrice = (item.SellingPrice ?? 0) + Math.Ceiling((item.SellingPrice ?? 0) * (smallModel.UpPrice ?? 0) / 100);
item.OriginalPrice = (item.OriginalPrice ?? 0) + Math.Ceiling((item.OriginalPrice ?? 0) * (smallModel.UpPrice ?? 0) / 100);
}
else if (smallModel.PriceType == 2)
{
item.SellingPrice = (item.SellingPrice ?? 0) + (smallModel.UpPrice ?? 0);
item.OriginalPrice = (item.OriginalPrice ?? 0) + (smallModel.UpPrice ?? 0);
}
}
}
}
}
}
}
#endregion
},SmallShopsId:SmallShopsId);
if (catGoodsList != null && catGoodsList.Count > 0)
{
foreach (var gItem in catGoodsList)
......
......@@ -88,9 +88,13 @@ namespace Mall.WebApi.Controllers.MallBase
{
return ApiResult.ParamIsNull("请传递文件路径");
}
demodel.Path = Config.GetFilePath(demodel.Path);
demodel.Image = Config.GetFilePath(demodel.Image);
//HK2020-09-01修改
if (demodel.Type == 1)
{
demodel.Path = Config.GetFilePath(demodel.Path);
demodel.Image = Config.GetFilePath(demodel.Image);
}
demodel.TenantId = Convert.ToInt32(parms.uid);
demodel.MallBaseId = parms.MallBaseId;
demodel.CreateDate = DateTime.Now;
......@@ -1447,150 +1451,155 @@ namespace Mall.WebApi.Controllers.MallBase
}
var model = productModule.GetProductGoodsInfo(GoodsId, req.TenantId, req.MallBaseId);
return ApiResult.Success("", new
object obj = new object();
if (model != null)
{
model?.Id,
model?.Name,
model?.CarouselImage,
model?.VideoAddress,
model?.CustomShareTitles,
model?.CustomShareImage,
model?.CustomShareImagePath,
model?.GoodsStatus,
model?.InventoryNum,
model?.DefaultSpecificationName,
model?.IsCustomSpecification,
model?.Sort,
model?.SellingPrice,
model?.OriginalPrice,
model?.Unit,
model?.CostPrice,
model?.IsGoodsNegotiable,
model?.SalesNum,
model?.GoodsNumbers,
model?.GoodsWeight,
model?.IsDefaultService,
model?.GoodsService,
model?.FreightId,
model?.FreightName,
model?.FormsId,
model?.FormsName,
model?.LimitBuyGoodsNum,
model?.LimitBuyOrderNum,
model?.FullNumPinkage,
model?.FullMoneyPinkage,
model?.IsAreaBuy,
model?.IntegralPresent,
model?.IntegralPresentType,
model?.PointsDeduction,
model?.PointsDeductionType,
model?.IsMultipleDeduction,
model?.GoodsDetails,
model?.SeparateDistribution,
model?.SeparateDistributionType,
model?.SeparateDistributionMoneyType,
model?.EnjoyMember,
model?.SeparateSetMember,
model?.IsQuickBuy,
model?.SupplierId,
model?.IsProxy,
model?.ProxyType,
model?.ProxyRises,
model?.ProxyMoney,
model?.IsProcurement,
model?.Commission,
model?.IsLiveGoods,
model.SendArea,
CategoryList = model?.CategoryList.Select(x => new
{
x.Id,
x.CategoryId,
x.CategoryName
}),
SpecificationList = model?.SpecificationList.Select(x => new
obj = new
{
x.Id,
x.EnabledImage,
x.Name,
x.Sort,
SpecificationValueList = x.SpecificationValueList.Select(y => new
model?.Id,
model?.Name,
model?.CarouselImage,
model?.VideoAddress,
model?.CustomShareTitles,
model?.CustomShareImage,
model?.CustomShareImagePath,
model?.GoodsStatus,
model?.InventoryNum,
model?.DefaultSpecificationName,
model?.IsCustomSpecification,
model?.Sort,
model?.SellingPrice,
model?.OriginalPrice,
model?.Unit,
model?.CostPrice,
model?.IsGoodsNegotiable,
model?.SalesNum,
model?.GoodsNumbers,
model?.GoodsWeight,
model?.IsDefaultService,
model?.GoodsService,
model?.FreightId,
model?.FreightName,
model?.FormsId,
model?.FormsName,
model?.LimitBuyGoodsNum,
model?.LimitBuyOrderNum,
model?.FullNumPinkage,
model?.FullMoneyPinkage,
model?.IsAreaBuy,
model?.IntegralPresent,
model?.IntegralPresentType,
model?.PointsDeduction,
model?.PointsDeductionType,
model?.IsMultipleDeduction,
model?.GoodsDetails,
model?.SeparateDistribution,
model?.SeparateDistributionType,
model?.SeparateDistributionMoneyType,
model?.EnjoyMember,
model?.SeparateSetMember,
model?.IsQuickBuy,
model?.SupplierId,
model?.IsProxy,
model?.ProxyType,
model?.ProxyRises,
model?.ProxyMoney,
model?.IsProcurement,
model?.Commission,
model?.IsLiveGoods,
model?.SendArea,
CategoryList = model?.CategoryList.Select(x => new
{
y.Id,
y.Image,
y.ImagePath,
y.Name,
y.Sort
})
}),
SpecificationPriceList = model?.SpecificationPriceList.Select(x => new
{
x.Id,
x.GoodsNumbers,
x.GoodsWeight,
x.InventoryNum,
x.SellingPrice,
x.SpecificationSort,
x.AttrList,
x.Commission,
x.CostMoney
}),
AreaList = model?.AreaList.Select(x => new
{
x.Id,
x.AreaId,
x.AreaName,
x.AreaType
}),
DistributionCommissionList = model?.DistributionCommissionList.Select(x => new
{
x.Id,
x.DistributorGrade,
x.OneCommission,
x.SpecificationSort,
x.ThreeCommission,
x.TwoCommission
}),
DistributionCommissionTreeList = model?.DistributionCommissionTreeList.Select(x => new
{
x.Id,
x.SpecificationSort,
x.AttrList,
GradeCommissionList = x.GradeCommissionList.Select(y => new
x.Id,
x.CategoryId,
x.CategoryName
}),
SpecificationList = model?.SpecificationList.Select(x => new
{
y.DistributorGrade,
y.OneCommission,
y.ThreeCommission,
y.TwoCommission
})
}),
MemberPriceList = model?.MemberPriceList.Select(x => new
{
x.Id,
x.MemberGrade,
x.MemberPrice,
x.SpecificationSort
}),
MemberPriceTreeList = model?.MemberPriceTreeList.Select(x => new
{
x.Id,
x.SpecificationSort,
x.AttrList,
GradePriceList = x.GradePriceList.Select(y => new
x.Id,
x.EnabledImage,
x.Name,
x.Sort,
SpecificationValueList = x.SpecificationValueList.Select(y => new
{
y.Id,
y.Image,
y.ImagePath,
y.Name,
y.Sort
})
}),
SpecificationPriceList = model?.SpecificationPriceList.Select(x => new
{
y.MemberGrade,
y.MemberPrice
})
}),
model?.CarouselImageList,
model?.ServiceList,
model?.PresentFXGrade,
model?.PresentFXMonth,
model?.Advertising,
model?.SubName,
model?.MarketingLogo,
model?.ShelvesDate,
model?.DownDate,
});
x.Id,
x.GoodsNumbers,
x.GoodsWeight,
x.InventoryNum,
x.SellingPrice,
x.SpecificationSort,
x.AttrList,
x.Commission,
x.CostMoney
}),
AreaList = model?.AreaList.Select(x => new
{
x.Id,
x.AreaId,
x.AreaName,
x.AreaType
}),
DistributionCommissionList = model?.DistributionCommissionList.Select(x => new
{
x.Id,
x.DistributorGrade,
x.OneCommission,
x.SpecificationSort,
x.ThreeCommission,
x.TwoCommission
}),
DistributionCommissionTreeList = model?.DistributionCommissionTreeList.Select(x => new
{
x.Id,
x.SpecificationSort,
x.AttrList,
GradeCommissionList = x.GradeCommissionList.Select(y => new
{
y.DistributorGrade,
y.OneCommission,
y.ThreeCommission,
y.TwoCommission
})
}),
MemberPriceList = model?.MemberPriceList.Select(x => new
{
x.Id,
x.MemberGrade,
x.MemberPrice,
x.SpecificationSort
}),
MemberPriceTreeList = model?.MemberPriceTreeList.Select(x => new
{
x.Id,
x.SpecificationSort,
x.AttrList,
GradePriceList = x.GradePriceList.Select(y => new
{
y.MemberGrade,
y.MemberPrice
})
}),
model?.CarouselImageList,
model?.ServiceList,
model?.PresentFXGrade,
model?.PresentFXMonth,
model?.Advertising,
model?.SubName,
model?.MarketingLogo,
model?.ShelvesDate,
model?.DownDate,
};
}
return ApiResult.Success("", obj);
}
/// <summary>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment