|
@@ -302,11 +302,12 @@ class UnicomComboView(View):
|
|
|
line = int(pageSize)
|
|
|
try:
|
|
|
combo_qs = UnicomCombo.objects.filter(is_del=False) \
|
|
|
- .order_by('sort').values('id', 'combo_name',
|
|
|
- 'flow_total',
|
|
|
+ .order_by('sort').values('id', 'package_id', 'status', 'combo_name',
|
|
|
+ 'flow_total', 'combo_type',
|
|
|
'expiration_days',
|
|
|
- 'expiration_type', 'price',
|
|
|
- 'remark')[(page - 1) * line:page * line]
|
|
|
+ 'expiration_type', 'price', 'is_unlimited',
|
|
|
+ 'updated_time', 'created_time',
|
|
|
+ 'remark', 'is_show')[(page - 1) * line:page * line]
|
|
|
if not combo_qs.exists():
|
|
|
return response.json(0, [])
|
|
|
total = combo_qs.count()
|
|
@@ -317,11 +318,16 @@ class UnicomComboView(View):
|
|
|
UnicomCombo.objects.get(id=item['id']).pay_type.values('id')]
|
|
|
combo_list.append({
|
|
|
'id': item['id'],
|
|
|
+ 'packageID': item['package_id'],
|
|
|
+ 'status': item['status'],
|
|
|
'comboName': item['combo_name'],
|
|
|
'flowTotal': item['flow_total'],
|
|
|
'expirationDays': item['expiration_days'],
|
|
|
'expirationType': item['expiration_type'],
|
|
|
'price': item['price'],
|
|
|
+ 'isUnlimited': item['is_unlimited'],
|
|
|
+ 'updatedTime':item['updated_time'],
|
|
|
+ 'createdTime': item['created_time'],
|
|
|
'remark': item['remark'],
|
|
|
'payTypes': pay_type_list,
|
|
|
})
|
|
@@ -349,8 +355,26 @@ class UnicomComboView(View):
|
|
|
return response.json(500, e)
|
|
|
|
|
|
@classmethod
|
|
|
- def combo_order_info(cls, request_doct, response):
|
|
|
+ def combo_order_info(cls, request_dict, response):
|
|
|
+ """
|
|
|
+ 删除卡套餐信息
|
|
|
+ @param request_dict
|
|
|
+ @param response
|
|
|
+ @return:
|
|
|
+ """
|
|
|
pass
|
|
|
+ # id = not request_dict.get('id', None)
|
|
|
+ #
|
|
|
+ # if not id:
|
|
|
+ # return response.json(444)
|
|
|
+ # try:
|
|
|
+ # combo_qs = UnicomCombo.objects.all()
|
|
|
+ # combo_qs = combo_qs.get(id=id)
|
|
|
+ # combo_del_qs = combo_qs.get(is_del=True)
|
|
|
+ # if combo_del_qs:
|
|
|
+ # combo_qs = combo_qs.objects.filter(is_show=1)
|
|
|
+ # else:
|
|
|
+ # combo_qs = combo_qs.objects.filter(is_show=0)
|
|
|
|
|
|
def static_info(self, request_dict, response):
|
|
|
"""
|