Explorar el Código

优化停用套餐

peng hace 1 año
padre
commit
c17f2a7771
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      AdminController/ServeManagementController.py

+ 3 - 3
AdminController/ServeManagementController.py

@@ -1933,7 +1933,7 @@ class serveManagement(View):
         try:
             with transaction.atomic():
                 #  云存套餐
-                if orderType == '0' and payType != '10':
+                if orderType in ['0', '1'] and payType != '10':
                     AiService.objects.filter(orders=orderID).delete()  # 删除AI服务
                     order_qs = Order_Model.objects.filter(orderID=orderID, userID__username=userName, UID=uid).values(
                         'rank__bucket_id', 'payTime', 'rank__expire')
@@ -1969,8 +1969,8 @@ class serveManagement(View):
                         return response.json(0)
                     return response.json(10059)  # 未使用套餐类型重复
                 #  AI套餐
-                if orderType == '1' and payType != '10':
-                    return response.json(10059)
+                # if orderType == '1' and payType != '10':
+                #     return response.json(10059)
                     # order_qs = Order_Model.objects.filter(orderID=orderID, userID__username=userName, UID=uid).values(
                     #     'ai_rank_id')
                     # order_qs = order_qs.objects.filter(UID=uid)