Browse Source

修改套餐名

peng 1 year ago
parent
commit
2aeaae084f
2 changed files with 15 additions and 5 deletions
  1. 9 2
      Controller/CloudStorage.py
  2. 6 3
      Controller/OrderContrller.py

+ 9 - 2
Controller/CloudStorage.py

@@ -1703,7 +1703,10 @@ class CloudStorageView(View):
                                                                                                               'rank__is_ai',
                                                                                                               'rank__pixel_level',
                                                                                                               'rank__commodity_code',
-                                                                                                              'rank__lang__new_title')
+                                                                                                              'rank__lang__new_title',
+                                                                                                              'ai_rank',
+                                                                                                              '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:
@@ -1730,7 +1733,11 @@ class CloudStorageView(View):
                         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_qs[0]['ai_rank'] != 1:
+                                value['bucket__content'] = order_qs[0]['ai_rank__lang__title'] + '-' + order_qs[0][
+                                    'ai_rank__lang__content']
+                            else:
+                                value['bucket__content'] = order_qs[0]['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:

+ 6 - 3
Controller/OrderContrller.py

@@ -107,8 +107,8 @@ class OrderView(View):
         omqs = omqs.annotate(rank__title=F('rank__lang__title'), rank__content=F('rank__lang__content'))
         order_ql = omqs.values("orderID", "UID", "channel", "desc", "price", "currency",
                                "addTime", "rank__lang__new_title", "rank__pixel_level", "rank__commodity_code",
-                               "updTime", "paypal", "rank__day", "payType",
-                               "rank__price", "status", "rank__is_ai", "rank__pay_type__id",
+                               "updTime", "paypal", "rank__day", "payType", 'ai_rank', 'ai_rank__lang__title',
+                               "rank__price", "status", "rank__is_ai", "rank__pay_type__id", 'ai_rank__lang__content',
                                "rank__content", "rank__title", "rank__currency",
                                "rank_id", "rank__expire", 'store_meal_name', 'order_type')[
                    (page - 1) * line:page * line]
@@ -163,7 +163,10 @@ class OrderView(View):
                         if d['order_type'] == 0:
                             d['rank__title'] = d['rank__lang__new_title'].get('1', '')
                         elif d['order_type'] == 1:
-                            d['rank__title'] = d['rank__lang__new_title'].get('2', '')
+                            if d['ai_rank'] != 1:
+                                d['rank__title'] = d['ai_rank__lang__title'] + '-' + d['ai_rank__lang__content']
+                            else:
+                                d['rank__title'] = d['rank__lang__new_title'].get('2', '')
                     else:  # cdk套餐
                         if d['rank__pay_type__id'] != 11:
                             if d['rank__pixel_level'] == 0 and d['rank__is_ai'] == 0: