Эх сурвалжийг харах

添加原價格字段/参数

guanhailong 2 жил өмнө
parent
commit
a1687c6937

+ 5 - 2
AdminController/UnicomManageController.py

@@ -205,6 +205,7 @@ class UnicomManageControllerView(View):
         price = request_dict.get('price', None)
         remark = request_dict.get('remark', None)
         is_show = request_dict.get('isShow', None)
+        virtualPrice = request_dict.get('virtualPrice', None)
 
         if not all([pay_type, price, is_show, status, combo_type, flow_total, expiration_days, expiration_type]):
             return response.json(444)
@@ -240,7 +241,8 @@ class UnicomManageControllerView(View):
                     'price': price,
                     'sort': sort,
                     'remark': remark if remark else '',
-                    'is_show': is_show
+                    'is_show': is_show,
+                    'virtual_price': virtualPrice,
                 }
                 if unicom_combo_qs.filter(id=combo_id).exists():
                     re_data['updated_time'] = int(time.time())
@@ -277,7 +279,7 @@ class UnicomManageControllerView(View):
                                                     'expiration_days',
                                                     'expiration_type', 'price', 'is_unlimited',
                                                     'updated_time', 'created_time',
-                                                    'remark', 'is_show', 'sort')[(page - 1) * line:page * line]
+                                                    'remark', 'is_show', 'sort', 'virtual_price')[(page - 1) * line:page * line]
             if not combo_qs.exists():
                 return response.json(0, [])
             total = combo_qs.count()
@@ -302,6 +304,7 @@ class UnicomManageControllerView(View):
                     'remark': item['remark'],
                     'isShow': item['is_show'],
                     'payTypes': pay_type_list,
+                    'virtualPrice':item['virtual_price']
                 })
             return response.json(0, {'list': combo_list, 'total': total})
         except Exception as e: