Commit 5ea0b325 authored by liudong1993's avatar liudong1993

评论赠送积分

parent e7e46d37
......@@ -1653,7 +1653,7 @@ namespace Mall.Module.Product
if (model.IntegralPresent > 0)
{
Integral = model.IntegralPresent ?? 0;
if (model.IntegralPresentType == 2)
if (model.IntegralPresentType == 1)
{
Integral = Convert.ToInt32(Math.Floor((model.SellingPrice ?? 0) * (model.IntegralPresent ?? 0) / 100));
}
......@@ -1663,7 +1663,7 @@ namespace Mall.Module.Product
if (model.IntegralComment > 0)
{
CommentIntegral = model.IntegralComment ?? 0;
if (model.IntegralCommentType == 2)
if (model.IntegralCommentType == 1)
{
CommentIntegral = Convert.ToInt32(Math.Floor((model.SellingPrice ?? 0) * (model.IntegralComment ?? 0) / 100));
}
......
......@@ -3555,6 +3555,17 @@ namespace Mall.Module.Product
TotalExpress += Express;
#endregion
item.FreightMoney = Express;
item.CommentGiveIntegral = 0;
if (gmodel.IntegralComment > 0) {
if (gmodel.IntegralCommentType == 1)
{
item.CommentGiveIntegral = Convert.ToInt32(Math.Floor((gmodel.IntegralComment ?? 0) * (item.Final_Price ?? 0) / 100));
}
else {
item.CommentGiveIntegral = Convert.ToInt32((gmodel.IntegralComment ?? 0) * (item.Number ?? 0));
}
}
}
}
if (demodel.FreightMoney != TotalExpress)
......@@ -4325,6 +4336,19 @@ namespace Mall.Module.Product
item.InsuranceMoney = guidebaseModel?.SalePrice ?? 0;
item.InsuranceCostMoney = guidebaseModel?.CostPrice ?? 0;
InsuranceMoney += (item.InsuranceMoney ?? 0);
item.CommentGiveIntegral = 0;
if (gmodel.IntegralComment > 0)
{
if (gmodel.IntegralCommentType == 1)
{
item.CommentGiveIntegral = Convert.ToInt32(Math.Floor((gmodel.IntegralComment ?? 0) * (item.Final_Price ?? 0) / 100));
}
else
{
item.CommentGiveIntegral = Convert.ToInt32((gmodel.IntegralComment ?? 0) * (item.Number ?? 0));
}
}
}
}
if (CouponsMoney != demodel.CouponMoney)
......@@ -5920,7 +5944,8 @@ namespace Mall.Module.Product
UseDay = item.UseDay,
InsuranceMoney = item.InsuranceMoney,
InsuranceCostMoney = item.InsuranceCostMoney,
InsuranceFinanceId = 0
InsuranceFinanceId = 0,
CommentGiveIntegral = item.CommentGiveIntegral
}, trans);
item.Id = detailId;
if (detailId > 0 && SatisfiedGoodsList.Any())
......
......@@ -2169,7 +2169,7 @@ namespace Mall.Module.Product
if (model.IntegralPresent > 0)
{
Integral = model.IntegralPresent ?? 0;
if (model.IntegralPresentType == 2)
if (model.IntegralPresentType == 1)
{
Integral = Convert.ToInt32(Math.Floor((model.SellingPrice ?? 0) * (model.IntegralPresent ?? 0) / 100));
}
......@@ -2178,7 +2178,7 @@ namespace Mall.Module.Product
if (model.IntegralComment > 0)
{
CommentIntegral = model.IntegralComment ?? 0;
if (model.IntegralCommentType == 2)
if (model.IntegralCommentType == 1)
{
CommentIntegral = Convert.ToInt32(Math.Floor((model.SellingPrice ?? 0) * (model.IntegralComment ?? 0) / 100));
}
......
......@@ -597,7 +597,7 @@ namespace Mall.WebApi.Controllers.MallBase
if (model.IntegralPresent > 0)
{
Integral = model.IntegralPresent ?? 0;
if (model.IntegralPresentType == 2)
if (model.IntegralPresentType == 1)
{
Integral = Convert.ToInt32(Math.Floor((model.SellingPrice ?? 0) * (model.IntegralPresent ?? 0) / 100));
}
......
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