蘑菇1毛钱天卡

This commit is contained in:
“wanyongkang”
2023-08-11 17:21:13 +08:00
parent 9400508941
commit 7142d2aee7
2 changed files with 21 additions and 20 deletions

View File

@@ -88,7 +88,7 @@ namespace Home.Controllers
//从user表获取用户信息 //从user表获取用户信息
var user_Info = await m_UserService.GetById(userInfo.UserId); var user_Info = await m_UserService.GetById(userInfo.UserId);
var ProductAccountCount = user_Info.ProductAccountCount; var ExpiredProductAccountCount = user_Info.ExpiredProductAccountCount;
//判断测试卡使用次数是否超过限定次数 false表示免费没用完 true表示免费测试已经用完 //判断测试卡使用次数是否超过限定次数 false表示免费没用完 true表示免费测试已经用完
var test_flag = false; var test_flag = false;
@@ -120,9 +120,9 @@ namespace Home.Controllers
if(m.Price<m.MinPrice){ if(m.Price<m.MinPrice){
m.Price = m.MinPrice; m.Price = m.MinPrice;
} }
// if (ProductAccountCount == 0 && (m.DayCount == 1||m.DayCount == 2) && m.Id != 1034&&m.Id != 1040&&m.Id != 1079&&m.Id != 1073){ if (ExpiredProductAccountCount == 0 && m.Id == 1012){
// m.Price = 0.1M; m.Price = 0.1M;
// } }
//判断测试卡是否收费 //判断测试卡是否收费
if (test_flag && (m.IsTest == 1)) { if (test_flag && (m.IsTest == 1)) {
m.Price = 1.0M; m.Price = 1.0M;
@@ -150,9 +150,9 @@ namespace Home.Controllers
{ {
m.Price = userPrice.UserPrice; m.Price = userPrice.UserPrice;
} }
// if (ProductAccountCount == 0 && (m.DayCount == 1||m.DayCount == 2) && m.Id != 1034&&m.Id != 1040&&m.Id != 1079&&m.Id != 1073){ if (ExpiredProductAccountCount == 0 && m.Id == 1012){
// m.Price = 0.1M; m.Price = 0.1M;
// } }
//判断测试卡是否收费 //判断测试卡是否收费
if (test_flag && (m.IsTest == 1)) { if (test_flag && (m.IsTest == 1)) {
m.Price = 1.0M; m.Price = 1.0M;
@@ -173,9 +173,10 @@ namespace Home.Controllers
product.Packages.ForEach(m => { product.Packages.ForEach(m => {
m.Title = "0"; m.Title = "0";
// if ((m.DayCount == 1||m.DayCount == 2) && m.Id != 1034&&m.Id != 1040 &&m.Id != 1079&&m.Id != 1073){
// m.Price = 0.1M; if (m.Id == 1012){
// } m.Price = 0.1M;
}
}); });
} }
} }
@@ -787,7 +788,7 @@ namespace Home.Controllers
//从user表获取用户信息 //从user表获取用户信息
var user_Info = await m_UserService.GetById(userId); var user_Info = await m_UserService.GetById(userId);
var ProductAccountCount = user_Info.ProductAccountCount; var ExpiredProductAccountCount = user_Info.ExpiredProductAccountCount;
var dis_price = 1000000M; var dis_price = 1000000M;
if((user_Info.agent_id == 0||(user_Info.agent_id != 0 && user_Info.discount_id != 0)) && user_Info.discount_id >= 0){ if((user_Info.agent_id == 0||(user_Info.agent_id != 0 && user_Info.discount_id != 0)) && user_Info.discount_id >= 0){
@@ -812,9 +813,9 @@ namespace Home.Controllers
package.Price = package.MinPrice; package.Price = package.MinPrice;
} }
// if (ProductAccountCount == 0 && (package.DayCount == 1 ||package.DayCount == 2)&&package.Id != 1079&&package.Id != 1073){ if (ExpiredProductAccountCount == 0 &&package.Id == 1012){
// package.Price = 0.1M; package.Price = 0.1M;
// } }
return View("buy", new PackageInfoResponse() return View("buy", new PackageInfoResponse()
{ {

View File

@@ -260,7 +260,7 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
var userEntity = await m_UserService.GetById(userId); var userEntity = await m_UserService.GetById(userId);
//天卡0.1元 //天卡0.1元
var ProductAccountCount = userEntity.ProductAccountCount; var ExpiredProductAccountCount = userEntity.ExpiredProductAccountCount;
var is_verify = userEntity.is_verify; var is_verify = userEntity.is_verify;
@@ -320,11 +320,11 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
price = 1.00M; price = 1.00M;
} }
// if (packageEntity.ProductId != 23 &&packageEntity.ProductId != 22 && ProductAccountCount == 0 && request.OrderType != OrderType.News && (packageEntity.DayCount == 1||packageEntity.DayCount == 2) && request.ConnectCount == 1 && request.OrderType!=OrderType.AgainBuy&& request.OrderType!=OrderType.AgainBuys){ if (request.PackageId == 1012&&ExpiredProductAccountCount == 0 && request.OrderType != OrderType.News && (packageEntity.DayCount == 1||packageEntity.DayCount == 2) && request.ConnectCount == 1 && request.OrderType!=OrderType.AgainBuy&& request.OrderType!=OrderType.AgainBuys){
// // price = 0.1M; price = 0.1M;
// userEntity.ProductAccountCount = 1; userEntity.ExpiredProductAccountCount = 1;
// await m_UserService.Update(userEntity); await m_UserService.Update(userEntity);
// } }
var order = new ProductOrderEntity() var order = new ProductOrderEntity()
{ {
AccountCount = 1, AccountCount = 1,