diff --git a/Services/Hncore.Pass.Vpn/Service/ProductOrderService.cs b/Services/Hncore.Pass.Vpn/Service/ProductOrderService.cs index 292da11..51b568c 100644 --- a/Services/Hncore.Pass.Vpn/Service/ProductOrderService.cs +++ b/Services/Hncore.Pass.Vpn/Service/ProductOrderService.cs @@ -541,7 +541,7 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel, accountEntity.ChargeStatus = AccountChargeStatus.Exception; accountEntity.Remark = ret.Message; 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()) { @@ -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 lastOrder = await GetLastOrderByAccount(account); - //获取使用天数 + var useDay = (int)Math.Ceiling((DateTime.Now - lastOrder.UpdateTime).TotalDays); var refundAmount = lastOrder.PaymentAmount / lastOrder.AccountCount - useDay * refundDayPrice.Value * accountInfo.ConnectCount; refundAmount = refundAmount <= 0 ? 0 : refundAmount; @@ -777,7 +777,7 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel, PayType = PayType.None, UserId = userId, UserName = accountInfo.UserCode, - DayCount = (accountInfo.EndTime - DateTime.Now).Value.Days, + DayCount = (lastOrder.EndTime - DateTime.Now).Value.Days, DayPrice = refundDayPrice, Accounts = account, PaymentAmount = lastOrder.PaymentAmount/ lastOrder.AccountCount,