测试卡超免费1元
This commit is contained in:
@@ -311,7 +311,10 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
|
||||
price = packageEntity.MinPrice;
|
||||
}
|
||||
|
||||
|
||||
//为超过免费的测试卡改价格
|
||||
if (packageEntity.IsTest == 1 && ((userEntity.TestCountLimit!=0 && userEntity.TestCountLimit<=userEntity.UseTestCount) || (userEntity.TestCountLimit ==0 && userEntity.UseTestCount>2))) {
|
||||
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){
|
||||
// price = 0.1M;
|
||||
@@ -376,11 +379,11 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
|
||||
order.Accounts = request.Account;
|
||||
}
|
||||
|
||||
if (userEntity.Id != 18157){
|
||||
if (packageEntity.Name =="测试卡" && (order.AccountCount !=1 || order.ConnectCount != 1) ){
|
||||
return new ApiResult<ProductOrderEntity>(ResultCode.C_INVALID_ERROR, "如果再非法操作,juip官网将对您进行制裁,冻结您的账号");
|
||||
}
|
||||
}
|
||||
// if (userEntity.Id != 18157){
|
||||
// if (packageEntity.Name =="测试卡" && (order.AccountCount !=1 || order.ConnectCount != 1) ){
|
||||
// return new ApiResult<ProductOrderEntity>(ResultCode.C_INVALID_ERROR, "如果再非法操作,juip官网将对您进行制裁,冻结您的账号");
|
||||
// }
|
||||
// }
|
||||
|
||||
//双月卡活动
|
||||
// foreach (var account in order.Accounts.Split(",").ToList())
|
||||
@@ -390,7 +393,6 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
|
||||
// return new ApiResult<ProductOrderEntity>(ResultCode.C_INVALID_ERROR, account + "此IP账号已享受该优惠套餐,无法再次购买,若要购买此优惠套餐,请新开或续费其他账号。");
|
||||
// }
|
||||
// }
|
||||
|
||||
await CheckRequest(order);
|
||||
|
||||
var ret = await CaclePaymentAmount(order, request.UseAccountAmount, is_user_price);
|
||||
@@ -627,6 +629,12 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
|
||||
if (order.OrderType == OrderType.New || order.OrderType == OrderType.News)
|
||||
{
|
||||
var accountEntitys = new List<ProductAccountEntity>();
|
||||
|
||||
var end_time = DateTime.Now.AddDays(order.DayCount);
|
||||
if (order.PackageName == "测试卡" || order.PackageName == "测试卡(高级)" || order.PackageName == "测试卡(普通)") {
|
||||
end_time = DateTime.Now.AddHours(order.DayCount);
|
||||
}
|
||||
|
||||
|
||||
await accounts.ForEachAsync(async account =>
|
||||
{
|
||||
@@ -636,7 +644,7 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
|
||||
AccountType = (int)order.OrderType,
|
||||
ConnectCount = order.ConnectCount,
|
||||
StartTime = DateTime.Now,
|
||||
EndTime = DateTime.Now.AddDays(order.DayCount),
|
||||
EndTime = end_time,
|
||||
PackageId = order.PackageId,
|
||||
PackageName = order.PackageName,
|
||||
ProductId = order.ProductId,
|
||||
@@ -657,7 +665,7 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
|
||||
await m_ProductAccountService.Adds(accountEntitys);
|
||||
order.OrderState = OrderStatus.Complete;
|
||||
order.StartTime = DateTime.Now;
|
||||
order.EndTime = DateTime.Now.AddDays(order.DayCount);
|
||||
order.EndTime = end_time;
|
||||
await this.Update(order);
|
||||
tran2.Commit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user