|
@@ -1181,13 +1181,12 @@ class CloudStorageView(View):
|
|
|
return response.json(10049)
|
|
|
price = Decimal(price)
|
|
|
coupon_discount = Decimal(couponQuery[0]['coupon_discount'])
|
|
|
- if couponQuery[0]['type'] == 1: #折扣
|
|
|
+ if couponQuery[0]['type'] == 1: #打折
|
|
|
price = coupon_discount/10 * price
|
|
|
elif couponQuery[0]['type'] == 2: #抵扣
|
|
|
price = price - coupon_discount
|
|
|
- if price < 0:
|
|
|
- return response.json(10049)
|
|
|
-
|
|
|
+ if price < 0 or price == 0:
|
|
|
+ price = 0.01
|
|
|
price = round(float(price), 2)
|
|
|
if pay_type == 1:
|
|
|
# 订阅周期扣款
|