Browse Source

订单是否存在

peng 1 year ago
parent
commit
b7786df4b8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Controller/TestApi.py

+ 1 - 1
Controller/TestApi.py

@@ -1096,7 +1096,7 @@ class testView(View):
         trade_no = request_dict.get('trade_no', None)
         try:
             order_qs = Order_Model.objects.filter(trade_no=trade_no)
-            is_exist = True if order_qs.exists() else False
+            is_exist = 1 if order_qs.exists() else 0
             return response.json(0, {'is_exist': is_exist})
         except Exception as e:
             return response.json(500, 'error_line:{}, error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)))