Commit dedb3941 authored by liudong1993's avatar liudong1993

商品评论

parent edff4feb
...@@ -632,6 +632,7 @@ namespace Mall.Module.Product ...@@ -632,6 +632,7 @@ namespace Mall.Module.Product
SpecificationList = JsonConvert.DeserializeObject<List<string>>(x.Specification), SpecificationList = JsonConvert.DeserializeObject<List<string>>(x.Specification),
x.Number, x.Number,
x.Final_Price, x.Final_Price,
x.IsComment,
x.IsApplyForAfterSale x.IsApplyForAfterSale
}), }),
model.IsApplyForCancel, model.IsApplyForCancel,
...@@ -7103,9 +7104,9 @@ namespace Mall.Module.Product ...@@ -7103,9 +7104,9 @@ namespace Mall.Module.Product
if (dmodel == null) { return false; } if (dmodel == null) { return false; }
OrderId = dmodel.OrderId ?? 0; OrderId = dmodel.OrderId ?? 0;
if (dmodel.IsComment == 1) { return false; } if (dmodel.IsComment == 1) { return false; }
omodel = goods_OrderRepository.GetEntity(OrderId); //omodel = goods_OrderRepository.GetEntity(OrderId);
if (omodel == null) { return false; } //if (omodel == null) { return false; }
if (omodel.OrderStatus != OrderStatusEnum.Received) { return false; } //if (omodel.OrderStatus != OrderStatusEnum.Received) { return false; }
} }
bool flag = goods_CommentRepository.Insert(demodel) > 0; bool flag = goods_CommentRepository.Insert(demodel) > 0;
if (flag) if (flag)
...@@ -7124,7 +7125,7 @@ namespace Mall.Module.Product ...@@ -7124,7 +7125,7 @@ namespace Mall.Module.Product
} }
}; };
goods_OrderDetailRepository.Update(keyValues, wheres); goods_OrderDetailRepository.Update(keyValues, wheres);
if (OrderId > 0) if (OrderId < 0)
{ {
var dlist = goods_OrderDetailRepository.GetOrderDetailList(new RB_Goods_OrderDetail_Extend() { OrderId = OrderId, IsComment = 2, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId }); var dlist = goods_OrderDetailRepository.GetOrderDetailList(new RB_Goods_OrderDetail_Extend() { OrderId = OrderId, IsComment = 2, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
if (!dlist.Any()) if (!dlist.Any())
......
...@@ -91,9 +91,14 @@ where {where} order by c.Id desc"; ...@@ -91,9 +91,14 @@ where {where} order by c.Id desc";
{ {
where += $@" and c.{nameof(RB_Goods_Comment.CommentGrade)}={(int)dmodel.CommentGrade}"; where += $@" and c.{nameof(RB_Goods_Comment.CommentGrade)}={(int)dmodel.CommentGrade}";
} }
if (dmodel.GoodsId > 0) { if (dmodel.GoodsId > 0)
{
where += $@" and c.{nameof(RB_Goods_Comment.GoodsId)}={dmodel.GoodsId}"; where += $@" and c.{nameof(RB_Goods_Comment.GoodsId)}={dmodel.GoodsId}";
} }
if (dmodel.UserId > 0)
{
where += $@" and c.{nameof(RB_Goods_Comment.UserId)}={dmodel.UserId}";
}
if (dmodel.PlatformSource > 0) if (dmodel.PlatformSource > 0)
{ {
where += $@" and c.{nameof(RB_Goods_Comment.PlatformSource)}={(int)dmodel.PlatformSource}"; where += $@" and c.{nameof(RB_Goods_Comment.PlatformSource)}={(int)dmodel.PlatformSource}";
......
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