退款原因

This commit is contained in:
wanyongkang
2020-10-19 15:45:32 +08:00
parent bd6bb177b5
commit e2f6b588c3
7 changed files with 89 additions and 8 deletions

View File

@@ -50,6 +50,8 @@ namespace Hncore.Pass.Vpn.Domain
public int? IsAutoRefund { get; set; } = 0;
public decimal? BackAmount { get; set; } = 0;
public string RefundReason { get; set; }
}
}

View File

@@ -689,6 +689,12 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
public async Task<ApiResult> Refund(int userId, string account)
{
var reason = "";
if(account.Contains("-")){
string[] arrStr = account.Split('-');
account = arrStr[0];
reason = arrStr[1];
}
var accountInfo = await m_ProductAccountService.GetAccountInfo(account, userId);
if (accountInfo == null)
@@ -746,6 +752,7 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel,
RefundAmount = refundAmount,
RefundCount = 1,
Remark = "退款",
RefundReason = reason,
};
var time = (lastOrder.EndTime - DateTime.Now).Value;
order.RefundRestTime = time.ToString(@"d\天hh\时mm\分");