|
@@ -95,6 +95,8 @@ class serveManagement(View):
|
|
|
# 优惠券
|
|
|
elif operation == 'getCouponList': # 查询优惠券
|
|
|
return self.getCouponList(request_dict, response)
|
|
|
+ elif operation == 'getCouponId': # 查询优惠券id
|
|
|
+ return self.getCouponId(response)
|
|
|
elif operation == 'addOrEditCoupon': # 添加/编辑优惠券
|
|
|
return self.addOrEditCoupon(request_dict, response)
|
|
|
|
|
@@ -116,12 +118,15 @@ class serveManagement(View):
|
|
|
return self.do_experience_reset(request_dict, userID, response)
|
|
|
elif operation == 'getCloudUserList': # 获取云存用户信息
|
|
|
return self.getCloudUserList(request_dict, response)
|
|
|
- elif operation == 'deviceAttritionAlert': # 流失预警
|
|
|
+ elif operation == 'paypal-cycle-cancel': # 取消循环扣款
|
|
|
+ return self.paypal_cycle_cancel(request_dict, response)
|
|
|
+ elif operation == 'distributeCoupons': # 发放云存优惠券
|
|
|
+ return self.distributeCoupons(request_dict, response)
|
|
|
+ # 流失预警
|
|
|
+ elif operation == 'deviceAttritionAlert':
|
|
|
return self.deviceAttritionAlert(request_dict, response)
|
|
|
elif operation == 'deactivationPackage': # 停用套餐
|
|
|
return self.deactivationPackage(request_dict, response)
|
|
|
- elif operation == 'paypal-cycle-cancel': # 取消循环扣款
|
|
|
- return self.paypal_cycle_cancel(request_dict, response)
|
|
|
else:
|
|
|
return response.json(404)
|
|
|
|
|
@@ -155,6 +160,10 @@ class serveManagement(View):
|
|
|
print(repr(e))
|
|
|
return response.json(10052)
|
|
|
|
|
|
+ @staticmethod
|
|
|
+ def distributeCoupons(request_dict, response):
|
|
|
+ pass
|
|
|
+
|
|
|
def getVodBucketList(self, userID, request_dict, response):
|
|
|
# 查询存储桶数据
|
|
|
print('request_dict: ', request_dict)
|
|
@@ -708,6 +717,11 @@ class serveManagement(View):
|
|
|
except Exception as e:
|
|
|
return response.json(500, 'error_line:{}, error_msg:{}'.format(e.__traceback__.tb_lineno, repr(e)))
|
|
|
|
|
|
+ @staticmethod
|
|
|
+ def getCouponId(response):
|
|
|
+ coupon_qs = CouponConfigModel.objects.all().values('id')
|
|
|
+ return response.json(0, {'list': list(coupon_qs)})
|
|
|
+
|
|
|
@staticmethod
|
|
|
def addOrEditCoupon(request_dict, response):
|
|
|
coupon_id = request_dict.get('couponID', None)
|