Browse Source

查询订阅支持uid筛选

lang 3 years ago
parent
commit
948a7faabf
1 changed files with 3 additions and 0 deletions
  1. 3 0
      Controller/PaymentCycle.py

+ 3 - 0
Controller/PaymentCycle.py

@@ -593,7 +593,10 @@ class payCycle(View):
             return self.do_cancel_pay_cycle(request_dict,userID, response)
     def do_query_pay_cycle(self, request_dict, userID, response):
         lang = request_dict.get('lang', 'en')
+        uid = request_dict.get('uid',None)
         orderObject = Order_Model.objects.filter(userID=userID,status=1,rank__lang__lang=lang).annotate(rank__title=F('rank__lang__title'), rank__content=F('rank__lang__content'))
+        if uid:
+            orderObject = Order_Model.objects.filter(UID=uid)
         orderObject = orderObject.filter(~Q(agreement_id = ''))
         if not orderObject.exists():
             return response.json(0, {'data':[], 'count': 0})