一毛钱活动
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user