This commit is contained in:
wanyongkang
2020-11-26 18:23:31 +08:00
parent 539205f9cb
commit 0f1dcf1ce3

View File

@@ -541,7 +541,7 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
accountEntity.ChargeStatus = AccountChargeStatus.Exception; accountEntity.ChargeStatus = AccountChargeStatus.Exception;
accountEntity.Remark = ret.Message; accountEntity.Remark = ret.Message;
await m_ProductAccountService.Update(accountEntity); await m_ProductAccountService.Update(accountEntity);
accountError += $"{accountEntity.Account}{accountEntity.Remark}," + ret.Message; accountError += $"{accountEntity.Account}{accountEntity.Remark},";
} }
else if (ret.Data != null && ret.Data.ToString().Has()) else if (ret.Data != null && ret.Data.ToString().Has())
{ {
@@ -758,7 +758,7 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
var refundDayPrice = userPrice != null && userPrice.RefundDayPrice > 0 ? userPrice.RefundDayPrice : product.RefundDayPrice; var refundDayPrice = userPrice != null && userPrice.RefundDayPrice > 0 ? userPrice.RefundDayPrice : product.RefundDayPrice;
var lastOrder = await GetLastOrderByAccount(account); var lastOrder = await GetLastOrderByAccount(account);
//获取使用天数
var useDay = (int)Math.Ceiling((DateTime.Now - lastOrder.UpdateTime).TotalDays); var useDay = (int)Math.Ceiling((DateTime.Now - lastOrder.UpdateTime).TotalDays);
var refundAmount = lastOrder.PaymentAmount / lastOrder.AccountCount - useDay * refundDayPrice.Value * accountInfo.ConnectCount; var refundAmount = lastOrder.PaymentAmount / lastOrder.AccountCount - useDay * refundDayPrice.Value * accountInfo.ConnectCount;
refundAmount = refundAmount <= 0 ? 0 : refundAmount; refundAmount = refundAmount <= 0 ? 0 : refundAmount;
@@ -777,7 +777,7 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
PayType = PayType.None, PayType = PayType.None,
UserId = userId, UserId = userId,
UserName = accountInfo.UserCode, UserName = accountInfo.UserCode,
DayCount = (accountInfo.EndTime - DateTime.Now).Value.Days, DayCount = (lastOrder.EndTime - DateTime.Now).Value.Days,
DayPrice = refundDayPrice, DayPrice = refundDayPrice,
Accounts = account, Accounts = account,
PaymentAmount = lastOrder.PaymentAmount/ lastOrder.AccountCount, PaymentAmount = lastOrder.PaymentAmount/ lastOrder.AccountCount,