Răsfoiți Sursa

修改套餐名

peng 1 an în urmă
părinte
comite
8d57890f94
1 a modificat fișierele cu 38 adăugiri și 37 ștergeri
  1. 38 37
      Controller/CloudStorage.py

+ 38 - 37
Controller/CloudStorage.py

@@ -1708,51 +1708,52 @@ class CloudStorageView(View):
                                                                                                               'ai_rank__lang__title',
                                                                                                               'ai_rank__lang__content')
                 if order_qs.exists():
-                    if order_qs[0]['payType'] not in [10, 11]:
-                        if order_qs[0]['rank__pixel_level'] == 0 and order_qs[0]['rank__is_ai'] == 0:
-                            if order_qs[0]['rank__commodity_code']:
-                                value['bucket__content'] = order_qs[0]['rank__lang__new_title'].get('5', '')
+                    order = order_qs[0]
+                    if order['payType'] not in [10, 11]:
+                        if order['rank__pixel_level'] == 0 and order['rank__is_ai'] == 0:
+                            if order['rank__commodity_code']:
+                                value['bucket__content'] = order['rank__lang__new_title'].get('5', '')
                             else:
-                                value['bucket__content'] = order_qs[0]['rank__lang__new_title'].get('1', '')
-                        elif order_qs[0]['rank__pixel_level'] == 1 and order_qs[0]['rank__is_ai'] == 0:
-                            if order_qs[0]['rank__commodity_code']:
-                                value['bucket__content'] = order_qs[0]['rank__lang__new_title'].get('6', '')
+                                value['bucket__content'] = order['rank__lang__new_title'].get('1', '')
+                        elif order['rank__pixel_level'] == 1 and order['rank__is_ai'] == 0:
+                            if order['rank__commodity_code']:
+                                value['bucket__content'] = order['rank__lang__new_title'].get('6', '')
                             else:
-                                value['bucket__content'] = order_qs[0]['rank__lang__new_title'].get('2', '')
-                        elif order_qs[0]['rank__pixel_level'] == 0 and order_qs[0]['rank__is_ai'] == 1:
-                            if order_qs[0]['rank__commodity_code']:
-                                value['bucket__content'] = order_qs[0]['rank__lang__new_title'].get('7', '')
+                                value['bucket__content'] = order['rank__lang__new_title'].get('2', '')
+                        elif order['rank__pixel_level'] == 0 and order['rank__is_ai'] == 1:
+                            if order['rank__commodity_code']:
+                                value['bucket__content'] = order['rank__lang__new_title'].get('7', '')
                             else:
-                                value['bucket__content'] = order_qs[0]['rank__lang__new_title'].get('3', '')
-                        elif order_qs[0]['rank__pixel_level'] == 1 and order_qs[0]['rank__is_ai'] == 1:
-                            if order_qs[0]['rank__commodity_code']:
-                                value['bucket__content'] = order_qs[0]['rank__lang__new_title'].get('8', '')
+                                value['bucket__content'] = order['rank__lang__new_title'].get('3', '')
+                        elif order['rank__pixel_level'] == 1 and order['rank__is_ai'] == 1:
+                            if order['rank__commodity_code']:
+                                value['bucket__content'] = order['rank__lang__new_title'].get('8', '')
                             else:
-                                value['bucket__content'] = order_qs[0]['rank__lang__new_title'].get('4', '')
-                    elif order_qs[0]['payType'] == 10:  # 免费套餐
-                        if order_qs[0]['order_type'] == 0:
-                            value['bucket__content'] = order_qs[0]['rank__lang__new_title'].get('1', '')
-                        elif order_qs[0]['order_type'] == 1:
-                            if order_qs[0]['ai_rank'] != 1:
-                                value['bucket__content'] = order_qs[0]['ai_rank__lang__title'] + '-' + order_qs[0][
+                                value['bucket__content'] = order['rank__lang__new_title'].get('4', '')
+                    elif order['payType'] == 10:  # 免费套餐
+                        if order['order_type'] == 0:
+                            value['bucket__content'] = order['rank__lang__new_title'].get('1', '')
+                        elif order['order_type'] == 1:
+                            if order['ai_rank'] != 1:
+                                value['bucket__content'] = order['ai_rank__lang__title'] + '-' + order[
                                     'ai_rank__lang__content']
                             else:
-                                value['bucket__content'] = order_qs[0]['rank__lang__new_title'].get('2', '')
+                                value['bucket__content'] = order['rank__lang__new_title'].get('2', '')
                     else:  # cdk套餐
-                        if order_qs[0]['rank__pay_type__id'] != 11:
-                            if order_qs[0]['rank__pixel_level'] == 0 and order_qs[0]['rank__is_ai'] == 0:
-                                value['bucket__content'] = order_qs[0]['rank__lang__new_title'].get('1', '')
-                            elif order_qs[0]['rank__pixel_level'] == 1 and order_qs[0]['rank__is_ai'] == 0:
-                                value['bucket__content'] = order_qs[0]['rank__lang__new_title'].get('2', '')
-                            elif order_qs[0]['rank__pixel_level'] == 0 and order_qs[0]['rank__is_ai'] == 1:
-                                value['bucket__content'] = order_qs[0]['rank__lang__new_title'].get('3', '')
-                            elif order_qs[0]['rank__pixel_level'] == 1 and order_qs[0]['rank__is_ai'] == 1:
-                                value['bucket__content'] = order_qs[0]['rank__lang__new_title'].get('4', '')
+                        if order['rank__pay_type__id'] != 11:
+                            if order['rank__pixel_level'] == 0 and order['rank__is_ai'] == 0:
+                                value['bucket__content'] = order['rank__lang__new_title'].get('1', '')
+                            elif order['rank__pixel_level'] == 1 and order['rank__is_ai'] == 0:
+                                value['bucket__content'] = order['rank__lang__new_title'].get('2', '')
+                            elif order['rank__pixel_level'] == 0 and order['rank__is_ai'] == 1:
+                                value['bucket__content'] = order['rank__lang__new_title'].get('3', '')
+                            elif order['rank__pixel_level'] == 1 and order['rank__is_ai'] == 1:
+                                value['bucket__content'] = order['rank__lang__new_title'].get('4', '')
                         else:
-                            if order_qs[0]['order_type'] == 0:
-                                value['bucket__content'] = order_qs[0]['rank__lang__new_title'].get('1', '')
-                            elif order_qs[0]['order_type'] == 1:
-                                value['bucket__content'] = order_qs[0]['rank__lang__new_title'].get('2', '')
+                            if order['order_type'] == 0:
+                                value['bucket__content'] = order['rank__lang__new_title'].get('1', '')
+                            elif order['order_type'] == 1:
+                                value['bucket__content'] = order['rank__lang__new_title'].get('2', '')
                         value['bucket__content'] += '(cdk)'
             else:
                 store_qs = Store_Meal.objects.filter(bucket__id__in=bucket_id_list, lang__lang=lang).annotate(