一毛钱活动

This commit is contained in:
“wanyongkang”
2021-01-18 17:57:11 +08:00
parent e6171147c4
commit c0b77c96df
6 changed files with 110 additions and 8 deletions

View File

@@ -219,6 +219,9 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
var userEntity = await m_UserService.GetById(userId);
//天卡0.1元
var ProductAccountCount = userEntity.ProductAccountCount;
var is_verify = userEntity.is_verify;
if (is_verify == 0)
@@ -230,6 +233,10 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
var userPrice = await this.m_ProductUserPriceService.Query(true).FirstOrDefaultAsync(m => m.UserId == userId && m.PackageId == packageEntity.Id && m.Status == 1);
if (userPrice != null && userPrice.UserPrice > 0)
price = userPrice.UserPrice;
if (ProductAccountCount == 0 && packageEntity.DayCount == 1 && packageEntity.ProductId!=5 && request.ConnectCount == 1){
price = 0.1M;
}
var order = new ProductOrderEntity()
{
AccountCount = 1,
@@ -296,6 +303,11 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
var ret = await CaclePaymentAmount(order, request.UseAccountAmount);
if (ret.Code != ResultCode.C_SUCCESS) return ret;
if (order.AccountPayAmount == 0.1M){
userEntity.ProductAccountCount = 1;
await m_UserService.Update(userEntity);
}
using (var tran = await m_DbContext.Database.BeginTransactionAsync())
{
try
@@ -361,6 +373,7 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
//账户余额支付
if (order.AccountPayAmount > 0)
{
var amountInfo = new UpdateAmountRequest()
{
Amount = order.AccountPayAmount.Value,