From de8a9a493a444ebed1995f468dcfbcf11b0fc137 Mon Sep 17 00:00:00 2001 From: wanyongkang <937888580@qq.com> Date: Mon, 7 Dec 2020 09:10:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=AD=E8=B4=B9=E6=96=B0=E5=BC=80=20?= =?UTF-8?q?=E5=B7=B2=E5=88=A0=E9=99=A4=E5=B8=90=E5=8F=B7=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Services/Hncore.Pass.Vpn/Service/ProductAccountService.cs | 2 +- Services/Hncore.Pass.Vpn/Service/ProductOrderService.cs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Services/Hncore.Pass.Vpn/Service/ProductAccountService.cs b/Services/Hncore.Pass.Vpn/Service/ProductAccountService.cs index 1853444..8a416f6 100644 --- a/Services/Hncore.Pass.Vpn/Service/ProductAccountService.cs +++ b/Services/Hncore.Pass.Vpn/Service/ProductAccountService.cs @@ -72,7 +72,7 @@ namespace Hncore.Pass.Vpn.Service public async Task GetAccountInfo(string accout, int userId) { - return await this.Query(true).FirstOrDefaultAsync(m => m.Account == accout && m.UserId == userId); + return await this.Query(true).FirstOrDefaultAsync(m => m.Account == accout && m.UserId == userId && m.DeleteTag == 0); } public async Task> GetAccounts(string accouts,int userId=0) diff --git a/Services/Hncore.Pass.Vpn/Service/ProductOrderService.cs b/Services/Hncore.Pass.Vpn/Service/ProductOrderService.cs index 4da6f4a..e41ee8b 100644 --- a/Services/Hncore.Pass.Vpn/Service/ProductOrderService.cs +++ b/Services/Hncore.Pass.Vpn/Service/ProductOrderService.cs @@ -579,7 +579,7 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel, } else if (order.OrderType == OrderType.AgainBuy || order.OrderType == OrderType.AgainBuys) { - var accountEntitys = await m_ProductAccountService.Query(p => p.UserId == order.UserId && p.ProductId == order.ProductId && accounts.Contains(p.Account)).ToListAsync(); + var accountEntitys = await m_ProductAccountService.Query(p => p.UserId == order.UserId && p.DeleteTag == 0 && p.ProductId == order.ProductId && accounts.Contains(p.Account)).ToListAsync(); accountEntitys = accountEntitys.Distinct(new AccountEntityEq()).ToList(); @@ -852,6 +852,10 @@ FROM product_order where {where} GROUP BY Channel,ProductName order by Channel, public async Task CaclRefund(int userId, string account) { var accountInfo = await m_ProductAccountService.GetAccountInfo(account, userId); + + if(accountInfo.Status == AccountStatus.Refund){ + return new ApiResult(ResultCode.C_Illegal_Operation, "此类帐号不允许退款"); + } if (accountInfo == null) {