Browse Source

退款成功后删除选手

xjc 2 months ago
parent
commit
cafbecb830
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/weixin/controls.py

+ 4 - 0
src/weixin/controls.py

@@ -3803,6 +3803,10 @@ def refund_out_trade_order(**kwargs):
         if result.get("result_code") == "SUCCESS":
         if result.get("result_code") == "SUCCESS":
             signup_order.order_status = -1
             signup_order.order_status = -1
             signup_order.save()
             signup_order.save()
+            #删除选手信息
+            user_id = signup_order.user_id
+            match_id = signup_order.match_id
+            cm.Player.objects.filter(user_id=user_id,match_id=match_id).delete()
             return "success"
             return "success"
         else:
         else:
             raise ce.TipException(result.get("err_code_des"))
             raise ce.TipException(result.get("err_code_des"))