Bläddra i källkod

优化后台添加预备退款订单代码

linhaohong 9 månader sedan
förälder
incheckning
c6cbed20c7
1 ändrade filer med 10 tillägg och 5 borttagningar
  1. 10 5
      AdminController/ServeManagementController.py

+ 10 - 5
AdminController/ServeManagementController.py

@@ -2941,11 +2941,16 @@ class serveManagement(View):
         order_id = orders_qs[0].orderID
         transaction_id = orders_qs[0].transaction_id
         now_time = int(time.time())
-        InAppRefund.objects.create(
-            uid=uid, transaction_id=transaction_id,
-            orderID=order_id, app_type=app_type, refund_progress=4,
-            created_time=now_time, updated_time=now_time
-        )
+        if app_type:
+            InAppRefund.objects.create(
+                uid=uid, transaction_id=transaction_id,
+                orderID=order_id, refund_progress=4,
+                created_time=now_time, updated_time=now_time)
+        else:
+            InAppRefund.objects.create(
+                uid=uid, transaction_id=transaction_id,
+                orderID=order_id, refund_progress=4, app_type=app_type,
+                created_time=now_time, updated_time=now_time)
         return response.json(0)