chanjunkai 5 年之前
父節點
當前提交
c4bb43794a
共有 1 個文件被更改,包括 8 次插入8 次删除
  1. 8 8
      Controller/CloudStorage.py

+ 8 - 8
Controller/CloudStorage.py

@@ -43,10 +43,9 @@ http://test.dvema.com/cloudstorage/createpayorder?token=eyJhbGciOiJIUzI1NiIsInR5
 开启开关
 http://test.dvema.com/cloudstorage/changevodstatus?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySUQiOiIxNTY3NzU4MjE4NjE5MTM4MDAxMzgwMDAiLCJleHAiOjE1ODk1MjM0OTIsIm1fY29kZSI6IjEyMzQxMzI0MzIxNCIsImxhbmciOiJlbiIsInVzZXIiOiIxMzExOTY1NzcxMyJ9.e2NdhJtbXrDngZTSmOX_52Y-oxyfUEXjZD_qNxg6VrU&uid=VVDHCVBYDKFMJRWA111A&channel=1&status=1
 # 获取播放列表
-http://test.dvema.com/cloudstorage/queryvodlist?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySUQiOiIxNTY3NzU4MjE4NjE5MTM4MDAxMzgwMDAiLCJleHAiOjE1ODk1MjM0OTIsIm1fY29kZSI6IjEyMzQxMzI0MzIxNCIsImxhbmciOiJlbiIsInVzZXIiOiIxMzExOTY1NzcxMyJ9.e2NdhJtbXrDngZTSmOX_52Y-oxyfUEXjZD_qNxg6VrU&uid=VVDHCVBYDKFMJRWA111A&startTime=1&endTime=1954687458
-
+http://localhost:8077/cloudstorage/queryvodlist?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySUQiOiIxNTY3NzU4MjE4NjE5MTM4MDAxMzgwMDAiLCJleHAiOjE1ODk1MjM0OTIsIm1fY29kZSI6IjEyMzQxMzI0MzIxNCIsImxhbmciOiJlbiIsInVzZXIiOiIxMzExOTY1NzcxMyJ9.e2NdhJtbXrDngZTSmOX_52Y-oxyfUEXjZD_qNxg6VrU&uid=VVDHCVBYDKFMJRWA111A&startTime=1&endTime=1954687458&channel=1
 http://test.dvema.com/cloudstorage/storeplaylist?uidToken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1aWQiOiJWVkRIQ1ZCWURLRk1KUldBMTExQSIsImNoYW5uZWwiOiIxIn0.eGwi5QKyrXi4WSKRbrUG7iFTChv_Utec2hSnqZkDKt8&time=1586940120&sec=20&fg=10
-
+# 获取订单列表
 http://localhost:8077/cloudstorage/queryorder?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VySUQiOiIxNTY3NzU4MjE4NjE5MTM4MDAxMzgwMDAiLCJsYW5nIjoiZW4iLCJ1c2VyIjoiMTMxMTk2NTc3MTMiLCJtX2NvZGUiOiIxMjM0MTMyNDMyMTQiLCJleHAiOjE1ODk1OTIyNzh9.u211DHiMKg-pqhXv4b2yR__eNyOcSwBZCyPUGjsxFLU&page=1&line=10&uid=VVDHCVBYDKFMJRWA111A
 
 '''
@@ -143,7 +142,8 @@ class CloudStorageView(View):
         count = order_qs.count()
         order_ql = order_qs[(page - 1) * line:page * line]. \
             values("orderID", "UID", "channel", "desc", "price", "currency",
-                   "addTime", "updTime", "endTime", "pay_url", "payType", "status")
+                   "addTime", "updTime", "endTime", "pay_url", "payType",
+                   "status", "commodity_type", "commodity_code")
         order_list = list(order_ql)
         data = []
         nowTime = int(time.time())
@@ -397,9 +397,8 @@ class CloudStorageView(View):
         if not dv_qs.exists():
             return response.json(12)
         now_time = int(time.time())
-        vh_qs = VodHlsModel.objects.filter(uid=uid, channel=channel,
-                                           time__range=(startTime, endTime),
-                                           endTime__gte=now_time). \
+        vh_qs = VodHlsModel.objects.filter\
+            (uid=uid, channel=channel, time__range=(startTime, endTime), endTime__gte=now_time). \
             values("time", "sec", "bucket__bucket", "bucket__endpoint", "bucket__region", "bucket__mold")
         vod_play_list = []
         print("---")
@@ -447,7 +446,8 @@ class CloudStorageView(View):
                 # m3u8 = '{uid}/vod{channel}/{time}/{time}.m3u8'. \
                 #     format(uid=uid, channel=channel, time=vod['time'])
                 thumb_url = response_url
-                vod_url = 'http://cloudstroage.dvema.com/cloudstorage/signplaym3u8?uid={uid}&channel={channel}&time={time}&sign=tktktktk'. \
+                vod_url = 'http://cloudstroage.dvema.com/cloudstorage/signplaym3u8?' \
+                          'uid={uid}&channel={channel}&time={time}&sign=tktktktk'. \
                     format(uid=uid, channel=channel, time=vod['time'])
                 vod_play_list.append({
                     'name': vod['time'],