Commit 0b36ea56 authored by liudong1993's avatar liudong1993

商品收藏+足迹

parent 31e2cb3e
......@@ -33,5 +33,9 @@ namespace Mall.Model.Extend.User
/// 商品价格
/// </summary>
public decimal Price { get; set; }
/// <summary>
/// 商品分类 0正常商品 1司导商品
/// </summary>
public int GoodsClassify { get; set; }
}
}
......@@ -4236,13 +4236,14 @@ namespace Mall.Module.User
{
//查询商品信息
string goodsIds = string.Join(",", list.Select(x => x.GoodsId).Distinct());
var goodsList = goodsRepository.GetList(new RB_Goods_Extend() { GoodsIds = goodsIds, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
var goodsList = goodsRepository.GetSingleList(new RB_Goods_Extend() { GoodsIds = goodsIds, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId }, true);
foreach (var item in list)
{
var goodsModel = goodsList.Where(x => x.Id == item.GoodsId).FirstOrDefault();
item.GoodsName = goodsModel?.Name ?? "";
item.Price = goodsModel?.SellingPrice ?? 0;
item.GoodsClassify = goodsModel?.GoodsClassify ?? 0;
item.GoodsImgPath = "";
if (goodsModel != null)
{
......
......@@ -286,7 +286,8 @@ namespace Mall.WebApi.Controllers.User
x.Name,
x.CoverImage,
x.SellingPrice,
x.SalesNum
x.SalesNum,
x.GoodsClassify
});
return ApiResult.Success("", pagelist);
......@@ -883,6 +884,7 @@ namespace Mall.WebApi.Controllers.User
x.GoodsName,
x.GoodsImgPath,
x.Price,
x.GoodsClassify,
CreateDate = x.CreateDate.HasValue ? x.CreateDate.Value.ToString("yyyy-MM-dd") : ""
});
......
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