Commit e5e822b5 authored by 吴春's avatar 吴春

提交代码

parent e108ac6b
......@@ -3948,7 +3948,14 @@ namespace Mall.Module.Product
item.CommentList = new List<RB_Goods_Comment_Extend>();
item.CommentList.AddRange(carCommentList.Where(x => x.OrderDetailId == item.OrderDetailId));
item.CommentList.AddRange(guideCommentList.Where(x => x.OrderDetailId == item.OrderDetailId));
if (item.UserId > 0)
{
item.UserPhotoPath = userList.Where(x => x.Id == item.UserId).FirstOrDefault()?.Photo ?? "";
}
if (item.UserId == 0 && item.UserPhoto > 0)
{
item.UserPhotoPath = material_InfoRepository.GetEntity(item.UserPhoto)?.Path ?? "";
}
foreach (var itemComment in item.CommentList)
{
itemComment.CommentImgList = new List<string>();
......@@ -3957,14 +3964,7 @@ namespace Mall.Module.Product
{
itemComment.CommentImgList = JsonConvert.DeserializeObject<List<string>>(itemComment.CommentImage);
}
if (item.UserId > 0)
{
itemComment.UserPhotoPath = userList.Where(x => x.Id == item.UserId).FirstOrDefault()?.Photo ?? "";
}
if (itemComment.UserId == 0 && itemComment.UserPhoto > 0)
{
itemComment.UserPhotoPath = material_InfoRepository.GetEntity(item.UserPhoto)?.Path ?? "";
}
}
}
......
......@@ -297,7 +297,7 @@ LEFT JOIN rb_guidecar_carbrand as cb on cb.ID=a.CarBrandId where {where} ";
whereGrade += $@" and t.TotalScore>=1 and t.TotalScore<=3";
}
}
string sql = $@" SELECT * from(SELECT OrderDetailId,UserId,UserPhoto,Is_Anonymity,SUM(CommentScore) AS TotalScore,GoodsId,DATE_FORMAT(UpdateDate, '%y-%m-%d') AS UpdateDate ,
string sql = $@" SELECT * from(SELECT OrderDetailId,UserName,UserId,UserPhoto,Is_Anonymity,SUM(CommentScore) AS TotalScore,GoodsId,DATE_FORMAT(UpdateDate, '%y-%m-%d') AS UpdateDate ,
case
when SUM(CommentScore)<=3 then 3
when SUM(CommentScore)>3 and SUM(CommentScore)<=6 then 2
......
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