李昊 il y a 4 ans
Parent
commit
2508f861d6

+ 2 - 0
gx_api/GxPress/Api/GxPress.Api/WebControllers/PayController.cs

@@ -96,6 +96,8 @@ namespace GxPress.Api.WebControllers
                     if (request.VipType > 0)
                     {
                         var vipEquity = await vipEquityRepository.GetByVipTypeAsync(request.VipType);
+                        if (vipEquity == null)
+                            throw new BusinessException("不存在权益");
                         var vipTypeConst = ((VipCardTypeConst)vipEquity.VipType);
                         if (vipTypeConst.GetHashCode() == 0)
                             throw new BusinessException("服务器异常");