|
@@ -326,7 +326,7 @@ class UnicomComboView(View):
|
|
|
'expirationType': item['expiration_type'],
|
|
|
'price': item['price'],
|
|
|
'isUnlimited': item['is_unlimited'],
|
|
|
- 'updatedTime':item['updated_time'],
|
|
|
+ 'updatedTime': item['updated_time'],
|
|
|
'createdTime': item['created_time'],
|
|
|
'remark': item['remark'],
|
|
|
'isShow': item['is_show'],
|
|
@@ -358,24 +358,23 @@ class UnicomComboView(View):
|
|
|
@classmethod
|
|
|
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)
|
|
|
+ combo_id = request_dict.get('id', None)
|
|
|
+
|
|
|
+ if not combo_id:
|
|
|
+ return response.json(444)
|
|
|
+ try:
|
|
|
+ combo_qs = UnicomCombo.objects.filter(id=combo_id)
|
|
|
+ if combo_qs.exists():
|
|
|
+ combo_qs.update(is_del=True)
|
|
|
+ return response.json(0)
|
|
|
+ except Exception as e:
|
|
|
+ print(e)
|
|
|
+ return response.json(500, repr(e))
|
|
|
|
|
|
def static_info(self, request_dict, response):
|
|
|
"""
|