局部优化

This commit is contained in:
“wanyongkang”
2021-05-22 16:24:02 +08:00
parent 7d7dd91335
commit 60cb8a6c11
8 changed files with 27 additions and 19 deletions

View File

@@ -107,7 +107,7 @@ namespace Home.Controllers
m.Price = dis_price;
m.Title = discount.Remark;
} else {
m.Title = "9";
m.Title = "9.5";
}
if(m.Price<m.MinPrice){
m.Price = m.MinPrice;
@@ -124,7 +124,7 @@ namespace Home.Controllers
foreach(var product in respList)
{
product.Packages.ForEach(m => {
m.Title = "9";
m.Title = "9.5";
var userPrice = userPrices.FirstOrDefault(p => p.PackageId == m.Id && p.ProductId == m.ProductId);
if (userPrice != null && userPrice.UserPrice > 0)
@@ -141,7 +141,7 @@ namespace Home.Controllers
foreach(var product in respList)
{
product.Packages.ForEach(m => {
m.Title = "9";
m.Title = "9.5";
if ( m.DayCount == 1 ){
m.Price = 0.1M;
}
@@ -824,7 +824,7 @@ namespace Home.Controllers
m.Price = dis_price;
m.Title = discount.Remark;
} else {
m.Title = "9";
m.Title = "9.5";
}
if(m.Price<m.MinPrice){
m.Price = m.MinPrice;
@@ -837,7 +837,7 @@ namespace Home.Controllers
var userPrices = await m_ProductUserPriceService.GetProductUserPrice(id, userInfo.UserId);
respList.Packages.ForEach(m =>
{
m.Title = "9";
m.Title = "9.5";
var userPrice = userPrices.FirstOrDefault(p => p.PackageId == m.Id);
if (userPrice != null && userPrice.UserPrice > 0)
{