修改用户价格折扣

This commit is contained in:
“wanyongkang”
2021-02-22 14:45:59 +08:00
parent dc9480f621
commit 43581dc9cc

View File

@@ -157,7 +157,7 @@ namespace Hncore.Pass.Vpn.Controllers
if (userPrice != null && userPrice.Id > 0) if (userPrice != null && userPrice.Id > 0)
{ {
userPrice.Status = 1; userPrice.Status = 1;
userPrice.UserPrice = item.BuyPriceDiscount / 100m * package.Price; userPrice.UserPrice = item.BuyPriceDiscount / 100m * package.LinePrice;
userPrice.RefundDayPrice = item.RefundDayPriceDiscount / 100m * product.RefundDayPrice; userPrice.RefundDayPrice = item.RefundDayPriceDiscount / 100m * product.RefundDayPrice;
userPrice.Remark = schemaEntity.Name; userPrice.Remark = schemaEntity.Name;
userPrice.UserPrice = Math.Max(userPrice.UserPrice, package.MinPrice); userPrice.UserPrice = Math.Max(userPrice.UserPrice, package.MinPrice);
@@ -174,7 +174,7 @@ namespace Hncore.Pass.Vpn.Controllers
Remark = schemaEntity.Name, Remark = schemaEntity.Name,
TenantId = 0, TenantId = 0,
UserId = request.UserId, UserId = request.UserId,
UserPrice = item.BuyPriceDiscount / 100m * package.Price, UserPrice = item.BuyPriceDiscount / 100m * package.LinePrice,
RefundDayPrice = item.RefundDayPriceDiscount / 100m * product.RefundDayPrice, RefundDayPrice = item.RefundDayPriceDiscount / 100m * product.RefundDayPrice,
}; };
userPrice.UserPrice = Math.Max(userPrice.UserPrice, package.MinPrice); userPrice.UserPrice = Math.Max(userPrice.UserPrice, package.MinPrice);