peng 1 жил өмнө
parent
commit
4c226dfd65

+ 3 - 1
Controller/TestApi.py

@@ -1052,12 +1052,14 @@ class testView(View):
     def checkOrderExist(request_dict, response):
     def checkOrderExist(request_dict, response):
         trade_no = request_dict.get('trade_no', None)
         trade_no = request_dict.get('trade_no', None)
         pay_time = request_dict.get('pay_time', None)
         pay_time = request_dict.get('pay_time', None)
+        refund_order = request_dict.get('refund_order', None)
         try:
         try:
             order_qs = Order_Model.objects.filter(trade_no=trade_no)
             order_qs = Order_Model.objects.filter(trade_no=trade_no)
             is_exist = 0
             is_exist = 0
             if order_qs.exists():
             if order_qs.exists():
                 is_exist = 1
                 is_exist = 1
-                order_qs.update(payTime=pay_time, addTime=pay_time)
+                if not refund_order:
+                    order_qs.update(payTime=pay_time, addTime=pay_time)
             return response.json(0, {'is_exist': is_exist})
             return response.json(0, {'is_exist': is_exist})
         except Exception as e:
         except Exception as e:
             return response.json(500, 'error_line:{}, error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
             return response.json(500, 'error_line:{}, error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)))