Browse Source

修复优惠券接口价格精度问题

lang 3 years ago
parent
commit
4207612665
1 changed files with 7 additions and 5 deletions
  1. 7 5
      Controller/CloudStorage.py

+ 7 - 5
Controller/CloudStorage.py

@@ -1128,14 +1128,14 @@ class CloudStorageView(View):
         dv_qs = Device_Info.objects.filter(userID_id=userID, UID=uid, isShare=False, isExist=1).values(
             'vodPrimaryUserID',
             'vodPrimaryMaster')
-        if not dv_qs.exists():
-            return response.json(12)
+        # if not dv_qs.exists():
+        #     return response.json(12)
 
         dvq = Device_Info.objects.filter(UID=uid)
         dvq = dvq.filter(~Q(vodPrimaryUserID='')).values('vodPrimaryUserID')
-        if dvq.exists():
-            if dvq[0]['vodPrimaryUserID'] != userID:
-                return response.json(10033)
+        # if dvq.exists():
+        #     if dvq[0]['vodPrimaryUserID'] != userID:
+        #         return response.json(10033)
 
         nowTime = int(time.time())
 
@@ -1189,9 +1189,11 @@ class CloudStorageView(View):
                 price = price - coupon_discount
             if price < 0:
                 return response.json(10049)
+            price = float(price)
             couponObj.update(use_status=1)
 
         if pay_type == 1:
+            # return HttpResponse(price)
             # 订阅周期扣款
             if(smqs[0]['cycle_config_id']):
                 subInfo = Paypal.subscriptions(store_info=smqs[0],lang=lang,orderID=orderID)