李昊 4 years ago
parent
commit
61c360f498

+ 1 - 1
gx_api/GxPress/Api/GxPress.Api/AdminControllers/AdminVipEquityController.cs

@@ -85,10 +85,10 @@ namespace GxPress.Api.AdminControllers
         [HttpDelete("{id}")]
         public async Task<bool> DeleteAsync(int id)
         {
+            var vipEquity = await vipEquityRepository.GetAsync(id);
             var success = await vipEquityRepository.DeleteAsync(id);
             if (success)
             {
-                var vipEquity = await vipEquityRepository.GetAsync(id);
                 var ip = httpContextAccessor.HttpContext.Connection.RemoteIpAddress.ToString();
                 var remark = $"删除Vip权益:{((VipCardTypeConst)vipEquity.VipType).GetDescriptionOriginal()}";
                 await trackLogRepository.InsertAsync(_loginContext.Name, _loginContext.AccountId, ip, remark);