Commit 114d38cd authored by liudong1993's avatar liudong1993
parents 6baf161f c05b5435
......@@ -3811,12 +3811,23 @@ namespace Mall.Module.Product
item.CategoryList = clist.Where(x => x.GoodsId == item.Id).ToList();
//轮播图
item.CoverImage = "";
item.CarouselImageList = new List<RB_ImageCommonModel>();
if (!string.IsNullOrEmpty(item.CarouselImage) && item.CarouselImage != "[]")
{
List<string> CarouselIdList = JsonConvert.DeserializeObject<List<string>>(item.CarouselImage);
//封面图
item.CoverImage = CarouselIdList[0];
//轮播图
//轮播图
foreach (var qitem in CarouselIdList)
{
item.CarouselImageList.Add(new RB_ImageCommonModel()
{
Id = 0,
Name = "",
Path = qitem
});
}
}
item.GoodsBuyNum = olist.Where(x => x.GoodsId == item.Id).FirstOrDefault()?.OrderNum ?? 0;
......
......@@ -2033,7 +2033,7 @@ namespace Mall.Module.User
{
for (var i = 0; i <= 23; i++)
{
var tempSubList = list?.Where(qitem => qitem.TimeStr == i.ToString())?.ToList();
var tempSubList = list?.Where(qitem => Convert.ToInt32(qitem.TimeStr) == i)?.ToList();
subList.Add(new MallSalesStatistics()
{
TimeStr = i.ToString(),
......
......@@ -1389,6 +1389,7 @@ namespace Mall.WebApi.Controllers.MallBase
x.Id,
x.Name,
x.CoverImage,
x.CarouselImageList,
x.SellingPrice,
x.SalesNum,
CategoryList = x.CategoryList.Select(y => new { y.Id, y.CategoryName }),
......
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